axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: No headers in response
Date Tue, 02 Oct 2012 12:32:40 GMT
On Tue, Oct 2, 2012 at 2:01 PM, Brian Reinhold
<brianreinhold@lampreynetworks.com> wrote:
> Martin,
>
>
>
> How do I get an attribute from an OMElement? This OMElement is one of the
> addressing elements. When I try:
>
>
>
>                 QName qname = new QName("mustUnderstand");
>
>                 String mustUnderstand =
> soapHeaderBlock.getAttributeValue(qname);
>
>                 if(mustUnderstand != null && (mustUnderstand.contains("1")
> || mustUnderstand.contains("true")))
>
>                 {
>
>
> messageContext.setProperty(ADD_MUST_UNDERSTAND_TO_ADDRESSING_HEADERS,
> "true");
>
>                 }
>
>
>
> Just gives me null for the String ‘mustUnderstand’ from
> soapHeaderBlock.getAttributeValue(qname). Yet debugging shows the
> ‘mustUnderstand’ attribute as a local name. How can this be so absurdly
> difficult?

The result is correct because the mustUnderstand attribute has a
namespace, but you are querying for an attribute with local name
mustUnderstand and no namespace.

Andreas

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


Mime
View raw message