[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlrpc-user
Subject:    RE: Asynchronous call
From:       "LANTRES Franck" <Franck.LANTRES () fr ! renault-sport-f1 ! com>
Date:       2005-06-08 8:10:30
Message-ID: 3DF147F3222C0F45A2F5F21518D73D124C58B9 () SRV2K3-EXCH ! fr ! rf1 ! dir
[Download RAW message or body]

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); }
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic