I was having problem with my webservice client generated by wsimport on jBoss 4.2.2. Finally with the help of my boss i fixed it and hopefully will help somebody encountered the same issue as me or myself in the future.
I did not know what exactly was happening as seems the exception was suppressed and could not be seen in the catch cause. But fixing it I actually was just copying library into jboss-4.2.2GA\lib\endorsed.
1. Download JAX-WS 2.6 and copy below files:
- Gmbal-api-only.jar
- Jaxb-api.jar
- Jaxb-impl.jar
- Jaxws-api.jar
- Jaxws-rt.jar
- Policy.jar
- Stax-ex.jar
- Streambuffer.jar
into jboss-4.2.2GA\lib\endorsed. (Please refer to https://developer.jboss.org/thread/214201?tstart=0)
2. Copy below files:
- jboss-jaxrpc.jar
- jboss-jaxws.jar
- jboss-saaj.jar
into jboss-4.2.2GA\lib\endorsed. (Please refer to http://leakfromjavaheap.blogspot.hk/2013/03/jboss-422-ga-to-jdk-7-or-jdk-6-migration.html)
After copying the jars the client works but I am having:
com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Server did not recognize the value of HTTP Header SOAPAction: . Please see the server log to find more detail regarding exact cuase of the failure.
When calling webservice when using service dispatch.
So I started to check what exactly was sending to the server.
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
(Please refer to: http://stackoverflow.com/questions/1945618/tracing-xml-request-responses-with-jax-ws)
And finally found that my SoapRequest is supplying "" in its header.
Comments