09-18-2012 04:30 AM
is there any way to solve this problem ?
or i have to implement in differnt way..?![]()
09-18-2012 07:54 AM
can you so me favour ,
can you call one method of my web service using ajax or jquery as an example..
please so that i will debug the code..
Thanks
09-18-2012 10:15 AM
Setting up chrome
1. Click on start and search for chrome shortcut (assuming you have windows 7)
2. Right click and edit properties of chrome shortcut
3. In the box that says Target ... Start with quotes " and end with quotes ie: "C:\program files..."
4. On the end of the quotes add --disable-web-security
5. No quotes on --disable-web-security!
6. Say OK and save
7. Open chrome from this link for first time - do not use already open chrome.
8. Only use this newly edited link to open chrome in future
Setting up the web page
1. Create a new web page called index.html in a web folder
2. Make sure you have soapclient.js there too.
3. Insert code...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title>Ravi needs SOAP</title> <style type="text/css"> div.h { display: none; } div.s { display: block; margin: 10px; } </style> <script type="text/javascript" src="soapclient.js"></script> <script type="text/javascript"> function theStationDashBoard() { var pl = new SOAPClientParameters(); // This is a station code, use this to lookup info on stations or whatever it does really - you should know that // the pl. is for adding parameters that get passed to the webservice pl.add("crsCode", "AAP"); SOAPClient.invoke("http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS", "getDestinationStationDashboard", pl, true, Station_callBack); } function Station_callBack(r, xmlResponse) { var responseXML = xmlResponse.documentElement; var stationName = responseXML.getElementsByTagName("stationName"); var expArrival = responseXML.getElementsByTagName("destExpArrival") ; var trainID = responseXML.getElementsByTagName("trainID"); var strStationlist = ''; for (var i=0; i < stationName.length; i++) { strStationlist += "Train: " + trainID[i].firstChild.nodeValue + " for " + stationName[i].firstChild.nodeValue + " Expected to Arrive: " + expArrival[i].firstChild.nodeValue + "<br />"; } document.getElementById("showOutput").innerHTML = strStationlist; } </script> </head> <body> <form id="frmDemo" name="frmDemo" action="" method="post"> <div> <a name="d1"></a> <h2>DEMO SOAP: "Hello Ravi!"</h2> <p>The simplest example you can imagine (but maybe not the most fanciful...):</p> <input type="button" value="Click to get Station info for AAP" onclick="theStationDashBoard();" /> <div id="showOutput"></div> </div> </form> </body> </html>
4. Go and run the web page in chrome from localhost location - or where ever you're developing.
5. Click on button and wait for results
6. Use the web inspector to see the full SOAP response.
7. Take note of train information.
8. Send The_Anomaly your email so he can send you the bill!
9. Also mark as solution so others can know and press LIKE if you have been helped.
Example uses your SOAP client ajax and not jQuery. Not sure if this will conflict but thats your problem from here.
New subject becomes new forum thread. Enjoy.
09-18-2012 11:36 AM
Many many thanks
sir every time you help .........again thanks sir
09-18-2012 01:08 PM
thanks Sir
Last how to change the setting of firefox..?
if someone is interested to run this program in firefox ? how to change the the setting ?
09-18-2012 01:13 PM
Great example is running in chorme ..thanks but not running in firefox how to change setting in firefox..?
09-18-2012 04:28 PM
to enable cross domain ajax without editing config files by hand. Type “about:config” in your URL bar, then right click on the list of preferences and select the New → String contextual menu. Add capability.policy.default.XMLHttpRequest.open as key name and allAccess as value. I do not remember if this is taken into account immediately or if you have to reboot. Done!
09-18-2012 05:58 PM
it is not working same error display wsdl is null..![]()
09-18-2012 06:01 PM
same example as you give work fine in chrome but not work in firefox,i also done setting..![]()
09-18-2012 11:58 PM
Sir Last Please check your code on firefox..If it is running please let me know..