Hi, This is the SOAP Request and Response
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 12ef <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" 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"><xenc:EncryptedKey Id="EncKeyId-urn:uuid:3ED0AE84C1B3DB9D3412422956622652"> <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"></xenc:EncryptionMethod> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <wsse:SecurityTokenReference><wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">vm5RAgdxbocvwMa5XqEZNkIV540=</wsse:KeyIdentifier></wsse:SecurityTokenReference> </ds:KeyInfo> <xenc:CipherData><xenc:CipherValue>LxXqaeSwMMmqeXStrOOJz3Btkv+dNHJ8U8s8BrZuumiCDgSYlfNSvUpyML+Jm9ihloE2XCTYYypKEhIX6n5xZeUbXVrfYuGOn99QsbnNvbyy8+O3QKVnLgNFQmXoMbL3teokQiLle7E+Di9VF0c9kCfvCDTAm+1AeI4Nvmnr14c=</xenc:CipherValue></xenc:CipherData><xenc:ReferenceList><xenc:DataReference URI="#EncDataId-4999131"></xenc:DataReference></xenc:ReferenceList></xenc:EncryptedKey><wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="CertId-6369198">MIIDezCCAuSgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBizELMAkGA1UEBhMCSU4xEjAQBgNVBAgTCUthcm5hdGFrYTESMBAGA1UEBxMJQmFuZ2Fsb3JlMREwDwYDVQQKEwhFbnZpc2lvbjERMA8GA1UECxMIRW52aXNpb24xETAPBgNVBAMTCEVudmlzaW9uMRswGQYJKoZIhvcNAQkBFgxlbnZAZW5mcy5jb20wHhcNMDkwNTEyMTE0NzIwWhcNMTAwNTEyMTE0NzIwWjBYMQswCQYDVQQGEwJJTjESMBAGA1UECBMJS2FybmF0YWthMREwDwYDVQQKEwhFbnZpc2lvbjERMA8GA1UECxMIRW52aXNpb24xDzANBgNVBAMTBkNsaWVudDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAggLMjOGa6H5Ir05XzPqxPk7KD7F7Gcitpb7YLY+kq4rsN8wLIr7FXiA1xscn1lajtLUjLTRDgtJwc38ydJIu1fSNYaXDn41uCV9oxdozm4quGD1JFPUYcoaHTQFR0U45kuyFxLo7Z0GcyM3ro2Q3XkdH4gJzG1ur01GdVxTNn8UCAwEAAaOCAR8wggEbMAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTlEoWzDdOGifYEqHZxG1/QCOlxZjCBwAYDVR0jBIG4MIG1gBRlp6marZwM8Y/qtBHf1mRvYwuV46GBkaSBjjCBizELMAkGA1UEBhMCSU4xEjAQBgNVBAgTCUthcm5hdGFrYTESMBAGA1UEBxMJQmFuZ2Fsb3JlMREwDwYDVQQKEwhFbnZpc2lvbjERMA8GA1UECxMIRW52aXNpb24xETAPBgNVBAMTCEVudmlzaW9uMRswGQYJKoZIhvcNAQkBFgxlbnZAZW5mcy5jb22CCQDfwl4j6oQt0jANBgkqhkiG9w0BAQQFAAOBgQBfKy9sMLWDuey4Np9xMztiIMk2rjWSwsbFoYx4EL5lQP+2e6FySBThle3Y37/mCWboiBPxhVLef2SeLTpBsj72iJIX9KsR79T0BhKtPKq/117Y/MEiBTwrjvVAlpu/YS3lqatHX1feUWRC0Frl1MHx1drnx3COb5HNZUQQ+hjk4g==</wsse:BinarySecurityToken><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-32380043"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod> <ds:Reference URI="#Id-4999131"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod> <ds:DigestValue>p25Ilpa1U4WU2E51JLmn7H9ZY9Y=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> LPkF5gh4vFBhRWXAUMYK9XHbpRrjnBTa44vmTnK+r32noTTAu/H1iHN7c8fLA1AO/9HViuyl7+Im aHaOVbBWDK1zPwN28F14jxQpAnKDGVYix6bXDUQp3lkcdr9EROPVzFmdE56dAiLncvg4tmRBxGmb 6VN2iTZ+RcaYJhx63P0= </ds:SignatureValue> <ds:KeyInfo Id="KeyId-15354046"> <wsse:SecurityTokenReference wsu:Id="STRId-27271771"><wsse:Reference URI="#CertId-6369198" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"></wsse:Reference></wsse:SecurityTokenReference> </ds:KeyInfo> </ds:Signature></wsse:Security></soapenv:Header><soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-4999131"><xenc:EncryptedData Id="EncDataId-4999131" Type="http://www.w3.org/2001/04/xmlenc#Content"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"></xenc:EncryptionMethod><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:Reference URI="#EncKeyId-urn:uuid:3ED0AE84C1B3DB9D3412422956622652"></wsse:Reference></wsse:SecurityTokenReference> </ds:KeyInfo><xenc:CipherData><xenc:CipherValue>mAJW0VDolkML3PQEypYxGg==</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData></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, 14 May 2009 10:07:43 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 Tomcat Server Console [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: javax.xml.stream.XMLStreamException: Trying to read events from a parser that already reported an error e 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: javax.xml.stream.XMLStreamException: Trying to read events from a parser that already reported an err fore at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:255) at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:339) at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:754) at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:96) ... 24 more Caused by: javax.xml.stream.XMLStreamException: Trying to read events from a parser that already reported an error before at org.apache.axiom.om.impl.builder.SafeXMLStreamReader.checkError(SafeXMLStreamReader.java:67) at org.apache.axiom.om.impl.builder.SafeXMLStreamReader.next(SafeXMLStreamReader.java:181) at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:592) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:174) Regards Seshadri ________________________________ From: Seshadri Krishnamurthy Sent: Thursday, May 14, 2009 3:26 PM To: '[email protected]' Subject: RE: WSSecurityException: Error in converting SOAP Envelope to Document Hi, I am sorry. I was on vacation for a couple of days. I could not reply to your mail. Current Status is: If I include the Timestamp with the snapshot jars of axiom - 1.2.9 jar . I get the same error. If I remove Timestamp, everything works fine for UserName Token Authentication I went ahead and tried with the Digital Signature policy. [SigOnly]. I did not include the Timestamp. It worked fine. Now I am trying Encrypt and Sign [SigEncr]. I have not included Timestamp. But still I continue to get the following error. [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) Could you please help me out in figuring the issue. Regards Seshadri ________________________________ From: Seshadri Krishnamurthy Sent: Monday, May 11, 2009 5:00 PM To: '[email protected]' Subject: RE: WSSecurityException: Error in converting SOAP Envelope to Document 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
