Topic
1 reply Latest Post - ‏2009-11-24T19:09:12Z by dmlong
SystemAdmin
SystemAdmin
14 Posts
ACCEPTED ANSWER

Pinned topic Namespace issue in WsdlParser.js

‏2009-11-24T19:01:56Z |
I've spent the last few days trying to get ibm_soap.widget.SoapService to work and I had to go into WsdlParser.js and make a correction.

Here's my HTML:

<html>   <head> <SCRIPT TYPE=
"text/javascript" SRC=
"http://localhost:8080/dojo/1.3.2/dojo/dojo.js" djConfig=
"parseOnLoad: true"></SCRIPT> <script language=
"javascript"> dojo.require(
"dojo.parser"); dojo.require(
"dojox.wire.ml.util"); dojo.require(
"ibm_soap.widget.SoapService"); </script> </head>   <body>   <script language=
"javascript">   function createDropDown()
{   var noaaServiceParms = 

new dojox.wire.ml.XmlElement(
"LatLonListZipCode"); noaaServiceParms.setPropertyValue(
"zipCodeList",
"30068"); var deferred = noaaService.service.LatLonListZipCode(noaaServiceParms);   deferred.addCallback(function(results)
{ console.log(results.toString()); 
});   
}   dojo.addOnLoad(createDropDown); </script>   <div dojoType=
"ibm_soap.widget.SoapService" jsId=
"noaaService" url=
"http://localhost:8080/ibm_soap/wsdl/ndfdXML.wsdl"></div>   </body> </html>


The issue lies in trying to create dojox.wire.ml.XmlElement with no namespace which causes an error


uncaught exception: [Exception... 
"Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)"  nsresult: 
"0x80004003 (NS_ERROR_INVALID_POINTER)"  location: 
"JS frame :: http://localhost:8080/dojo/1.3.2/dojo/_base/_loader/bootstrap.js :: anonymous :: line 533"  data: no]


I traced the problem and fixed by defaulting the namespace (line 125 in WsdlParser.js) just before it enters a loop for processing parts:



// always add default namespace so it doesn't barf downstream method._soapBindingParameters.namespace = defaultNamespace;


I'm not sure if this issue has already been addressed, but I though I'd post it in case it helps anyone.

That wsdl parser is pretty slick code, I'm impressed it works!

Carl.
Updated on 2009-11-24T19:09:12Z at 2009-11-24T19:09:12Z by dmlong
  • dmlong
    dmlong
    1 Post
    ACCEPTED ANSWER

    Re: Namespace issue in WsdlParser.js

    ‏2009-11-24T19:09:12Z  in response to SystemAdmin
    Thank you for the update.