You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Anup Chopra <ac...@egain.com> on 2002/05/07 18:22:18 UTC

IO Exception with XmlRpcClient

Hi all,
This is for version 1.0 downloaded from xml.apache.org.
I am trying to run both client and server on the same machine--and it works
fine
When I try to run client on a different machine and then--
I am getting the following stack trace after running execute method
On XmlRpcClient:
IO Exception: Operation timed out: connect
java.io.IOException: Operation timed out: connect
        at org.apache.xmlrpc.XmlRpcClient$Worker.execute(Unknown Source)
        at org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source)
        at
com.egain.bupawrapper.client.KnowledgeClient.main(KnowledgeClient.jav
a:29)

On XmlRpcClientLite:
IO Exception: Operation timed out: connect
java.net.ConnectException: Operation timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at
org.apache.xmlrpc.XmlRpcClientLite$HttpClient.initConnection(Unknown
Source)
        at org.apache.xmlrpc.XmlRpcClientLite$HttpClient.<init>(Unknown
Source)
        at org.apache.xmlrpc.XmlRpcClientLite$LiteWorker.execute(Unknown
Source)

        at org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source)
        at
com.egain.bupawrapper.client.KnowledgeClient.main(KnowledgeClient.jav
a:29)

thanks a lot for your help
Cheers


here's the code for reference.
package com.egain.bupawrapper.client;

import java.io.IOException;
import java.util.Vector;
import java.util.Enumeration;

import org.apache.xmlrpc.XmlRpc;
import org.apache.xmlrpc.XmlRpcClient;
import org.apache.xmlrpc.XmlRpcClientLite;

import org.apache.xmlrpc.XmlRpcException;
//import com.egain.bupawrapper.server.KnowledgeWrapper;
public class KnowledgeClient {

    public static void main(String args[]) {
        try {
            // Create the client, identifying the server
            XmlRpcClient client =
                new XmlRpcClient("http://slopropcanup.egain.com:8899/");

            // Create the request parameters using user input
            Vector params = new Vector();
            params.addElement("system");//username
            params.addElement("password");//password
            params.addElement("1");//profileID
            params.addElement("1");//languageID

		//String done =
client.execute("knowledgeWrapper.synchronize",params);
			String done = (String) client.execute(new 

String("knowledgeWrapper.synchronize"),params);
			System.out.println(done);

        } catch (IOException e) {
            System.out.println("IO Exception: " + e.getMessage(  ));
	e.printStackTrace();
        } catch (XmlRpcException e) {
            System.out.println("Exception within XML-RPC: " + e.getMessage(
));
	e.printStackTrace();

        }
    }

}

This message is intended solely for the use of the individual or
organisation to whom it is addressed.  It may contain legally privileged or
confidential information.  If you have received this message in error,
please notify the originator immediately.  If you are not the intended
recipient, you should not use, copy, alter, disclose or rely on the contents
of this message.  All information or opinions expressed in this message
and/or any attachments are those of the author and are not necessarily those
of eGain Communications Ltd. or its affiliates.  eGain Communications Ltd.
accepts no responsibility for loss or damage arising from its use, including
damage from viruses or other harmful content.