Hi everybody,
i´m doing my best to run a client code but ..(I must be a little stupid perhaps), my problem is that I had to fix these errors (I suppose) to reach my status, what I´ve done different for the manual is the folowing:
- renaming the class Axis2SampleDocLitPortTypeStub to Axis2SampleDocLitService
-calling the client generator(w2j) with the option -d xmlbeans
-including some packages in the client
-change the code to reach the service name ... new Axis2SampleDocLitServiceStub(null, "
http://localhost:8080/axis2/services/Axis2SampleDocLitService")
-generate the .aar file including the .wsdl in the meta-inf directory (if not, the service did not return wsdl in Tomcat (in OC4J there is not way)). By the way, someone knows why is this?
After all that I run my code (in the bottom of th email) and I obtain the following errors:
org.apache.axis2.AxisFault: null; nested exception is:
java.lang.UnsupportedOperationException
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java
:287)
at org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:481)
at ClientAxis2.main(ClientAxis2.java:19)
Caused by: java.lang.Exception: org.apache.axis2.AxisFault: null; nested exception is:
java.lang.UnsupportedOperationException
at org.apache.axis2.AxisFault.makeFault
(AxisFault.java:318)
at org.apache.axis2.userguide.Axis2SampleDocLitServiceMessageReceiverInOut.invokeBusinessLogic(Axis2SampleDocLitServiceMessageReceiverInOut.java
:104)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:504)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest
(HTTPTransportUtils.java:284)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsupportedOperationException
at org.apache.axis2.userguide.Axis2SampleDocLitServiceSkeleton.echoString
(Axis2SampleDocLitServiceSkeleton.java:56)
at org.apache.axis2.userguide.Axis2SampleDocLitServiceMessageReceiverInOut.invokeBusinessLogic(Axis2SampleDocLitServiceMessageReceiverInOut.java
:88)
... 20 more
at org.apache.axis2.AxisFault
.<init>(AxisFault.java:159)
... 3 more
As everybody can see I am lost, anyone could help me, please,please??
Code for the Axis2Client:
import org.apache.axis2.userguide.xsd.*;
import org.apache.axis2.userguide.*;
public class ClientAxis2 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
//Create the stub by passing the AXIS_HOME and target EPR.
//We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME
Axis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null,
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
//Create the request document to be sent.
EchoStringParamDocument reqDoc= EchoStringParamDocument.Factory.newInstance
();
reqDoc.setEchoStringParam("Axis2 Echo");
//invokes the Web service.
EchoStringReturnDocument resDoc=stub.echoString(reqDoc);
System.out.println(resDoc.getEchoStringReturn());
} catch (Exception e) {
e.printStackTrace();
}
}
}
- error testing Axis2SampleDocLitService from Axis2 ... Carlos Prendes Espinosa
- [Axis2] error testing Axis2SampleDocLitServic... Carlos Prendes Espinosa
