Hi Seshadri, Do you get this message on the client, that message I also get. I've asked before on this forum about the error but have not got any replay[1]. In your first mail the error occur on the server side, now it's on the client. It looks to me like the snapshot lib fixes the issues on the server, but maybe not on the client.
If you use soapui to call you service then you will probably see that the service is returning the correct fault message, but this had no timestamp in the header and hence why you client is complaining. Hope this helps cheers, Håkon [1] http://mail-archives.apache.org/mod_mbox/ws-rampart-dev/200904.mbox/%[email protected]%3e 2009/5/11 Seshadri Krishnamurthy <[email protected]> > > Hi, > > After including the snapshot jars. I am getting the following error. It is > not even hitting the server. I am not able to capture the SOAP messages. I > have not done any changes. > May I know what I am missing? The below error I get when I include the snap > shot jar in the server also. > > SEVERE: Missing wsse:Security header in request > org.apache.axis2.AxisFault: Missing wsse:Security header in request > at > org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:172) > at > org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:99) > at org.apache.axis2.engine.Phase.invoke(Phase.java:317) > at > org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) > at > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) > at > org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:363) > at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) > at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) > at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) > at > com.enfs.pa.sampleservice.client.SampleserviceStub.testService(SampleserviceStub.java:183) > at > com.enfs.pa.sampleservice.client.SecureClient.main(SecureClient.java:55) > Caused by: org.apache.rampart.RampartException: Missing wsse:Security > header in request > at > org.apache.rampart.RampartEngine.process(RampartEngine.java:117) > at > org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92) > ... 9 more > Exception in thread "main" org.apache.axis2.AxisFault: Missing > wsse:Security header in request > at > org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:172) > at > org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:99) > at org.apache.axis2.engine.Phase.invoke(Phase.java:317) > at > org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) > at > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) > at > org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:363) > at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) > at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) > at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) > at > com.enfs.pa.sampleservice.client.SampleserviceStub.testService(SampleserviceStub.java:183) > at > com.enfs.pa.sampleservice.client.SecureClient.main(SecureClient.java:55) > Caused by: org.apache.rampart.RampartException: Missing wsse:Security > header in request > at > org.apache.rampart.RampartEngine.process(RampartEngine.java:117) > at > org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92) > ... 9 more > > Regards > > Seshadri > ________________________________ > From: Seshadri Krishnamurthy > Sent: Monday, May 11, 2009 3:43 PM > To: '[email protected]' > Subject: RE: WSSecurityException: Error in converting SOAP Envelope to > Document > > Hi, > > Thanks for giving me the URL of the snapshot jars. > I included the jars in both the Server and Client. > > But still the same issue, if I include Timestamp. > If I remove Timestamp, basic Username Token Authentication works. > > Regards > > Seshadri > ________________________________ > From: Seshadri Krishnamurthy > Sent: Friday, May 08, 2009 10:46 AM > To: '[email protected]' > Subject: RE: WSSecurityException: Error in converting SOAP Envelope to > Document > > Hi, > > Can you please upload the snapshot jar so that I can try it out? > > Regards > > Seshadri > > ________________________________ > From: Seshadri Krishnamurthy > Sent: Thursday, May 07, 2009 10:32 AM > To: '[email protected]' > Subject: WSSecurityException: Error in converting SOAP Envelope to Document > > Hi, > > Please find below the required information... > > Stack Trace > > [ERROR] Error in extracting message properties > org.apache.axis2.AxisFault: Error in extracting message properties > at > org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:172) > at > org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:99) > at org.apache.axis2.engine.Phase.invoke(Phase.java:317) > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) > at > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) > at > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > at > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) > at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) > at > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) > at java.lang.Thread.run(Unknown Source) > Caused by: org.apache.rampart.RampartException: Error in extracting message > properties > at > org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:322) > at org.apache.rampart.RampartEngine.process(RampartEngine.java:70) > at > org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92) > ... 21 more > Caused by: org.apache.ws.security.WSSecurityException: Error in converting > SOAP Envelope to Document; nested exception is: > org.apache.axiom.om.OMException: SOAPEnvelope must contain a body > element which is either first or second child element of the SOAPEnvelope. > at > org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:161) > at > org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:158) > ... 23 more > Caused by: org.apache.axiom.om.OMException: SOAPEnvelope must contain a > body element which is either first or second child element of the > SOAPEnvelope > . > at > org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody(SOAPEnvelopeImpl.java:163) > at > org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:100) > ... 24 more > > > SOAP Request > > POST /axis2/services/sampleservice HTTP/1.1 > Content-Type: application/soap+xml; charset=UTF-8; action="urn:testService" > User-Agent: Axis2 > Host: localhost:5049 > Transfer-Encoding: chunked > > 358 > <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv=" > http://www.w3.org/2003/05/soap-envelope"><soapenv:Header> > <wsse:Security xmlns:wsse=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" > soapenv:mustUnderstand="true"><wsu:Timestamp xmlns:wsu=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" > wsu:Id="Timestamp-30633470"><wsu:Created>2009-05-07T04:58:04.972Z</wsu:Created><wsu:Expires>2009-05-07T05:03:04.972Z</wsu:Expires></wsu:Timestamp> > <wsse:UsernameToken > wsu:Id="UsernameToken-17235092"><wsse:Username>wsuser</wsse:Username><wsse:Password > Type=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText > ">wspwd</wsse:Password></wsse:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body></soapenv:Body></soapenv:Envelope> > 0 > > SOAP Response > > HTTP/1.1 400 Bad Request > Server: Apache-Coyote/1.1 > Content-Type: application/soap+xml; action=" > http://www.w3.org/2005/08/addressing/soap/fault";charset=UTF-8 > Transfer-Encoding: chunked > Date: Thu, 07 May 2009 04:58:06 GMT > Connection: close > > 27f > <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv=" > http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault > xmlns:axis2ns1="http://www.w3.org/2003/05/soap-envelope"><soapenv:Code><soapenv:Value>axis2ns1:Sender</soapenv:Value><soapenv:Subcode><soapenv:Value > xmlns:wsse=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">wsse:InvalidSecurity</soapenv:Value></soapenv:Subcode></soapenv:Code><soapenv:Reason><soapenv:Text > xml:lang="en-US">Error in extracting message > properties</soapenv:Text></soapenv:Reason><soapenv:Detail > /></soapenv:Fault></soapenv:Body></soapenv:Envelope> > 0 > > Also please find attached the services.xml file (Server end) and policy.xml > file (Client end) for your reference. > > Regards > > Seshadri > > > ________________________________ > From: Seshadri Krishnamurthy > Sent: Tuesday, May 05, 2009 3:27 PM > To: '[email protected]' > Subject: WSSecurityException: Error in converting SOAP Envelope to Document > > Hi, > > I am getting the above mentioned error in spite of using the latest axiom > jar (axiom-dom-1.2.8.jar). > Request to help me in resolving this issue > > Regards > > Seshadri > -- Håkon Sagehaug, Scientific Programmer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)
