I am trying to call the Java based Web Service by Jquery Ajax,

The URl of the Service is "http://vmABCapp01-staging.domain.com:7083/UserIDCheckService/CheckUserIDServiceImpl".

The Jquery Code to call the service is

var soapMessage = '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><checkUserID xmlns="http://com/ig/netapp/coe/ws/ldap/services"><searchValue>' + AccountUserid + '</searchValue></checkUserID></soap:Body></soap:Envelope>';

      $.support.cors = true;
            url: WebServiceUrl,
            type: "POST",
            dataType: "xml",
            async: false,
            crossDomain: true,
            data: soapMessage,
            success: function (xmlHttpRequest, status) {//Task to do on the Success},
            contentType: "text/xml; charset=\"utf-8\"",
            error: function (xmlHttpRequest, status) {
                alert(status +":"+ xmlHttpRequest.statusText);


The webservice is hosted at “Machine2.corp.mydomain.com” where as the JQuery is running from “Machine-stg.mydomain.com”

The above code is working fine when I run the code on Chrome with “chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security”, i.e. once the websecurity is disabled.

But the same code is not working with the default setting of the browsers,getting Transport Error -404

Any Idea to make the Jquery work without altering the Webservice code

getting the Error - XMLHttpRequest cannot load http://vmABCapp01-staging.corp.domain.com:7083/UserIDCheckService/CheckUserIDServiceImpl. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://sharepoint-stg.corp.domain.com' is therefore not allowed access. The response had HTTP status code 404.

  • Can you implement your solution as an App for SharePoint? Apps have the capability to implement cross-domain calls without any one-off ISS configuration or browser configuration – John-M May 11 '15 at 14:23
  • actually I am using the script directly on the forms of the list, the list is hosted on the SharePoint Host web instead of App Web. – Ashok Kumar Sah May 12 '15 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.