views:

228

answers:

1

Hello,

I am creating a website which calls a WebMethod in an .NET Webservice. To archieve this I use the JavaScript SOAPClient described here (with source code).

The method

 SOAPClient._loadWsdl(url, method, parameters, async, callback)

tries to get the WSDL file from the webservice. But the wsdl var stays null.

I used a network sniffer to analyze the incoming and outgoing packets at the webservice pc. I saw that the request reaches the webservice and that the wsdl is being sent back to the client. But somehow it stays null in the javascript var.

the method

 SOAPClient._onLoadWsdl = function(url, method, parameters, async, callback, req)

should store the wsdl in a var.

Anyone knows what the problem might be?

+2  A: 

Just a guess, but it might be a browser security thing. From the source link you posted:

please note that many browsers do not allow cross-domain calls for security reasons

(Of course it would be a bit strange for the browser to actually make the request and than drop the response later on but who knows...)

Edit: Looking through the comments on the linked CodeProject article, it looks like the code posted there was an initial version for which some bugs got fixed in the meantime. So you might want to try again using the latest version.

Henrik Opel
That is probably the problem indeed.. Thanks :)Now i am going to look into JSON because it doesn't suffer from these security blocks..
Rick