Using SOAP Bound Headers
This sample shows how to use SOAP Bound Headers by passing any data or control information in the SOAP envelope. In this sample the Input WSDL message part is configured as a Header in the WSDL definition.
- Procedure
- In the samples directory, select and double-click tibco.bw.sample.binding.soap.http.SOAPBoundHeaders. For more information, see Accessing Samples .
- In the Project Explorer expand the tibco.bw.sample.binding.soap.http.SOAPBoundHeaders project.
- Fully expand the Processes directory and double-click Client.bwp.
- Click .
- At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
- Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the checkbox next to tibco.bw.sample.binding.soap.http.SOAPBoundHeaders.application
- Click
Debug.
This runs the sample in the Debug mode.
- In
TIBCO Business Studio™, click the
Terminate
icon to stop the process.
10:41:08.248 INFO [bwThread:In-Memory STWorkProcessor-2] c.t.b.p.g.L.t.b.s.b.s.h.S.Log - Invoked cityinfo
10:41:08.273 INFO [bwThread:In-Memory STWorkProcessor-3] c.t.b.p.g.L.t.b.s.b.s.h.S.Log - CityInfo response:
city: Urbana
state: Illinois
location: Urbana, Illinois, United States
latitude: 40.11
longitude: 88.207
zip: 61801
10:41:10.299 INFO [bwThread:In-Memory STWorkProcessor-5] c.t.b.p.g.L.t.b.s.b.s.h.S.Log1 - Invoked cityDistance
10:41:10.306 INFO [bwThread:In-Memory STWorkProcessor-6] c.t.b.p.g.L.t.b.s.b.s.h.S.Log1 - CityDistance response:
Distance from cityUrbana to city Champaign is 4
Understanding the Configuration
This sample implements a service for determining information about the zip codes. This includes getting information for the city at the specified zip code, and for getting the distance between two cites (defined by their zip codes). CityInfo operation input message is configured as SOAP Header data whereas the CityDistance operation input message is configured as SOAP Body data.
Two operations are implemented in the server process. The service operations getCityInfo and getCityDistance provide a means for getting the city information about a zip code and distance between the cities. Both operations are invoked from the client side with a small sleep between invocations.