Incorrect check in org.apache.axis2.saaj.SOAPHeaderImpl#addHeaderElement
------------------------------------------------------------------------
Key: AXIS2-3419
URL: https://issues.apache.org/jira/browse/AXIS2-3419
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: client-api
Affects Versions: nightly
Reporter: Andreas Veithen
org.apache.axis2.saaj.SOAPHeaderImpl#addHeaderElement contains the following
check:
if (name.getURI() == null
|| name.getURI().trim().length() == 0
|| name.getPrefix() == null
|| name.getPrefix().trim().length() == 0) {
throw new SOAPException("SOAP1.1 and SOAP1.2 requires all
HeaderElements to have " +
"qualified namespace.");
}
This is incorrect. The SOAP 1.2 specification only says (see section 5.2.1)
that "Each SOAP header block element information item MUST have a [namespace
name] property which has a value; that is, the name of the element MUST be
namespace-qualified." Here "[namespace name] property" is used in the sense of
namespace URI. The specification doesn't say that the element must have a
prefix. The namespace in question may be declared as default namespace:
<env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope" >
<SomeHeader xmlns="uri:some:namespace">SomeValue</SomeHeader>
</env:Header>
The check on the prefix should be removed from the if statement shown above.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]