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

List:       xmlrpc-user
Subject:    RE: Why XmlRpcClient cannot find org/apache/ws/commons/util/XsDat
From:       "Han, Zhi (Zhi)" <zhihan () lucent ! com>
Date:       2006-05-30 12:35:18
Message-ID: 31C0F08B0D18D511ACC800508BAE7B4708EB2732 () ci0026exch001u ! bj ! lucent ! com
[Download RAW message or body]

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> 





[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1515" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=955113312-30052006><FONT face="Courier New" 
color=#008080>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=955113312-30052006><FONT face="Courier New" 
color=#008080></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=955113312-30052006><FONT face="Courier New" color=#008080>This 
copy works fine, while the one downloaded from <A 
href="http://www.apache.org/dyn/closer.cgi/ws/">http://www.apache.org/dyn/closer.cgi/ws/</A>&nbsp;is \
 not good. :-(</FONT></SPAN></DIV>
<BLOCKQUOTE>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Shahid Faiz 
  [mailto:shahid.faiz@gmail.com]<BR><B>Sent:</B> 2006&#24180;5&#26376;30&#26085; \
20:32<BR><B>To:</B>   xmlrpc-user@ws.apache.org<BR><B>Subject:</B> Re: Why \
XmlRpcClient cannot find   org/apache/ws/commons/util/XsDateTim \
eFormat<BR><BR></FONT></DIV>  <DIV>Hi Zhi,</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>You will have to add <STRONG>ws-commons-util.jar </STRONG>file in your 
  classpath. You can find this file at following URL,</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><A onclick="return top.js.OpenExtLink(window,event,this)" 
  href="http://cvs.apache.org/maven-snapshot-repository/org/apache/ws/commons/ws-commons-util/1.0-SNAPSHOT/" \
  target=_blank>http://cvs.apache.org/maven-snapshot-repository/org/apache/ws/commons/ws-commons-util/1.0-SNAPSHOT/ \
  </A></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Hope this will help you.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Regards</DIV>
  <DIV>Shahid</DIV>
  <DIV><BR><BR>&nbsp;</DIV>
  <DIV><SPAN class=gmail_quote>On 5/30/06, <B class=gmail_sendername>Han, Zhi 
  (Zhi)</B> &lt;<A onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:zhihan@lucent.com" target=_blank>zhihan@lucent.com</A> &gt; 
  wrote:</SPAN> 
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I \
  write a simple test code to test rpc,<BR><BR>import 
    org.apache.xmlrpc.client.XmlRpcClient;<BR>import 
    org.apache.xmlrpc.client.XmlRpcClientConfigImpl ;<BR><BR>public class 
    MyXmlRpcClient {<BR>&nbsp;&nbsp; public static void main(String 
    args[]){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    try{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    XmlRpcClientConfigImpl config = new 
    XmlRpcClientConfigImpl();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  config.setServerURL(new<BR>java.net.URL ("<A 
    onclick="return top.js.OpenExtLink(window,event,this)" 
    href="http://135.220.76.156:38080/servlet/xmlrpc" 
    target=_blank>http://135.220.76.156:38080/servlet/xmlrpc</A>"));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  XmlRpcClient client = new XmlRpcClient(); 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    client.setConfig(config);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  Object[] params = new Object[]{new Integer(33), new Integer(9)}; 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Integer 
    result = (Integer) 
    client.execute("Calculator.add",<BR>params);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  } <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch(Exception 
    e){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    e.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    }<BR>&nbsp;&nbsp; }<BR>}<BR><BR>But when I try to run it, I always got error 
    <BR>Exception in thread "main" 
    java.lang.NoClassDefFoundError:<BR>org/apache/ws/commons/util/XsDateTimeFormat 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    at<BR>org.apache.xmlrpc.serializer.DateSerializer.&lt;clinit&gt;(DateSerializer.java:29)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  at<BR>org.apache.xmlrpc.common.TypeFactoryImpl.&lt;clinit&gt;(TypeFactoryImpl.java:70)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  at<BR>org.apache.xmlrpc.common.XmlRpcController 
    .&lt;init&gt;(XmlRpcController.java:28)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    at<BR>org.apache.xmlrpc.client.XmlRpcClient 
    .&lt;init&gt;(XmlRpcClient.java:50)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    at MyXmlRpcClient.main(MyXmlRpcClient.java:10)<BR><BR>I include packages 
    xmlrpc-3.0a1.jar and 
    ws-commons-util-1.0.jar<BR><BR>Thanks,<BR><BR>Zhi<BR><BR>--------------------------------------------------------------------- \
  <BR>To unsubscribe, e-mail: <A 
    onclick="return top.js.OpenExtLink(window,event,this)" 
    href="mailto:xmlrpc-user-unsubscribe@ws.apache.org" 
    target=_blank>xmlrpc-user-unsubscribe@ws.apache.org</A><BR>For additional 
    commands, e-mail: <A onclick="return top.js.OpenExtLink(window,event,this)" 
    href="mailto:xmlrpc-user-help@ws.apache.org" 
    target=_blank>xmlrpc-user-help@ws.apache.org 
  </A><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>



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

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