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

Andreas Veithen commented on AXIS2-5597:
----------------------------------------

[quote]
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.
[/quote]

That interpretation of the specification is questionable and not shared by 
others. E.g. the code for BP1600 in Eclipse's WS-I validator seems to allow 
namespace declarations on the soap:Header element:

http://eclipsesrc.appspot.com/jsrcs/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/profile/validator/impl/envelope/BP1600.java.html

There is another argument that contradicts your interpretation. I'm not really 
familiar with how test assertions are specified in BP, but I see this in the 
definition of the test assertion for BP1600:

Predicate: $target/../@schemaValid = fn:true()

I guess that this means that BP1600 is expressed in terms of schema validity. 
AFAIK, it is not possible to forbid namespace declarations using XML Schema. 
Therefore the presence of a namespace declaration on the soap:Header element 
will never make the test fail.

> 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 was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to