09-17-2012 08:07 PM
I tested by downloading your sample code from the codeproject link. Then I changed the first example to this:
// DEMO 1
function HelloWorld()
{
var pl = new SOAPClientParameters();
pl.add("crsCode", "AAP");
//SOAPClient.invoke(url, "HelloWorld", pl, true, HelloWorld_callBack);
SOAPClient.invoke("http://184.106.159.143:8080/FirstGroupRailApps/ser vices/RailAppsCAWS", "getDestinationStationDashboard", pl, true, HelloWorld_callBack);
}
function HelloWorld_callBack(r)
{
alert(r);
}
09-17-2012 08:10 PM
Thanks
sir code is fine ...you only change the property of chrome ?
add –disable-web-security
this
09-17-2012 08:13 PM
Yes. A s I mentioned before chrome does not allow cross domain SOAP calls. So you need to disable it, to test your product. Do this by following the tutorial in the link I provided.
The code I gave above is from the website you wanted to use (codeproject), with a few modifications so that it works with your railapps.
09-17-2012 08:18 PM
i am getting 2 errors
1)Uncaught TypeError: Cannot read property 'documentElement' of null
Origin null is not allowed by Access-Control-Allow-Origin.
09-17-2012 08:21 PM
Change your chrome shortcut like this:
http://rickluna.com/wp/2012/06/test-cross-domain-a
Worked for me
09-17-2012 08:35 PM
Thanks can we do the same thing for firefox also..?
09-17-2012 09:01 PM
XMLHttpRequest cannot load http://184.106.159.143:8080/FirstGroupRailApps/ser
getting this error..as you change anything in soapclient.js also..?
09-18-2012 12:38 AM
Sir not able to remove this error..![]()
09-18-2012 04:22 AM
The problem you are running in is CORS (Cross-origin resource sharing) using XHR. XHR in the browser isn't able to call sources of an other domain then the hosting domain without configuration on server side. Using your source code within an app it should work by default to call URLs from another domain.
09-18-2012 04:28 AM
But you are getting output .Today