Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Download Axis2 1.6.2

197 views
Skip to first unread message

Penelope Belkowski

unread,
Jan 3, 2024, 1:53:40 AM1/3/24
to
Another thing that I feel I should mention is that, this web service will work if I change the axis version in CF Admin>Web Services to version 1. But This isn't an option because when I do this on production more web services break. This leads me to believe that its some other configuration within the axis2.xml.



download axis2 1.6.2

Download https://t.co/k0ORngtcW3






I have embedded an axis2 webservice into a web application of mine. It works great as long as I don't need to specify the location of axis2.xml (i.e. if everything is left default for axis2 initialization).


However, I now need to modify the transporter to use my SOAP webservice over https. For this, I have 1) copied the axis2.xml file of a standalone axis2 distribution and stripped a lot of things from it and 2) modified my web.xml file like this after a lot of trials & error:


Apparently, not specifying the path and putting the file inside WEB-INF/conf/axis2.xml is enough to make it work. It might not have worked in the first place because my axis2.xml was not complete/valid.


Error message:-

log4j:WARN No appenders could be found for logger (org.apache.axis2.description.AxisOperation).log4j:WARN Please initialize the log4j system properly.org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method TestInsert at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at org.apache.ws.axis2.STStub.testInsert(STStub.java:1443) at org.apache.ws.axis2.WSTSample2.main(WSTSample2.java:33)


According to this page, all I really need to do to enable my service for connections via SSL is to update the axis2.xml file and include a new "transportReceiver" node for HTTPS. I did that and regenerated my client code to use the secure endpoint. It doesn't work.






[INFO] Listening on port 8443 [ERROR] Terminating connection listener org.apache.axis2.transport.http.server.DefaultConnectionListener 16d60567 after 10retries in 0 seconds. java.net.BindException: Address already in use: JVM_Bind at java.net.DualStackPlainSocketImpl.bind0(Native Method) at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source) at java.net.AbstractPlainSocketImpl.bind(Unknown Source) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at org.apache.axis2.transport.http.server.DefaultConnectionListener.run(DefaultConnectionListener.java:80) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)


I have tried changing the port number in axis2.xml (for example, to 8445), and that sort of works. The server is able to start cleanly, but eventually, the same errors start showing up. For example, when I retrieve the WSDL, I see the error via the console (though the WSDL does show up). Also, if I try to actually use the service when on port 8445, I get the following error:


org.apache.axis2.AxisFault: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


But for a specific question... What, exactly, am I doing when I set the transportReceiver nodes in axis2.xml? Am I telling it what ports Tomcat is running on and that it should use, or does Axis2 have its own servers that will start on those ports? It seems to be the latter, but that doesn't make a whole lot of sense to me.


The correct way to configure the servlet transport is described in the Axis2 documentation. The symptoms you are describing suggest that you have a transportReceiver that refers to org.apache.axis2.transport.http.SimpleHTTPServer. Please also make sure that you use a recent version of Axis2 (1.5.6 or 1.6.1).


Its no needed to use the last version of Eclipse, only install axis2 and then configure the environment. I installed axis2 version "axis2-1.6.4", then my project was created successfully. The system is looking for axis2 binaries.


Having the wsdl you can use the axis2-maven wsdl2code plugin to develop the WSS (web service server-side). This plugin in the version 2.6.0 only generates the source code of your server, but you need to host this code inside an axis2-war distribution or as an aar component.


Having the wsdl you can use again the axis2-maven wsdl2code plugin to generate the WSC (web service client-side). You can specify in the plugin instruction that you want to generate the test code. You can use mvn generate-sources to generate the client stub, move the generated sources and modify the test.


My code actually compiled with AXIS2 1.6.1 and deployed the same in WAS 8.5.5.2. I am getting below classcast exceptions. What could your suggestions to resolve this issue. I thought there is problem with different versions of axis2 while compiling and deploying. I am not able to know what version of axis2 shipped with websphere 8.5.5.2.


1) Part of code which uses Axis was compiled against AXIS2 1.6.1 version and generated war was deployed in WAS 8.5.5.2 with no libraires in WAR. Got classNotFoundException for org.apache.axiom.util.stax.XMLStreamWriterUtils. Added org.apache.axis2.jar located in plugins in shared libraries and attached to my server war module level. Then class cast exception came.


2) Part of code which uses Axis was compiled against AXIS2 1.6.1 and generated war was deployed in WAS 8.5.5.2 with org.apache.axis2.jar under WEB-INF/libraires in WAR. Then class cast exception came.


I deployed i.e copied the axis2.war file inside the tomcat/webapps directory. Hence whenever tomcat use to restart, it use to extract axis2.war into a folder axis2. But somehow it used to get confused as axis2.war was still there and not been deleted. So after extracting the axis2.war into axis2 folder, deleting the axis2.war file resolved all the issues. Now everything is working fine.


I have had similar problem, axis2 web page was not displaying. Problem was, that i have had axis2.war file id webapps directory, but i also had there axis2 directory. After deleting axis2 directory problem was solved.


This code is working fine in Weblogic as org.apache.cxf.jaxws.DispatchImpl disp object. But in webshpere it is returning org.apache.axis2.jaxws.client.dispatch.JAXBDispatch as disp object and gettingjavax.xml.ws.soap.SOAPFaultException from axis2 while invokeI come to know like websphere plugin folder contains axis2 jars. As default createDispatch method of javax using this jar. How can i change class loading policy or say javax createDispatch to use my cxf jars in ref shared lib folder ??


org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /axis2/services/WebService.WebServiceHttpSoap11Endpoint/ and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.


Well, long googling hours finally yielded a result: adding an (as far as I can see) undocumented configuration parameter to the global axis2.xml config file generates the right working end point urls:

35fe9a5643



0 new messages