Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOAP header blocks: Are they specific to the binding?

 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see the following in the SOAP Version 1.2 Part 0 document:

"Note, however, that if the application requires the use of features that can only have a binding-specific expression within the SOAP infoset, i.e., using SOAP header blocks, then the application must choose HTTP POST method with a SOAP message in the request body."

This seems to imply that using SOAP headers is binding-specific. I understand "binding" to mean protocols (transport layer?) like http and smtp.

Question: No matter how the data is transmited - could be http, smtp, or anything else - I can always send SOAP headers as part of the data being sent. So it does not seem to be "binding-specific", at least on the face of it. What am I not understanding here?

Any thoughts on this? Please feel free to correct me on any or all of the above, except the quote from the Part 0 document
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
If you use HTTP transport for a SOAP web service, then all requests sent to a service will use the HTTP POST method - see section 4.1.2 in the document you gave the link to.
Generally speaking, the use of SOAP header blocks does not imply the use of HTTP transport. A SOAP header block is a piece of XML data inserted in a SOAP message, which also is XML data, so there is nothing connecting it to HTTP. Of course, there may be a case when a SOAP header block indeed is related to the HTTP transport protocol in some way. I have a feeling that it is not a great idea to do things like this if you do not want to lock your web service to HTTP.
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic