Using SOAP UnBound Headers

SOAP Unbound headers can pass any Out-of-Band data or control information in the SOAP envelope. In this sample a simple getBook operation based on the specified interface WSDL file is implemented showing the use of SOAP Unbound Headers.

Procedure

  1. In the samples directory, select binding > soap > HTTP > SOAPHeaders and double-click tibco.bw.sample.binding.soap.http.SOAPUnboundHeaders. For more information, see Accessing Samples.
  2. In the Project Explorer expand the tibco.bw.sample.binding.soap.http.SOAPUnboundHeaders project.
  3. Set the default ApplicationProfile to match the OS you are running on. For more information, see Setting the Default Application Profile.
  4. Fully expand the Processes directory and double-click ClientProcess.bwp.
  5. Click Run > Debug Configurations.
  6. At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
  7. Click Applications and then click the Deselect All button if you have multiple applications. Select the check box next to tibco.bw.sample.binding.soap.http.SOAPUnboundHeaders.application.
  8. Click Debug.
    This runs the sample in Debug mode.
  9. In TIBCO Business Studio™ for BusinessWorks™, click the Terminate icon to stop the process.

Result

The expected outcome for the file identified in the OUTPUT_FILE property is:

Expected captchaID : CID007

Received captchaID : CID007

Understanding the Configuration

This sample shows the use of SOAP unbound headers on service and reference.

The service exposes a login method that accepts a username and password, and expects a captcha string to be passed using SOAP unbound headers. Verification of the received username and password returns a captchaID to caller.

The ClientProcess sends a username and password as part of request message and sends the captcha string using headers.

The ServerProcess receives the username and password and, on successful verification of credentials, returns a captchaID as part of the headers and returns a boolean indicating login success or failure.