Hi,
I found below exception when working with cxfc provider using SAML Token.
Xbean.xml
------
<cxfbc:provider wsdl="classpath:service.wsdl"
locationURI="http://localhost:2000/orderapp/OrderProcess"
service="tns:OrderProcessImplService"
endpoint="OrderProcessPort"
useJBIWrapper="false"
useSOAPEnvelope="false">
<cxfbc:outInterceptors>
<bean id="logout"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
<bean id="saajout"
class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
<bean id="wss4jout"
class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<constructor-arg>
<map>
<entry key="action" value="Signature
SAMLTokenSigned"/>
<entry key="user"
value="myAlias" />
<entry
key="passwordType" value="PasswordText"/>
<entry key="samlPropFile"
value="client_saml.properties"/>
<entry key="signaturePropFile"
value="hub_client_sign.properties"/>
<entry>
<key>
<value>passwordCallbackRef</value>
</key>
<ref bean="passwordCallback"/>
</entry>
<entry
key="enableNamespacePrefixOptimization" value="true"/>
<entry key="disablePrettyXML"
value="true"/>
<entry key="sendXsiTypes"
value="true"/>
<entry key="sendMultiRefs"
value="true"/>
<entry key="sendXMLDeclaration"
value="true"/>
</map>
</constructor-arg>
</bean>
</cxfbc:outInterceptors>
</cxfbc:provider>
ExCEPTION:
--------------
4.3/windows/bbbb/apache-servicemix-4.3.0/data/jbi/wsdl-first-cxf-sa/sus/wsdl-first-cxfbc-su/lib/servicemix-utils-1.4.0.jar,
file:/D:/PICF/servicemix
4.3/windows/bbbb/apache-servicemix-4.3.0/data/jbi/wsdl-first-cxf-sa/sus/wsdl-first-cxfbc-su/lib/stax-api-1.0-2.jar,
file:/D:/PICF/servicemix
4.3/windows/bbbb/apache-servicemix-4.3.0/data/jbi/wsdl-first-cxf-sa/sus/wsdl-first-cxfbc-su/lib/stax2-api-3.0.2.jar,
file:/D:/PICF/servicemix
4.3/windows/bbbb/apache-servicemix-4.3.0/data/jbi/wsdl-first-cxf-sa/sus/wsdl-first-cxfbc-su/lib/woodstox-core-asl-4.0.8.jar,
file:/D:/PICF/servicemix
4.3/windows/bbbb/apache-servicemix-4.3.0/data/jbi/wsdl-first-cxf-sa/sus/wsdl-first-cxfbc-su/lib/xalan-2.7.1.jar,
file:/D:/PICF/servicemix
4.3/windows/bbbb/apache-servicemix-4.3.0/data/jbi/wsdl-first-cxf-sa/sus/wsdl-first-cxfbc-su/lib/xml-apis-1.3.04.jar]
parents=[156.0, BundleDelegatingClassLoader for [WSS4J
(org.apache.ws.security.wss4j)]]] class loader.
17:57:04,468 | DEBUG | ovider-thread-11 | AbstractCrypto |
113 - org.apache.ws.security.wss4j - 1.5.9 | CA certs have been loaded
17:57:04,468 | DEBUG | ovider-thread-11 | SAMLIssuerImpl |
113 - org.apache.ws.security.wss4j - 1.5.9 | Begin add SAMLAssertion
token...
17:57:04,468 | DEBUG | ovider-thread-11 | SAMLIssuerImpl |
113 - org.apache.ws.security.wss4j - 1.5.9 | automatic sig algo detection:
RSA
17:57:04,468 | DEBUG | ovider-thread-11 | SAMLIssuerImpl |
113 - org.apache.ws.security.wss4j - 1.5.9 |
com.sun.org.apache.xerces.internal.dom.DocumentImpl cannot be cast to
com.sun.xml.messaging.saaj.soap.SOAPDocument
java.lang.ClassCastException:
com.sun.org.apache.xerces.internal.dom.DocumentImpl cannot be cast to
com.sun.xml.messaging.saaj.soap.SOAPDocument
at
com.sun.xml.messaging.saaj.soap.impl.ElementImpl.getOwnerDocument(ElementImpl.java:147)[111:org.apache.servicemix.bundles.saaj-impl:1.3.2.2]
at
com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:389)[:]
at
com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:322)[:]
at
com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:273)[:]
at org.opensaml.SAMLSubject.toDOM(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLSubjectStatement.toDOM(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLAuthenticationStatement.toDOM(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLAssertion.toDOM(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLObject.toDOM(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLSignedObject.toDOM(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLObject.toDOM(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLSignedObject.sign(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at org.opensaml.SAMLSignedObject.sign(Unknown
Source)[114:org.apache.servicemix.bundles.opensaml:1.1.0.5]
at
org.apache.ws.security.saml.SAMLIssuerImpl.newAssertion(SAMLIssuerImpl.java:237)[113:org.apache.ws.security.wss4j:1.5.9]
at
org.apache.ws.security.action.SAMLTokenSignedAction.execute(SAMLTokenSignedAction.java:61)[113:org.apache.ws.security.wss4j:1.5.9]
at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:205)[113:org.apache.ws.security.wss4j:1.5.9]
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:50)[116:org.apache.cxf.bundle:2.3.2]
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:257)[116:org.apache.cxf.bundle:2.3.2]
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:134)[116:org.apache.cxf.bundle:2.3.2]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)[116:org.apache.cxf.bundle:2.3.2]
at
org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:247)[156:servicemix-cxf-bc:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:651)[121:servicemix-common:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:606)[121:servicemix-common:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:501)[121:servicemix-common:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:370)[121:servicemix-common:2011.01.0]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_24]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_24]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]
17:57:04,468 | DEBUG | ovider-thread-11 | PhaseInterceptorChain
Please update me why it is throwing class cast exception.Here attached
config files .[xbean.xml,saml.prop,client_sign.prop]
Regards,
Praveen Chakinala
http://servicemix.396122.n5.nabble.com/file/n4330714/config.zip config.zip
--
View this message in context:
http://servicemix.396122.n5.nabble.com/java-lang-ClassCastException-com-sun-org-apache-xerces-internal-dom-DocumentImpl-cannot-be-cast-to-ct-tp4330714p4330714.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.