Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Working with Outgoing SOAP Messages (Event Payloads)

You can add header parts, body parts, fault parts and attachments to the outgoing SOAP message (whether it is a response or a request).

The signatures of the relevant functions are as follows:

    addHeaderPart(SimpleEvent outSOAPEvent, String headerPartXml)
    addSOAPBodyPart(SimpleEvent outSOAPEvent, String bodyXML)
    addSOAPHeaderAttribute(SimpleEvent outSOAPEvent, int index, String attribute, String value)
    addFaultPart(SimpleEvent outSOAPEvent, String faultCode, String faultMessage, String faultActor, String faultDetailString)
    addAttachment(SimpleEvent outSOAPEvent, String contentID, String content, String contentType, String contentEncoding)

TIBCO BusinessEvents adds each type of fragment to the appropriate part of the event payload: header, body, or fault. The fragments must be well-formed XML. You can also add attachments.

For example, to add a body part containing information for a response you would include all the required details including any namespace information:

    SOAP.addSOAPBodyPart(outSOAPEvent,"<ns0:BookStore xmlns:ns0=\"http://www.abc.com/xsd/books\"><ns0:Book><ns0:Author>J.K.Rowling</ns0:Author></ns0:Book></ns0:BookStore>");

The specified body part is added to the correct place in the outline structure of the SOAP message, which is provided by the SOAPEvent. The resulting payload would look similar to the following:

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Body>
        <ns0:BookStore xmlns:ns0="HTTP://www.abc.com/xsd/books">
          <ns0:Book>
            <ns0:Author>J.K.Rowling</ns0:Author></ns0:BookStore>"
          </ns0:Book>
        </ns0:BookStore>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

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.