SOAP webservice Error:Response to preflight request does not pass access control check 'Access-Control-Access-Origin' using SOAPClient.js

I have consumed a SOAP webservice in my application using SOAP client library. Webservice runs properly if I execute my code in disable—secuity mode. But if I run my code without disabling the security mode I am not able to run my webservice .

Controller which invokes SOAPClient.js

function GetSoapResponse() {
  var pl = new SOAPClientParameters();
  SOAPClient.invoke(url, "HelloWorld", pl, true, GetSoapResponse_callBack);
}

function GetSoapResponse_callBack(r, soapResponse) {
  if (soapResponse.xml) // IE
    alert(soapResponse.xml);
  else // MOZ
    alert((new XMLSerializer()).serializeToString(soapResponse));
}

Answers


it looks like the server rendering the webservice dos not support CORS

The "Access-Control-Allow-Origin" parameter have to set on the server side while sending the HTTP response and not on the client side (while sending the request)


Need Your Help

openshift postgres: No suitable driver on tomcat

java postgresql tomcat

I have moved my apps from localhost to OpenShift, and found problem with PostgreSQL connection.

VBA IE Automation - upload a file

excel internet-explorer vba excel-vba

I am using VBA to automate IE to upload a file to a site. I have got to the point where I have found the button with the "file" type, but then seem to draw a blank when setting the path.