tags:

views:

1482

answers:

4

I'm getting the following error when trying to use JQuery with the JqSOAPClient plugin: http://plugins.jquery.com/project/jqSOAPClient

Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://localhost:1320/jquery-1.3.2.min.js :: anonymous :: line 19" data: no]

please advise.

I'm calling a local .net webservice using Javascript:

var soapBody = new SOAPObject("FindCountryAsString");
soapBody.ns = "http://localhost:1320";
soapBody.appendChild(new SOAPObject("V4IPAddress")).val(a); 
var sr = new SOAPRequest("http://localhost:1320/Service1.asmx/FindCountryAsString", soapBody);
SOAPClient.SOAPServer = "http://localhost:1320/Service1.asmx/"; 
SOAPClient.SendRequest(sr, processResponse);

both this page and the .net webservice run on the same domain (localhost in this case).

A: 

The error code seems to indicate that there is an invalid parameter that is preventing the completion of the request. My suspicion would be that the parameter you are passing is not in the correct format and can't be deserialized on the server.

tvanfosson
+1  A: 

Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]

That's what you get when you try to XMLHttpRequest.open() a URL consisting of an empty string.

jqSOAPClient appears to expect you to set SOAPClient.Proxy to the local URL you want to access, not .SOAPServer. If you don't set SOAPClient.Proxy, it ends up trying to send a request to an empty string.

(In the code, it's checking for Proxy==null, but if not set Proxy actually defaults to an empty string, not null, so that fails. And anyway even if that worked, it would simply silently fail to do anything if no Proxy is set, which isn't really any more helpful either.)

bobince
A: 

Just throwing an answer in here in case others experiencing a similar 'unknown' XMLHttpRequest.open error on firefox: (this stackoverflow result came up on google). AdBlockPlus may be causing the problem, disabling per domain fixes the issue.

Matt Gardner
A: 

To solve this issue please give the URL to JqGrid

taduriSreedhar