We are working with tomcat + axis2 + POJO for web service implementation, and we encountered some issues with POJO and axis2 that are a show stopper for us. It seems that axis2 and POJO implementation of SOAP parsing ignores the names of the xml elements and just assign values to the arguments according to the order of the xml elements in the SOAP message. This thing causes a lot of problems in complex APIs.
After some swimming in the documentation swamp of axis2 I was more confused then I came in, so I really need some help.
I understand that JAX-WS and axis2 doesn't have those issues (correct me if I'm wrong), but I can't seem to know how to develop and deploy such solution.
I wrote a POJO, and annotated it with the JAX-WS annotations, I executed wsgen on the class, and packed all in an aar file along with this services.xml file:
<service name="TESTService" >
<description>
TEST web service
</description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver" />
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass">com.test.WsdlImpl</parameter>
</service>
When I try to execute a web service call I get an exception in tomcat:
[ERROR] The service class cannot be found for this AxisService. java.lang.RuntimeException: The service class cannot be found for this AxisService. at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:95) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)
Please help me by explaining how to deploy a JAX-WS with tomcat + axis2 (if CXF works with tomcat I can use it also), or direct me to a GOOD tutorial that covers tomcat+axis2.
Thanks!!