Reputation: 75
I am using JBoss 5.1.0GA which has the jbossws jars in the common/lib folder. My project relies on a connection to a 3rd party system (via web services). The Encryption and Decryption handlers have been delivered to me as a jar file and looking into the jar file the pom has a dependency on axis libs. We have a wsdd defined to point our client to the correct EncryptionHandler.
The problem is when we attempt to make a request on the web service the EncryptionHandler throws the following error:-
Caused by: java.lang.ClassCastException: org.jboss.ws.core.soap.SOAPMessageImpl cannot be cast to org.apache.axis.Message 10:06:15,935 ERROR [STDERR] at org.apache.axis.MessageContext.setMessage(MessageContext.java:648)
It seems that when the EncryptionHandler attempts to create the Message the jbossws lib is being used rather than the Axis lib that is included in our pom (and also in the server lib within jboss).
How can I stop the project picking up the jbossws jar and use the axis one instead? we do not have jbossws as a dependency in the pom.
Upvotes: 1
Views: 1153
Reputation: 11
You should be able to deploy the Axis lib to $JBoss_Home\lib\endorsed\ which would then take precedence over the JBoss libs. Though there may be other carry-on effects with this depending upon what other JBoss WS related functions are being used.
Upvotes: 1