2023-09-13, Wednesday, Cloudy

新工上遇上了挫折。寫好的東西達不到標準需要別人執手尾了。雖然同事說沒關係,但反應了自己的不足。有時反省自己為何做事總是不好,為何別人有留意或想到的事情自己總是忽略。現在覺得是自己天生的思考模式問題,可能看多少書都沒用。或者自己應該更適合做地盤呢類工作,而唔係IT。

wsimport on jBoss 4.2.2

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:

  1. Gmbal-api-only.jar 
  2. Jaxb-api.jar 
  3. Jaxb-impl.jar 
  4. Jaxws-api.jar 
  5. Jaxws-rt.jar 
  6. Policy.jar 
  7. Stax-ex.jar 
  8. Streambuffer.jar


into jboss-4.2.2GA\lib\endorsed. (Please refer to https://developer.jboss.org/thread/214201?tstart=0)

2. Copy below files:


  1. jboss-jaxrpc.jar 
  2. jboss-jaxws.jar 
  3. 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

Popular posts from this blog

Install Apache Superset on Ubuntu 18.04

生的感覺、死的感覺

2023-03-18, Saturday, Sunny