Eric,

How are you genertaing your client stub and classes? From WSDL? 
What does the WSDL look like?
How did you generate the WSDL?

William


> -----Original Message-----
> From: Eric Chow [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, 29 August 2006 1:43 PM
> To: Axis User List
> Subject: [***POSSIBLE SPAM***] - Return a JavaBean in Axis2 - 
> Bayesian Filter detected spam
> 
> Hello,
> 
> How can I return a JavaBean class in Axis2 web service ?
> I wrote a simple service and client with Axis2 but failed and 
> showed the following exceptions. The following is my codes:
> 
> package test.service;
> 
> /**
>  * EchoService.java
>  *
>  * @author Chao Hoi Ka, Eric
>  *
>  */
> public class EchoService {
>       public User echo(User u) {
>               System.out.println("Receive: " + u.getName());
>               
>               u.setName(u.getName() + "...BACKED");
>               
>               return u;
>       }
> }
> 
> 
> 
> package test.service;
> 
> import java.util.Date;
> 
> /**
>  * User.java
>  *
>  * @author Chao Hoi Ka, Eric
>  *
>  */
> public class User {
>       private String name;
>       private Date birth;
>       public Date getBirth() {
>               return this.birth;
>       }
>       public void setBirth(Date birth) {
>               this.birth = birth;
>       }
>       public String getName() {
>               return this.name;
>       }
>       public void setName(String name) {
>               this.name = name;
>       }               
> }
> 
> 
> 
> 
> <?xml version="1.0" ?>
> <service>
>       <parameter name="ServiceClass"
> locked="false">test.service.EchoService</parameter>
>       <operation name="echo">
>               <messageReceiver 
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>       </operation>
> </service>
> 
> 
> 
> 
> 
> log4j:WARN No appenders could be found for logger 
> (org.apache.axiom.om.impl.builder.StAXOMBuilder).
> log4j:WARN Please initialize the log4j system properly.
> Exception in thread "main" org.apache.axis2.AxisFault: 
> namespace mismatch require http://service.test/xsd found http:///xsd
>       at 
> org.apache.axis2.description.OutInAxisOperationClient.execute(
> OutInAxisOperation.java:287)
>       at test.client.EchoserviceStub.echo(EchoserviceStub.java:133)
>       at test.client.Client.main(Client.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.AxisFault: 
> namespace mismatch require http://service.test/xsd found http:///xsd
>       at 
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusine
> ssLogic(RPCMessageReceiver.java:89)
>       at 
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.re
> ceive(AbstractInOutSyncMessageReceiver.java:37)
>       at 
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
>       at 
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTP
> PostRequest(HTTPTransportUtils.java:284)
>       at 
> org.apache.axis2.transport.http.HTTPWorker.processRequest(HTTP
> Worker.java:255)
>       at 
> org.apache.axis2.transport.http.server.SimpleConnectionThread.
> run(SimpleConnectionThread.java:92)
>       at 
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecu
> tor$Worker.runTask(ThreadPoolExecutor.java:650)
>       at 
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecu
> tor$Worker.run(ThreadPoolExecutor.java:675)
>       at java.lang.Thread.run(Thread.java:595)
> 
>       at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
>       ... 3 more
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to