Re: soap messages
"rami messiha" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
Martin Honnen wrote:
> Where does the tutorial say that you should access
> result.value()
> ? That would be a method call.
sorry about that i meant the following code fragment
var num = new Object();
var params = result.getParameters(false,num);
var suggestion = params[0].value;
> You will need to post details about the web service you are trying to
> access, a description of the methods you are trying to call, the (URL to
> the) WSDL if there is one.
its a majer project i am working on for uni. this is the WSDL url
http://whale.ee.usyd.edu.au:8080/axis/servlet/AxisServlet
> How is that service implemented? Do other web service clients work with
> the service but Mozilla fails?
the service is implemented using .jws (java) on apatche tomcat
container i have the .jws file if needed
>
> And then show us exactly which code you are using, where the result
> variable is set for instance so that it is clear what you are doing.
>
this is the code i am using to connect to the web service
function callSoapService(method,params,callback)
{
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
}
catch (e)
{
alert(e);
return false;
}
var soapCall = new SOAPCall();
soapCall.transportURI =
"http://whale.ee.usyd.edu.au:8080/axis/services/Awacate";
soapCall.encode(0, method, "awacate", 0, null, params.length, params);
soapCall.asyncInvoke(
function (response, soapcall, error)
{
var r = handleSOAPResponse(response,soapcall,error);
callback(r);
}
);
}
function handleSOAPResponse (response,call,error)
{
if (error != 0)
{
alert("Service failure");
return false;
}
else
{
var fault = response.fault;
if (fault != null) {
var code = fault.faultCode;
var msg = fault.faultString;
alert("SOAP Fault:\n\n" +
"Code: " + code +
"\n\nMessage: " + msg
);
return false;
} else
{
return response;
}
}
}
function createCategoriser(result)
{
if (result==false)
{
return;
}
var num = new Object();
var params = result.getParameters(false,num);
categoriserid = params[0].value;
...
}
and here is where i use it all
function getcategoriser()
{
...
var params = new Array();
callSoapService("createCategoriser2",params,createCategoriser);
}
thanks a lot any help will be great