Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Parsing (and Optionally Removing) Headers and Header Attributes

    String[] getHeaders(SimpleEvent inSoapEvent, String actor, Boolean removeHeaders)

If the `actor` parameter has a null value then all the immediate children of the Header element are retrieved:

    getHeaders(inSoapEvent,null,false)

Otherwise, the header specified by the `actor` attribute is retrieved. For example, given this Headers element in a SOAP event payload:

        <soapenv:Header>
          <t:user xmlns:t="http://schemas/xml.com" soapenv:mustUnderstand="true"
                soapenv:actor="http://localhost:9090/Service">jon</t:user>
          <t:user_surname xmlns:t="http://schemas/xml.com"
                        soapenv:mustUnderstand="true"
                        soapenv:actor="http://localhost:9090">smith</t:user_surname>
        </soapenv:Header>

If you specify the following:

    getHeaders(inSoapEvent,"http://localhost:9090/Service",false)

To remove the specified header part or parts, set the final parameter to `true`. (The SOAP specification states that if a header is processed it should be removed. You would remove a header if TIBCO BusinessEvents is acting as an intermediary node and the request created using the SOAP functions are sent on to another server.)

Then the first Headers element is returned:

          <t:user xmlns:t="http://schemas/xml.com" soapenv:mustUnderstand="true"
                soapenv:actor="http://localhost:9090/Service">jon</t:user>

You can also retrieve the attributes of a SOAP Header element:

`String[] getSOAPHeaderAttribute(SimpleEvent` `inSoapEvent``, int index, String attribute)`

You can also remove all or selected headers using one of these functions:

    removeHeaderPart()
    removeHeaderParts()

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.