File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes SOAP header blocks: Are they specific to the binding? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "SOAP header blocks: Are they specific to the binding?" Watch "SOAP header blocks: Are they specific to the binding?" New topic
Author

SOAP header blocks: Are they specific to the binding?

R Srini
Ranch Hand

Joined: Feb 19, 2010
Posts: 215
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SOAP header blocks: Are they specific to the binding?