We work with Tomcat + Axis2 + POJO to implement web services, and we are faced with some problems with POJO and Axis2, which showstopper is for us. It seems that the Axis2 and POJO SOA analysis implementation ignores the XML element names and simply assigns values โโto the arguments according to the order of the XML elements in the SOAP message. This problem causes many problems in complex APIs.
After some swimming in the Axis2 documentary swamp, I was more confused, then I walked in, so I really need help.
I understand that JAX-WS and Axis2 do not have these problems (correct me if I am wrong), but I cannot figure out how to develop and deploy such a solution.
I wrote POJO and annotated it with JAX-WS annotations, I executed wsgen in the class and packed everything into 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 make 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 data)
at org.apache.tomcat.util.net.JIoEndpoint $ Worker.run (JIoEndpoint.java:447)
at java.lang.Thread.run (Unknown Source)
Please help me explain how to deploy JAX-WS with Tomcat + Axis2 (if CXF works with Tomcat, I can also use it) or refer me to the GOOD tutorial that covers Tomcat + Axis2.
Thanks!!
source share