If you need tu use Axis-1.4 and wss4j-1.5 with Jboss 7, you could have some runtime exceptions with xmlsec because wss4j-1.5 needs xmlsec-1.4.2 and Jboss has xmlsec-1.5.1 in its classpath and it won’t use your application jar but the one inside Jboss modules.
I must use these versions of Axis and Wss4j because I needed to use Alfresco SOAP API which is based on these components.
after several hours spent trying to override and configure Jboss classpath with the “jboss-deployment-structure.xml” file, as explained in this post for example, nothing eventually worked for me.
So finally, I tried a very bad solution :
- stop JBoss
- remove the xmlsec-1.5.1.jar which is in the modules/org/apache/santuario/xmlsec/main/ folder
- copy the xmlsec-1.4.2.jar file inside this folder
- rename xmlsec-1.4.2.jar by xmlsec-1.5.1.jar so that Jboss indexes on its jars don’t crash.
- start JBoss
So far, I have everything working, and did not notice any side effect of this xmlsec replacement. Note :
- I only use JBoss to deploy a WAR which basicaly runs with Spring 3, JPA 2 and use the Alfresco SOAP API.
- I use the JBoss console to deploy / undeploy my WAR files
If someone managed to find a better solution, or knows which side effects we could have by doing this, that would be interesting.