Uses for Header Support
The HydraExpress support for headers is a very general mechanism for passing metadata for a service between client and server. If you are using a SOAP binding for your service, you should probably use the SOAP header to pass this data since this support provides validation and error reporting. The transport header support provides an alternative mechanism, particularly when a service uses a binding other than SOAP.
Here are a few possible uses for headers:
Session support. Use the headers to pass a session ID or other data related to maintaining a session over two or more client-server interactions. For a discussion of sessions, see
Chapter 18.
Other stateful applications. Pass data in any application where state is significant. One possibility would be transaction data to allow back-out should the transaction fail.
Orchestration. For complex SOA applications involving multiple services, use header data as an orchestration tool to route and coordinate service interactions.