Hi Yong Miao, I did as u said.But when I ran the Client,there was an error like this: E:\>java hello.Client me Exception in thread "main" java.lang.AbstractMethodError at org.apache.soap.util.xml.QName.<init>(QName.java:80) at org.apache.soap.util.xml.QName.matches(QName.java:146) at org.apache.soap.Envelope.unmarshall(Envelope.java:237) at org.apache.soap.rpc.Call.invoke(Call.java:230) at hello.Client.main(Client.java:50) And my classpath=$TOMCAT_HOME;$JAVA_HOME\lib\dt.jar;$JAVA_HOME\lib\tools.jar;%TOMCAT_HOME%\lib\soap.jar;%TOMCAT_HOME%\lib\jsse.jar;%TOMCAT_HOME%\lib\jasper.jar;%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME%\lib\jcert.jar;%TOMCAT_HOME%\lib\jnet.jar;%TOMCAT_HOME%\lib\MAIL.jar;%TOMCAT_HOME%\lib\xerces.jar;%TOMCAT_HOME%\lib\parser.jar;%TOMCAT_HOME%\lib\webserver.jar;%TOMCAT_HOME%\lib\activation.jar;. The attachment is Client.java. ======= 2002-05-15 您在来信中写道:======= >Take two steps: >(1) make sure the soap.jar in _HOME/lib. >(2) remove _HOME/webapps/soap/WEB-INF/classes.org > >And restart tomcat. It should work. > >Regards, >----------------------------- >Yong Miao >[EMAIL PROTECTED] >----------------------------- > >-----Original Message----- >From: amy [mailto:[EMAIL PROTECTED]] >Sent: Monday, May 13, 2002 10:00 AM >To: [EMAIL PROTECTED] >Subject: Re: Re: a problem of "no signature match" > >Jindra Havlik, > I checked the 2 aspects that u said,and they are right. >But the problem still appears. > > >======= 2002-05-14 您在来信中写道:======= > >>Hi, >> >>1. chceck that Tomcat know where your *.class files for this demo are > >path >>to this files should be in CLASSPATH befor you run TOMCAT >> >>2. Check that your application is deployed on Server >>http://localhost:8080/soap/admin - list >> >>----- Original Message ----- >>From: "amy" <[EMAIL PROTECTED]> >>To: "soap user" <[EMAIL PROTECTED]> >>Sent: Tuesday, May 14, 2002 9:19 AM >>Subject: a problem of "no signature match" >> >> >>> hi,I am green on soap and need ur help. >>> >>> My platform: >>> Tomcat 3.2.1 >>> Apache soap 2.2 >>> JDK 1.3.1 >>> Win2000 >>> >>> I wrote a simple service as followed: >>> package hello; >>> public class HelloServer >>> { >>> public String sayHelloTo(String name) >>> { >>> System.out.println("sayHelloTo(String name)"); >>> return "Hello " + name + ", How are you doing?"; >>> } >>> } >>> >>> The client code are showed below: >>> >>> package hello; >>> >>> import java.net.URL; >>> import java.util.Vector; >>> import org.apache.soap.SOAPException; >>> import org.apache.soap.Constants; >>> import org.apache.soap.Fault; >>> import org.apache.soap.rpc.Call; >>> import org.apache.soap.rpc.Parameter; >>> import org.apache.soap.rpc.Response; >>> >>> public class Client >>> { >>> public static void main(String[] args) throws Exception >>> { >>> if(args.length == 0) >>> { >>> System.err.println("Usage: java hello.Client [SOAP-router-URL] >>"); >>> System.exit (1); >>> } >>> >>> try >>> { >>> URL url = null; >>> String name = null; >>> if(args.length == 2) >>> { >>> url = new URL(args[0]); >>> name = args[1]; >>> } >>> else >>> { >>> url = new >URL("http://localhost:8080/soap/servlet/rpcrouter"); >>> name = args[0]; >>> } >>> >>> // Build the call. >>> org.apache.soap.rpc.Call call = new org.apache.soap.rpc.Call(); >>> call.setTargetObjectURI("urn:Hello"); >>> call.setMethodName("sayHelloTo"); >>> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); >>> Vector params = new Vector(); >>> params.addElement(new Parameter("name", String.class, name, >>null)); >>> call.setParams(params); >>> >>> // Invoke the call. >>> Response resp = null; >>> try >>> { >>> resp = call.invoke(url, ""); >>> } >>> catch( SOAPException e ) >>> { >>> System.err.println("Caught SOAPException (" + >e.getFaultCode() >>+ "): " + e.getMessage()); >>> System.exit(-1); >>> } >>> >>> // Check the response. >>> if( !resp.generatedFault() ) >>> { >>> Parameter ret = resp.getReturnValue(); >>> Object value = ret.getValue(); >>> System.out.println(value); >>> } >>> else >>> { >>> Fault fault = resp.getFault(); >>> System.err.println("Generated fault: "); >>> System.out.println (" Fault Code = " + >>fault.getFaultCode()); >>> System.out.println (" Fault String = " + >>fault.getFaultString()); >>> } >>> } >>> catch(Exception e) >>> { >>> e.printStackTrace(); >>> } >>> } >>> } >>> >>> And I deployed my service on apache soap.Here is my problem when I ran >it: >>> E:\>java hello.Client me >>> Generated fault: >>> Fault Code = SOAP-ENV:Server >>> Fault String = Exception while handling service request: >>hello.HelloServer.say >>> HelloTo(java.lang.String) -- no signature match >>> >>> I checked it my code and service,and they were all right.I am confused >>about this problem. >>> Any help will grateful! >>> >>> Sincerely >>> >>> ??????????????amy >>> ??????????????[EMAIL PROTECTED] >>> ?????????????????2002-05-14 >>> > >= = = = = = = = = = = = = = = = = = = = > > > 致 >礼! > > amy > [EMAIL PROTECTED] > 2002-05-14 = = = = = = = = = = = = = = = = = = = = 致 礼! amy [EMAIL PROTECTED] 2002-05-16
Client.java
Description: Binary data