On Tue, Oct 2, 2012 at 2:01 PM, Brian Reinhold
<brianreinh...@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-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to