You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "shivendra tripathi (JIRA)" <ji...@apache.org> on 2011/06/06 07:48:47 UTC

[jira] [Created] (WSS-293) Getting exception when rampart is engaged without addressing at client side

Getting exception when rampart is engaged without addressing at client side
---------------------------------------------------------------------------

                 Key: WSS-293
                 URL: https://issues.apache.org/jira/browse/WSS-293
             Project: WSS4J
          Issue Type: Bug
          Components: WSS4J Core
    Affects Versions: 1.5.10
         Environment: windows
            Reporter: shivendra tripathi
            Assignee: Colm O hEigeartaigh


Steps to reproduce:
1. Engage rampart and use policy based configuarion
2. Don't engage any other module like addressing 
3. Use OperationClient at client side and create soap envelope as follows
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();// don't use soapFactory.getDefaultEnvelope() to create soap envelope
    	SOAPBody sb = soapFactory.createSOAPBody(envelope);

On execution following exception is thrown, since WSS4J is inserting the header which is instance of OMElement and not of SOAPHeader. 

Caused by: org.apache.rampart.RampartException: Error in extracting message properties
	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:389)
	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
	... 59 more
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:110)
	at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:164)
	at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:646)
	at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:722)
	at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:146)
	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:379)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Resolved] (WSS-293) Getting exception when rampart is engaged without addressing at client side

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved WSS-293.
-------------------------------------

    Resolution: Won't Fix


Issue should be logging in the Rampart JIRA.

Colm.

> Getting exception when rampart is engaged without addressing at client side
> ---------------------------------------------------------------------------
>
>                 Key: WSS-293
>                 URL: https://issues.apache.org/jira/browse/WSS-293
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.5.10
>         Environment: windows
>            Reporter: shivendra tripathi
>            Assignee: Colm O hEigeartaigh
>
> Steps to reproduce:
> 1. Engage rampart and use policy based configuarion
> 2. Don't engage any other module like addressing 
> 3. Use OperationClient at client side and create soap envelope as follows
>         SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();// don't use soapFactory.getDefaultEnvelope() to create soap envelope
>     	SOAPBody sb = soapFactory.createSOAPBody(envelope);
> On execution following exception is thrown, since WSS4J is inserting the header which is instance of OMElement and not of SOAPHeader. 
> Caused by: org.apache.rampart.RampartException: Error in extracting message properties
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:389)
> 	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
> 	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> 	... 59 more
> 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:110)
> 	at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:164)
> 	at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:646)
> 	at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:722)
> 	at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:146)
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:379)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-293) Getting exception when rampart is engaged without addressing at client side

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045859#comment-13045859 ] 

Colm O hEigeartaigh commented on WSS-293:
-----------------------------------------

Hi,

What fix do you propose for this issue? The exception is being thrown in Axiom.

Colm.

> Getting exception when rampart is engaged without addressing at client side
> ---------------------------------------------------------------------------
>
>                 Key: WSS-293
>                 URL: https://issues.apache.org/jira/browse/WSS-293
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.5.10
>         Environment: windows
>            Reporter: shivendra tripathi
>            Assignee: Colm O hEigeartaigh
>
> Steps to reproduce:
> 1. Engage rampart and use policy based configuarion
> 2. Don't engage any other module like addressing 
> 3. Use OperationClient at client side and create soap envelope as follows
>         SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();// don't use soapFactory.getDefaultEnvelope() to create soap envelope
>     	SOAPBody sb = soapFactory.createSOAPBody(envelope);
> On execution following exception is thrown, since WSS4J is inserting the header which is instance of OMElement and not of SOAPHeader. 
> Caused by: org.apache.rampart.RampartException: Error in extracting message properties
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:389)
> 	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
> 	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> 	... 59 more
> 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:110)
> 	at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:164)
> 	at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:646)
> 	at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:722)
> 	at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:146)
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:379)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-293) Getting exception when rampart is engaged without addressing at client side

Posted by "shivendra tripathi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044902#comment-13044902 ] 

shivendra tripathi commented on WSS-293:
----------------------------------------

Exception is being thrown by WSSecuritryUtil#findWsseSecurityHeaderBlock in the following line: 

if (header == null && doCreate) {
            header = 
                createElementInSameNamespace(envelope, sc.getHeaderQName().getLocalPart());
            header = prependChildElement(envelope, header);
        }

WSSecuritryUtil belongs to wss4j.

If only rampart is engaged then header will be null.

header =  createElementInSameNamespace(envelope, sc.getHeaderQName().getLocalPart()); header return by this line is instance of OMElement. But the method
prependChildElement do a check to make sure envelope child is either instance of SOAPHeader or SOAPBody. And here it throws the exception.


            

