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

Attachment: Servlet.java
Description: Servlet.java

Reply via email to