I guess this is the ClassCastException you get when casting the timestamp to a OMElement.
Please check the creation of timestamp element... Thanks & regards. -Prabath kasun Gajasinghe wrote: > Hello, > we were trying to use Rampart without using DOOM objects. i.e. instead > of converting OMElement -> DOOM we do OMElement -> DOM conversion. > This is done by passing *false* for the parameter '*useDoom*' in > methods "getSOAPEnvelopeFromDOMDocument(Document doc, boolean > useDoom)" and getDocumentFromSOAPEnvelope(SOAPEnvelope env, boolean > useDoom) @ org.apache.rampart.util.Axis2Util.java. > > But, this doesn't work! I am getting a ClassCastException. Does anyone > know a solution for this? > > Stack-Trace is given below. > > run-signencr: > run-policy: > [copy] Copying 1 file to > /media/DATA/WSO2/axis2/jws14code-new/axis2.BACK/client/bin > [java] Running initialization request to prepare for timed test > [java] Connecting to service at > http://localhost:8080/axis2/services/seismic-signencr > [java] Rampart engaged for supplied policy > [java] java.lang.ClassCastException: > org.apache.xerces.dom.ElementNSImpl cannot be cast to > org.apache.axiom.om.OMElement > [java] at > org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:366) > [java] at > org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:95) > [java] at > org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147) > [java] at > org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64) > [java] at org.apache.axis2.engine.Phase.invoke(Phase.java:318) > [java] at > org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:259) > [java] at > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:424) > [java] at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406) > [java] at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) > [java] at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) > [java] at > com.sosnoski.ws.seismic.adb.SeismicAdbStub.matchQuakes(SeismicAdbStub.java:181) > [java] at > com.sosnoski.ws.seismic.adb.Axis2LitClient.runQuery(Axis2LitClient.java:87) > [java] at > com.sosnoski.ws.seismic.adb.TestClient$TestRunnable.run(TestClient.java:210) > [java] at java.lang.Thread.run(Thread.java:619) > [java] Java Result: 1 > > BUILD SUCCESSFUL > Total time: 3 seconds > > Thanks, > /KasunG > > -- > Kasun Gajasinghe > Intern > E-mail: kasung AT wso2 DOT com > > WSO2, Inc.; http://wso2.com > lean.enterprise.middleware > > > ------------------------------------------------------------------------ > > _______________________________________________ > Carbon-dev mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > _______________________________________________ Carbon-dev mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
