ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LANTRES Franck" <Franck.LANT...@fr.renault-sport-f1.com>
Subject RE: Asynchronous call
Date Wed, 08 Jun 2005 08:10:30 GMT
Hi,

I found the solution : the nsXmlRpcClient.js file which is installed with FireFox 1.0.4 is
not the last one !!!!

Franck


> -----Message d'origine-----
> De : LANTRES Franck [mailto:Franck.LANTRES@fr.renault-sport-f1.com] 
> Envoyé : mercredi 8 juin 2005 09:24
> À : xmlrpc-user@ws.apache.org
> Objet : Asynchronous call
> 
> Hi everybody,
> 
> I'm sorry if this problem has already been solved but I 
> didn't find answers about it.
> So here is my problem : I'm testing XUL and I would like to 
> use XML-RPC in it. I wrote a basic JavaScript function which 
> calls XML-RPC but an exception is raised as soon as my 
> servlet returns a result :
> Component returned failure code : 0x80470002 
> (NS_BASE_STREAM_CLOSED) [nsIScriptableInputStream.available]
> 
> Reading this error, I understand that the connection is 
> closed and the client cannot read the input stream. Does the 
> problem comes from the servlet, from the JavaScript ? Where 
> can I find documentation about this error ?
> 
> 
> Thanks for your help.
> Regards,
> 
> Franck.
> 
> 
> Find attached the Servlet.java file.
> Here is the JavaScript functions I wrote/use :
> 
> 
> function getClient()
> {
> 	return Components.classes['@mozilla.org/xml-rpc/client;1']
> 	.createInstance(Components.interfaces.nsIXmlRpcClient);
> }
> 
> 
> var xmlRpcClient;
> function getXmlRpc()
> {
> 	if (!xmlRpcClient) {
> 		xmlRpcClient = getClient();
> 	}
> 
> 	return xmlRpcClient;
> }
> 
> function parseResult(result)
> {
> 	alert(result);
> }
> 
> var xmlRpcListener = {
> 	onResult: function(client, ctxt, result) {
> 		//var tde =
> result.QueryInterface(Components.interfaces.nsISupportsCString);
> 		parseResult(result);
> 	},
> 	onFault: function(client, ctxt, result) {
>  		alert("Fault! " + fault + ">\n");
>  	},
> 	onError: function(client, ctxt, status, errorMsg) {
> 		alert("Error! <(" + status.toString(16) + ") " 
> + errorMsg + ">\n");
> 	}
> };
> 
> 
> function xmlrpc_call()
> {
> 	[...]
> 
> 	var ref_rpc = xmlrpc.createType(xmlrpc.STRING, {});
> 	ref_rpc.data = ref;
> 	var profile_rpc = xmlrpc.createType(xmlrpc.STRING, {});
> 	profile_rpc.data = profile;
> 	xmlrpc.asyncCall(xmlRpcListener, null, 
> "sap.tableauExperts", [ref_rpc, profile_rpc], 2); }
> 

Mime
View raw message