1 Reply Latest reply on Aug 25, 2016 6:47 AM by massimiliano.masi

    Endorsing XML implementations

    massimiliano.masi

      Hi All,

       

      I have an issue with java8 wilfdly 9 and the XML implementation. I use saaj and opensaml (2.6.1). Saaj seems to use by default

       

       

      com.sun.xml.messaging.saaj.soap.impl.ElementImpl implemented as com.sun.org.apache.xerces.internal.dom.DOMImplementationImpl.

      Opensaml, instead, uses  org.apache.xerces.dom.DOMImplementationImpl. Now, I receive a ClassCast from xerces, when I try to adopt a node

      to opensaml from the envelope being handled by saaj. Specifically:

       

      2016-08-09 17:46:38,515 INFO  [stdout] I got an exception. My implementation is: class org.apache.xerces.dom.NodeImplfrom: jar:file:/opt/bin/jboss1/modules/system/layers/base/com/app/main/xercesImpl-debug.2.9.1.jar!/

      2016-08-09 17:46:38,515 INFO  [stdout] Their implementation is: class com.sun.xml.messaging.saaj.soap.impl.ElementImplfrom: vfs:/opt/conf/jboss1/deployments/App.ear/lib/saaj-impl.jar

      2016-08-09 17:46:38,515 ERROR [stderr] java.lang.ClassCastException: com.sun.xml.messaging.saaj.soap.impl.ElementImpl cannot be cast to org.apache.xerces.dom.NodeImpl

       

       

      Before, in jboss 4 I solved this issue by placing the libraries into jboss/lib/endorsed. Now it seems that the endorsing mechanism is not available anymore.

       

      Any hints on solving the issue?

       

      Thanks in advance!