アプリで Spring Web サービスと Axis2 の両方を使用しています。それらは完全に独立しており、Spring WebServiceTemplate が以下の例外をスローし始めたことを除いて、うまく機能します..
Spring が saaj.jar (javax.xml.soap.SOAPElement を含む) を必要とし、Axis2 が axiom-dom.jar (org.apache.axiom.om.impl.dom.ElementImpl を含む) を必要とするために発生していると思われます。
どちらのインターフェースも org.w3c.dom.Element を拡張し、どういうわけか Spring が axiom-dom.jar からのものを拾い上げます
おそらく axiom-dom.jar を z-axiom-dom.jar に名前変更する以外に、Spring が実行時に間違った実装を選択するのを防ぐために私ができることについてのアイデアはありますか?
com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: java.lang.ClassCastException: org.apache.axiom.om.impl.dom.ElementImpl は javax.xml.soap.SOAPElement にキャストできません org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor.secureMessage(XwsSecurityInterceptor.java:139) で org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleRequest(AbstractWsSecurityInterceptor.java:179) で org.springframework.ws .client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:542) で org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502) で org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive (WebServiceTemplate.java:351) org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:341) で