You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Daniel Obuba <da...@gmail.com> on 2014/01/20 18:07:46 UTC
Issue with XMLRPC client
Hello All,
Please i have an issue with my xmlrpc client. I get an
"org.apache.xmlrpc.client.XmlRpcHttpTransportException: HTTP server
returned unexpected status: Invalid protocol version Not defined" exception
when i run the client. Please find client code and exception trace below:
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL("http://172.24.132.50:10010/Air"));
config.setBasicUserName("xxxxx");
config.setBasicPassword("xxxxx");
logger.info("Connecting to air server: " +
config.getServerURL());
final XmlRpcClient client = new XmlRpcClient();
XmlRpcCommonsTransportFactory transportFactory = new
XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(transportFactory);
client.setConfig(config);
logger.info("Assigning request parameters...");
HashMap<String, Object> requestHash = new HashMap<String,
Object>();
requestHash.put("originNodeType", getOriginNodeType());
requestHash.put("originHostName", getOriginHostName());
requestHash.put("externalData1", getExternalData1());
requestHash.put("originTransactionID",
Utilities.getTransactionId());
requestHash.put("originTimeStamp",
Utilities.getISO8601DateTime());
requestHash.put("subscriberNumber", getSubscriberNumber());
Vector<Object> params = new Vector<Object>();
params.addElement(requestHash);
logger.info("Sending request : " + request);
result = (HashMap<String,
String>)client.execute("GetAccountDetails", params);
Exception trace:
org.apache.xmlrpc.client.XmlRpcHttpTransportException: HTTP server returned
unexpected status: Invalid protocol version Not defined
at
org.apache.xmlrpc.client.XmlRpcCommonsTransport.checkStatus(XmlRpcCommonsTransport.java:261)
at
org.apache.xmlrpc.client.XmlRpcCommonsTransport.getInputStream(XmlRpcCommonsTransport.java:119)
at
org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:152)
at
org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
at
org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
Please any help will be highly appreciated as i have been battling with
this issue for a while now.
Thanks & Regards,
Daniel Obuba