Jump to content

How are you using the SOAP header?

Recommended Posts

There's a debate going on within my company and I'm seeking outside opinions.We're building web services for internal use, for communication between applications. Initially we were not using SOAP at all. Our services were delivered by MQ. Within the payload of these messages, we established a "header", which gives some context to the service (transactionID, sourceID, DestinationID), and had some exception handling.Now that we've moved to SOAP, we're using the fault constructs, outside of our payload, for exceptions.There is a camp that believes that we should move the context information out of the body and into the SOAP header. The argument is that the payload should only contain business objects. Anything "systemy" belongs in the header.There's another camp that says the context has to remain in the body, because there are some circumstances where the header will have been stripped off from the body, and the consumer will still need the context information.I tend to agree with the use-the-header camp in principle. But I have difficulty with the details. SOAP header is an "any" that depends on the use of some other schema to define its contents. There seems to be a sea of cryptically explained SOAP header extensions. I'm at a loss to know which ones I should consider using or how to map our existing context data to them. Anyone else out there facing this dilemma?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...