09-09-2012 09:57 AM
Hi
i am using first time fire bug and actually when i run my code in IE web service response will come , but same code i run in firefox with firebug i get error wsdl is null.
can you please help me.!!
Thanks
Naveen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Departure Schedule</title> <script type="text/javascript" src="soapclient.js"></script> <script type="text/javascript"> function GetDepartureStationDashboard() { alert("Hi"); var pl = new SOAPClientParameters(); var parameter1='pdw'; pl.add("parameter1", parameter1); SOAPClient.invoke("http://184.106.159.143:8080/FirstGroupRailApps/ser vices/RailAppsCAWS", "GetDepartureStationDashboard", pl, true, GetDepartureStationDashboard_callBack); } function GetDepartureStationDashboard_callBack(r) { alert(r); } </script> </head > <body onload="GetDepartureStationDashboard()"> </body> </html>
I attached my .js file ..same error is coming in chrome also but every thing is fine Internet explore,
Error is WSDL is null
09-10-2012 12:57 AM
Friends don't let friends use internet explorer! ![]()
When I click on that address in chrome I get:
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...
Will look into your code later...
09-10-2012 01:43 AM
And firebug is really right since there isn't any .wsdl file given to the SOAPClient.invoke function. Every SOAP based Web Service should have a .wsdl (Web Service Description Language) file describing the underlying functionality of the service.
So, to fix your issue make sure to have a .wsdl file und call SOAPClient.invoke pointing to this .wsdl file.
BTW: Using JavaScript I wouldn't recommend SOAP based Web Services anymore, since we have JSON format that is really well working together with JavaScript. Using SOAP you get XML-based response that needs to be parsed and converted to the right format in most cases (objects, arrays, strings), using JSON you get objects, arrays, strings directly and you don't need to parse something.
09-10-2012 03:22 AM
From Where i get .wsdl file..?
actually this web service made by backend (i have no hand in it), actually client requirement is soap base xml..so thety made like that. can you resolve my issue ? actually i am getting data in devices but when in future if i get bug then how i will do debug ,
so i want to change my code ,call web service with another way
<script type="text/javascript" src="http://d1nfmblh2wz0fd.cloudfront.net/items/loaders09-10-2012 04:56 AM
BTW if that is your code for your app (on the phone) then its a bad idea to reference external and online Javascripts - like the Google api jquery libraries.
Best to include them in your app.
What are you developing the web services with? if it were Visual studio it will automatically create the WSDL.