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
Result
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.