> Getting exception when rampart is engaged without addressing at client side
> ---------------------------------------------------------------------------
>
>                 Key: WSS-293
>                 URL: https://issues.apache.org/jira/browse/WSS-293
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.5.10
>         Environment: windows
>            Reporter: shivendra tripathi
>            Assignee: Colm O hEigeartaigh
>
> Steps to reproduce:
> 1. Engage rampart and use policy based configuarion
> 2. Don't engage any other module like addressing 
> 3. Use OperationClient at client side and create soap envelope as follows
>         SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();// don't use soapFactory.getDefaultEnvelope() to create soap envelope
>     	SOAPBody sb = soapFactory.createSOAPBody(envelope);
> On execution following exception is thrown, since WSS4J is inserting the header which is instance of OMElement and not of SOAPHeader. 
> Caused by: org.apache.rampart.RampartException: Error in extracting message properties
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:389)
> 	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
> 	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> 	... 59 more
> 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:110)
> 	at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:164)
> 	at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:646)
> 	at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:722)
> 	at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:146)
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:379)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-293) Getting exception when rampart is engaged without addressing at client side

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044753#comment-13044753 ] 

Colm O hEigeartaigh commented on WSS-293:
-----------------------------------------


This sounds more like a Rampart issue, shouldn't this by logged in the Rampart JIRA?

https://issues.apache.org/jira/browse/Rampart

Colm.

> Getting exception when rampart is engaged without addressing at client side
> ---------------------------------------------------------------------------
>
>                 Key: WSS-293
>                 URL: https://issues.apache.org/jira/browse/WSS-293
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.5.10
>         Environment: windows
>            Reporter: shivendra tripathi
>            Assignee: Colm O hEigeartaigh
>
> Steps to reproduce:
> 1. Engage rampart and use policy based configuarion
> 2. Don't engage any other module like addressing 
> 3. Use OperationClient at client side and create soap envelope as follows
>         SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();// don't use soapFactory.getDefaultEnvelope() to create soap envelope
>     	SOAPBody sb = soapFactory.createSOAPBody(envelope);
> On execution following exception is thrown, since WSS4J is inserting the header which is instance of OMElement and not of SOAPHeader. 
> Caused by: org.apache.rampart.RampartException: Error in extracting message properties
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:389)
> 	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
> 	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> 	... 59 more
> 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:110)
> 	at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:164)
> 	at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:646)
> 	at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:722)
> 	at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:146)
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:379)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Closed] (WSS-293) Getting exception when rampart is engaged without addressing at client side

Posted by "Colm O hEigeartaigh (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh closed WSS-293.
-----------------------------------

    
> Getting exception when rampart is engaged without addressing at client side
> ---------------------------------------------------------------------------
>
>                 Key: WSS-293
>                 URL: https://issues.apache.org/jira/browse/WSS-293
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.5.10
>         Environment: windows
>            Reporter: shivendra tripathi
>            Assignee: Colm O hEigeartaigh
>
> Steps to reproduce:
> 1. Engage rampart and use policy based configuarion
> 2. Don't engage any other module like addressing 
> 3. Use OperationClient at client side and create soap envelope as follows
>         SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();// don't use soapFactory.getDefaultEnvelope() to create soap envelope
>     	SOAPBody sb = soapFactory.createSOAPBody(envelope);
> On execution following exception is thrown, since WSS4J is inserting the header which is instance of OMElement and not of SOAPHeader. 
> Caused by: org.apache.rampart.RampartException: Error in extracting message properties
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:389)
> 	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
> 	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> 	... 59 more
> 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:110)
> 	at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:164)
> 	at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:646)
> 	at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:722)
> 	at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:146)
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:379)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (WSS-293) Getting exception when rampart is engaged without addressing at client side

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSS-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046746#comment-13046746 ] 

Andreas Veithen commented on WSS-293:
-------------------------------------

Yes, this issue should be moved to Rampart. Either Rampart needs to make sure that the message already has a SOAPHeader element before invoking WSS4J, or Axiom DOOM would have to be modified to work like SAAJ (which converts the plain Element to a SOAPHeader on the fly when necessary).

> Getting exception when rampart is engaged without addressing at client side
> ---------------------------------------------------------------------------
>
>                 Key: WSS-293
>                 URL: https://issues.apache.org/jira/browse/WSS-293
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.5.10
>         Environment: windows
>            Reporter: shivendra tripathi
>            Assignee: Colm O hEigeartaigh
>
> Steps to reproduce:
> 1. Engage rampart and use policy based configuarion
> 2. Don't engage any other module like addressing 
> 3. Use OperationClient at client side and create soap envelope as follows
>         SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();// don't use soapFactory.getDefaultEnvelope() to create soap envelope
>     	SOAPBody sb = soapFactory.createSOAPBody(envelope);
> On execution following exception is thrown, since WSS4J is inserting the header which is instance of OMElement and not of SOAPHeader. 
> Caused by: org.apache.rampart.RampartException: Error in extracting message properties
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:389)
> 	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
> 	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> 	... 59 more
> 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:110)
> 	at org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl.insertBefore(SOAPEnvelopeImpl.java:164)
> 	at org.apache.ws.security.util.WSSecurityUtil.prependChildElement(WSSecurityUtil.java:646)
> 	at org.apache.ws.security.util.WSSecurityUtil.findWsseSecurityHeaderBlock(WSSecurityUtil.java:722)
> 	at org.apache.ws.security.message.WSSecHeader.insertSecurityHeader(WSSecHeader.java:146)
> 	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:379)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org