Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Help me learing how to debug html + javscript code

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/services/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

 

Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: Help me learing how to debug html + javscript code

Friends don't let friends use internet explorer! :smileyhappy:

 

When I click on that address in chrome I get: 

RailAppsCAWS

Hi there, this is an AXIS service!

Perhaps there will be a form for invoking the service here...

 

Will look into your code later...

If it helped you, click like. :smileyhappy:
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Help me learing how to debug html + javscript code

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.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: Help me learing how to debug html + javscript code

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/loaders/loader_1063.js?aoi=1311798366&pid=1063&zoneid=152..."></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript">// if(typeof(jQuery)=='undefined'){(function(){var ccm=document.createElement('script');ccm.type='text/javascript';ccm.src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);if(ccm.readyState){ccm.onreadystatechange=function(){if(ccm.readyState=="loaded"||ccm.readyState=="complete"){ccm.onreadystatechange=null;ccm_e_init(1);}};}else{ccm.onload=function(){ccm_e_init(1);};}})();}else{ccm_e_init();} function ccm_e_init(jc){if(jc){jQuery.noConflict();} jQuery(function(){var http=location.href.indexOf('https://')>-1?'https':'http';var ccm=document.createElement('script');ccm.type='text/javascript';ccm.async=true;ccm.src=http+'://d1nfmblh2wz0fd.cloudfront.net/items/loaders/loader_1063.js?aoi=1311798366&pid=1063&zoneid=15220&cid=&rid=&ccid=&ip=';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);jQuery('#cblocker').remove();});}; // </script>
Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: Help me learing how to debug html + javscript code

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.

If it helped you, click like. :smileyhappy:
Please use plain text.