09-17-2012 06:55 PM
Are you looking at what happens in the web inspector? You will see that, that code hits the page and gets redirected to a login page... Do you have login details for that web service? What is supposed to happen?
The other result I managed to get was a page saying: here is where you invoke a service...
09-17-2012 06:55 PM
i used your code..error is display..syntex error :
...C "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm...
![]() |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <script type="text/javascript" src="jquery.min.js"></script> <script> var productServiceUrl = 'http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS/getVersion'; function beginProduct() { $.ajax({ url: productServiceUrl, type: "GET", contentType: "application/javascript", dataType: "jsonp", data: '{}', complete: endSaveProduct, }); return false; } function endSaveProduct(xmlHttpRequest, status) { $(xmlHttpRequest.responseXML) .find('SaveProductResult') .each(function() { var name = $(this).find('myDiv').text(); }); } </script> </head> <body> <div id="myDiv"><h2>Sample Code</h2></div> <button type="button" onclick="beginProduct()">Get Content</button> </body> </html>
09-17-2012 07:02 PM
Hi.sir
there is no user name or password (login detail) of web service , actually i called this web service from http://www.codeproject.com/Articles/12816/JavaScri
09-17-2012 07:09 PM
What is the response in IE?
09-17-2012 07:12 PM
i am able to call every method in IE while using http://www.codeproject.com/Articles/12816/JavaScri
this code..
example : getversion = 1.3
example getDeparturedashboard: array of object.
09-17-2012 07:43 PM
When I test that project on my machine I get error (in chrome BTW):
Origin http://localhost is not allowed by Access-Control-Allow-Origin.
Which is right. You cannot use SOAP across domains. The SOAP web service needs to be requested on the same machine. Meaning that a phone app will not be able to use SOAP as it is on another device, trying to access information across domains.
IE does work but then again it's not a very secure browser.
09-17-2012 07:49 PM
sir you are right ...But i am getting response in phone also. of all platform..
Every thing is fine from my side . problem is in future if there is some issue i want to debug the script i will not able to do that.so i searching for another way to call this web service..
Thanks
09-17-2012 07:51 PM
BTW I got your code to work in Chrome by doing this... Running it with --disable-web-security
More ingo here:
And this is how I did it:
http://rickluna.com/wp/2012/06/test-cross-domain-a
09-17-2012 07:54 PM
please wait i will check
09-17-2012 08:05 PM
can you please share code which is running..