title: How can I exclude jbossws libs (in Jboss 5.1.x common/lib) from being loaded by my project?
body: <p>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. </p>
  
  <p>The problem is when we attempt to make a request on the web service the EncryptionHandler throws the following error:-</p>
  
  <p>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)</p>
  
  <p>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). </p>
  
  <p>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. </p>