Uploaded image for project: 'Rampart'
  1. Rampart
  2. RAMPART-351

{ Policy} Sample-05 is not working in the current trunk

    XMLWordPrintableJSON

Details

    Description

      i have implemented Sample05 (Policy) .But the soap request sent to server as expected but i got the soap response is given below...

      ERROR is : " Undeclared namespace prefix "wsu" (for attribute "Id") "

      but i have configured everything is good. but i got response like this.. i am 0% in rampart policy based Security ..

      <?xml version='1.0' encoding='UTF-8'?>
      <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
      <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
      </soapenv:Header>
      <soapenv:Body>
      <soapenv:Fault>
      <soapenv:Code>
      <soapenv:Value>soapenv:Receiver</soapenv:Value>
      </soapenv:Code>
      <soapenv:Reason>
      <soapenv:Text xml:lang="en-US">com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "wsu" (for attribute "Id") at [row,col

      {unknown-source}]: [1,861]</soapenv:Text>
      </soapenv:Reason>
      <soapenv:Detail>
      <Exception>org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "wsu" (for attribute "Id") at [row,col {unknown-source}

      ]: [1,861] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:283) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:290) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498) Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "wsu" (for attribute "Id") at [row,col

      {unknown-source}]: [1,861] at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:297) at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:335) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getNextOMSibling(OMSourcedElementImpl.java:904) at org.apache.axiom.soap.impl.llom.SOAPHeaderImpl$HeaderIterator.hasNext(SOAPHeaderImpl.java:204) at org.apache.axiom.soap.impl.llom.SOAPHeaderImpl$HeaderIterator.<init>(SOAPHeaderImpl.java:185) at org.apache.axiom.soap.impl.llom.SOAPHeaderImpl.getHeadersToProcess(SOAPHeaderImpl.java:296)
      at org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(AddressingInHandler.java:116)
      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)
      ... 23 more
      Caused by: com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "wsu" (for attribute "Id")
      at [row,col {unknown-source}

      ]: [1,861]
      at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:605)
      at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:473)
      at com.ctc.wstx.sr.NsAttributeCollector.resolveNamespaces(NsAttributeCollector.java:179)
      at com.ctc.wstx.sr.NsInputElementStack.resolveAndValidateElement(NsInputElementStack.java:374)
      at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2945)
      at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2846)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
      at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:682)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:215)
      at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:335)
      at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody(SOAPEnvelopeImpl.java:170)
      at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.hasFault(SOAPEnvelopeImpl.java:304)
      at org.apache.axis2.context.MessageContext.isFault(MessageContext.java:4050)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:151)
      ... 24 more
      </Exception>
      </soapenv:Detail>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>

      MY Soap Request is :
      --------------------------------

      <?xml version='1.0' encoding='UTF-8'?>
      <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
      <soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
      <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-1">
      <wsu:Created>2011-12-22T08:33:48.828Z</wsu:Created>
      <wsu:Expires>2011-12-22T08:38:48.828Z</wsu:Expires>
      </wsu:Timestamp>
      <wsse:BinarySecurityToken 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-4C1330AA1483F142BC13245428290001">MIICTzCCAbigAwIBAgIESy9O5zANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQGEwJMSzEQMA4GA1UECBMHV2VzdGVybjEQMA4GA1UEBxMHQ29sb21ibzEPMA0GA1UEChMGQXBhY2hlMRAwDgYDVQQLEwdSYW1wYXJ0MRYwFAYDVQQDEw1TYW1wbGUgQ2xpZW50MB4XDTA5MTIyMTEwMzMxMVoXDTM3MDUwNzEwMzMxMVowbDELMAkGA1UEBhMCTEsxEDAOBgNVBAgTB1dlc3Rlcm4xEDAOBgNVBAcTB0NvbG9tYm8xDzANBgNVBAoTBkFwYWNoZTEQMA4GA1UECxMHUmFtcGFydDEWMBQGA1UEAxMNU2FtcGxlIENsaWVudDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAjBQM+kgC0Wm9hk9v4pjLSg5yK0Em2ulyDmODckWv4mZJ8YwJPVgqEIzwRiOnNBH3s+wFCw297zDsnEgDKSQrsPf1smVUOK/slyDPbqZ47Ewcs07nCPfNigncmpbcaluO3bMw9Oqj9VIYjrUHu5xCp2Fe39ZPbwOzLtAmT8b6iucCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAnjPanrVjFVkxnhsj83RJA2tK//v99KpPf3do9VUI2yEgvBZUzH3q2jk3widwEcsJMHgbRr3VTFL7dNVdCYBcI1KiBY9SMa1XZ4RIHmw7gkJt1JTgjKBzfrout2z614KixRf4w7qkDacGxkNspXG/PSlh03Lfm5sb0vzH1aqBl3g==</wsse:BinarySecurityToken>
      <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-2">
      <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-32079775">
      <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>biSDm7vL5/Fu6ZQA2hE/vPw7z1k=</ds:DigestValue>
      </ds:Reference>
      <ds:Reference URI="#Timestamp-1">
      <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>uAOylatph3MIMvqNMJKg8QBZ6+k=</ds:DigestValue>
      </ds:Reference>
      </ds:SignedInfo>
      <ds:SignatureValue>adZlhnSTmlPTrZK0YNOd52h/I7lvisdI0DRp1TugXCBtf9bE1s1gkdu25O4NN6+R6t+zR1NnKYLeonLq9QSuxph4XZM/O+H+xzl+oADlyrdKcgUiq9sxzl0/MlScqcDMNfnG6LO4eQKTKMWC1+ZXZXa06wbXaHplTuJ4eMmQdzs=</ds:SignatureValue>
      <ds:KeyInfo Id="KeyId-4C1330AA1483F142BC13245428290162">
      <wsse:SecurityTokenReference wsu:Id="STRId-4C1330AA1483F142BC13245428290163">
      <wsse:Reference URI="#CertId-4C1330AA1483F142BC13245428290001" 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>
      <wsa:To>http://localhost:8090/axis2/services/STS</wsa:To>
      <wsa:ReplyTo>
      <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
      </wsa:ReplyTo>
      <wsa:MessageID>urn:uuid:494015F9716E75A8FB1324542828150</wsa:MessageID>
      <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>
      </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-32079775">
      <wst:RequestSecurityToken xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust">
      <wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>
      <wst:Lifetime>
      <wsu:Created>2011-12-22T08:33:48.078Z</wsu:Created>
      <wsu:Expires>2011-12-22T08:38:48.078Z</wsu:Expires>
      </wst:Lifetime>
      <wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>
      <wst:KeyType>http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey</wst:KeyType>
      <wst:KeySize>256</wst:KeySize>
      <wst:Entropy>
      <wst:BinarySecret Type="http://schemas.xmlsoap.org/ws/2005/02/trust/Nonce">5J6wAF5cTBjUPX4XjTjWiwThhRhDG6+/</wst:BinarySecret>
      </wst:Entropy>
      <wst:ComputedKeyAlgorithm>http://schemas.xmlsoap.org/ws/2005/02/trust/CK/PSHA1</wst:ComputedKeyAlgorithm>
      </wst:RequestSecurityToken>
      </soapenv:Body>
      </soapenv:Envelope>

      Attachments

        Activity

          People

            Unassigned Unassigned
            surya86mca surya s
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified