[ 
https://issues.apache.org/jira/browse/AXIS2-5597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728862#comment-13728862
 ] 

Maarten van den Broek commented on AXIS2-5597:
----------------------------------------------

Chapter 4 of the SOAP 1.1 specification states about the SOAP Envelope and its 
content:

"The grammar rules are as follows:

    Envelope
        The element name is "Envelope".
        The element MUST be present in a SOAP message
        The element MAY contain namespace declarations as well as additional 
attributes. If present, such additional attributes MUST be namespace-qualified. 
Similarly, the element MAY contain additional sub elements. If present these 
elements MUST be namespace-qualified and MUST follow the SOAP Body element.
    Header (see section 4.2)
        The element name is "Header".
        The element MAY be present in a SOAP message. If present, the element 
MUST be the first immediate child element of a SOAP Envelope element.
        The element MAY contain a set of header entries each being an immediate 
child element of the SOAP Header element. All immediate child elements of the 
SOAP Header element MUST be namespace-qualified.
    Body (see section 4.3)
        The element name is "Body".
        The element MUST be present in a SOAP message and MUST be an immediate 
child element of a SOAP Envelope element. It MUST directly follow the SOAP 
Header element if present. Otherwise it MUST be the first immediate child 
element of the SOAP Envelope element.
        The element MAY contain a set of body entries each being an immediate 
child element of the SOAP Body element. Immediate child elements of the SOAP 
Body element MAY be namespace-qualified. SOAP defines the SOAP Fault element, 
which is used to indicate error messages (see section 4.4)."

For the envelope element it is explicitly specified that it may contain 
namespace declarations. For the header element it is not specified that it may 
contain namespace declarations. So the specification appears to forbid 
namespace declarations in a header element.

A message I produced with the addressing module of Axis2 and the compliance of 
which was tested against BP 1.2 failed with a BP1600 error. When the namespace 
declaration was moved to the envelope element the message passes the test. This 
confirms the interpretation of the SOAP 1.1 specification given above.

                
> The adressing module adds the addressing namespace declaration in the header 
> element, which is not allowed by BP 1.2
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5597
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5597
>             Project: Axis2
>          Issue Type: Bug
>          Components: Addressing
>    Affects Versions: 1.6.2
>            Reporter: Maarten van den Broek
>
> Validation of an axis2 message with an addressing header gives a BP1600 error.
> This issue can probably be resolved by changing line 210
>    addressingNamespaceObject = header.declareNamespace(addressingNamespace, 
> WSA_DEFAULT_PREFIX);
> in the class org.apache.axis2.handlers.addressing.AddressingOutHandler to
>     addressingNamespaceObject = 
> envelope.declareNamespace(addressingNamespace, WSA_DEFAULT_PREFIX);
> Maybe more changes are necessary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to