Pages

Monday, August 18, 2014

Jboss5 trouble getting data from SOAP webservice, empty response

We have been on Jboss 4.2 eap for aeons and have finally decided to upgrade to Jboss 5.2.
One of the applications made a Webservice call to a thirdparty SOAP webservice.

Everything looked good in the logs until we made that webservice call and looked at the results.
No matter what we send in the request the response would come back null.

We used a standalone client to test the webservice call, and that worked fine ,we were getting the required response back, this test narrowed it down to Jboss5.2 jars.

There are a gazillion posts on resolving the issue with SOAP webservice calls wrt Jboss5.2.
Some talked about saaj-api.jar, some about including a jboss-classloading.xml to eliminate the usage of jboss5 jars.

The following solution looked most promising:
http://forum.spring.io/forum/spring-projects/web-services/86570-webservice-request-is-empty
But for some reason that would not work either.

Finally what worked was:
1. Deleting  jboss-as\server\<INSTANCE_NAME>\deployers\jbossws.deployer 
2. Making sure all the required jars are bundled in with our application. (Please see below for the entire list)

Now we did not have to delete the entire folder to get it working, just deleting 
the jbossws-native-core.jar  did the trick.
jbossws-native-core.jar has org.jboss.ws.core.soap.MessageFactoryImpl, which was being used by 
org.springframework.ws.soap.saaj.SaajSoapMessageFactory and that was causing all the trouble.



But just deleting the just the jar resulted in some scary looking deploy errors in the log on startup.
That did not affect the application, however we preferred to keep the log cleaner. Since, we did not care for  jbossws.deployer anyways we deleted the entire folder.

Jars that we bundled in with the application. Please note some of them are unique to our application ex. castor jars etc., but you get the general idea, right ???