Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 05-25-2005, 06:21 AM   #1
Beta Member
Join Date: May 2005
Posts: 1
Default Calling a web service from JS function

i'm developing an application based on XUL.in the JS file i write a function to invoke a web service,i'm able to call the web service but when i call the getParameters function on the returned object to retrieve the returned SOAPParameters it throws an exception: Component returned failure code:0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsISOAPMessage.getParameters] nsresult:0x80070057 (NS_ERROR_ILLEGAL_VALUE)

my js function which calls the web service is as follows:
var soapVersion = 0;
var transportURI = "http://localhost:8080/ogsa/services/progtutorial/core/first/HelloService";
function getValueOf( )
var method = "getValue";
var name="Hello";
var headers = new Array( );
var params = new Array(new SOAPParameter(name,"name"));
var object="http://www.globus.org/namespaces/2004/02/progtutorial/HelloService";
var call = Components.classes["@mozilla.org/xmlextras/soap/call;1"].createInstance();
var r;

if (call instanceof Components.interfaces.nsISOAPCall){
call.transportURI = transportURI;
call.encode(0,method,object,headers.length,headers ,params.length,params);

alert("Error "+r.fault.faultString);
var response = new Array();
response = r.getParameters(false,new Array());
alert("params " +params);


alert( e );

getValue is the name of the method in my web service which takes one argument and returns a string .
Is object the targetNamespace which is in the wsdl file? if no, what should be the object.
i have given the object as the targetNamespace which is in my wsdl file.
can anyone please tell me what is wrong with the code

Thanx & Regards,
pushpa is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 10:23 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0