ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Han, Zhi (Zhi)" <zhi...@lucent.com>
Subject RE: Why XmlRpcClient cannot find org/apache/ws/commons/util/XsDat eTim eFormat
Date Tue, 30 May 2006 12:35:18 GMT
Thanks,
 
This copy works fine, while the one downloaded from
http://www.apache.org/dyn/closer.cgi/ws/
<http://www.apache.org/dyn/closer.cgi/ws/>  is not good. :-(

-----Original Message-----
From: Shahid Faiz [mailto:shahid.faiz@gmail.com]
Sent: 2006?5?30? 20:32
To: xmlrpc-user@ws.apache.org
Subject: Re: Why XmlRpcClient cannot find
org/apache/ws/commons/util/XsDateTim eFormat


Hi Zhi,
 
You will have to add ws-commons-util.jar file in your classpath. You can
find this file at following URL,
 
http://cvs.apache.org/maven-snapshot-repository/org/apache/ws/commons/ws-com
mons-util/1.0-SNAPSHOT/
<http://cvs.apache.org/maven-snapshot-repository/org/apache/ws/commons/ws-co
mmons-util/1.0-SNAPSHOT/> 
 
 
Hope this will help you.
 
Regards
Shahid


 
On 5/30/06, Han, Zhi (Zhi) < zhihan@lucent.com <mailto:zhihan@lucent.com>  >
wrote: 

I write a simple test code to test rpc,

import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl ;

public class MyXmlRpcClient {
   public static void main(String args[]){
       try{
           XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
           config.setServerURL(new
java.net.URL (" http://135.220.76.156:38080/servlet/xmlrpc
<http://135.220.76.156:38080/servlet/xmlrpc> "));
           XmlRpcClient client = new XmlRpcClient(); 
           client.setConfig(config);
           Object[] params = new Object[]{new Integer(33), new Integer(9)}; 
           Integer result = (Integer) client.execute("Calculator.add",
params);
       } 
       catch(Exception e){
           e.printStackTrace();
       }
   }
}

But when I try to run it, I always got error 
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/ws/commons/util/XsDateTimeFormat 
       at
org.apache.xmlrpc.serializer.DateSerializer.<clinit>(DateSerializer.java:29)
       at
org.apache.xmlrpc.common.TypeFactoryImpl.<clinit>(TypeFactoryImpl.java:70)
       at
org.apache.xmlrpc.common.XmlRpcController .<init>(XmlRpcController.java:28)
       at
org.apache.xmlrpc.client.XmlRpcClient .<init>(XmlRpcClient.java:50)
       at MyXmlRpcClient.main(MyXmlRpcClient.java:10)

I include packages xmlrpc-3.0a1.jar and ws-commons-util-1.0.jar

Thanks,

Zhi

--------------------------------------------------------------------- 
To unsubscribe, e-mail: xmlrpc-user-unsubscribe@ws.apache.org
<mailto:xmlrpc-user-unsubscribe@ws.apache.org> 
For additional commands, e-mail: xmlrpc-user-help@ws.apache.org
<mailto:xmlrpc-user-help@ws.apache.org> 





Mime
View raw message