Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Parsing the SOAP Body (SOAPBodyParts)

Two functions are available for getting SOAP body parts.

    String[] getAllSOAPBodyParts(SimpleEvent inSoapEvent)
    String[] getSOAPBodyParts(SimpleEvent inSoapEvent, String name, String namespace)

The `getAllSOAPBodyParts()` function simply returns all SOAP body parts.

Using the `getSOAPBodyParts() function` you can specify which parts are of interest. Given a body part name and a namespace for a specified SOAPEvent, it returns a String array of matching SOAP body parts in serialized form. Name and namespace parameters cannot be null.

## Example

Given this function:

    String[] body_part= getSOAPBodyParts (soapeventin,"root",http://www.tibco.com/schemas/SoapOverHttp/Schema/Schema.xsd)

And this `soapeventin` event payload:

    <?xml version="1.0" encoding="UTF-8"?>
    <message>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.tibco.com/schemas/SoapOverHttp/Schema/Schema.xsd" xmlns:temp="http://temp/">
      <soapenv:Header/>
        <soapenv:Body>
          <sch:root>
            <sch:First>1</sch:First>
            <sch:Second>2</sch:Second>
          </sch:root>
          <sch:parent2>
            <sch:child1>3</sch:child1>
            <sch:child2>4</sch:child2>
          </sch:parent2>
        </soapenv:Body> </soapenv:Envelope>

You would get this as the SOAP body part:

    body_part[0]=
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:root xmlns:ns0="http://www.tibco.com/schemas/SoapOverHttp/Schema/Schema.xsd">
      <ns0:First>1</ns0:First>
      <ns0:Second>2</ns0:Second>
    </ns0:root>

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.