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

WS Security header is not being serialized when header element is not instance of "org.apache.axiom.soap.SOAPHeader"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: rampart-core
    • Labels:
      None

      Description

      Currently wss4j using DOM to produce WS security headers. When it is combined with axiom through the axis2 it would use the DOM implementation of axiom. Then wss4j inserts simplify DOM element and axiom-dom would not process it.
      Here is the stack trace:

      Caused by: org.apache.axiom.soap.SOAPProcessingException: SOAP Envelope can not have children other than SOAP Header and Body
                  at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.checkChild(SOAPEnvelopeImpl.java:109)
                  at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:163)
                  at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:684)
                  at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:729)
                  at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:138)
                  at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:371)
                  at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
                  at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:81)
                  at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
                  at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
                  at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
                  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
                  at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:50)
                  at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:120)
                  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
                  at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) 
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                d_hadzhiev Detelin Hadzhiev
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: