I need to gain access to and extract the SOAP header details from within my Web service. How do I go about writing...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
my WSDL to expose the underlying SOAP header data?
Typically, you don't specify headers in a WSDL document, and the headers are not available to the Web service application agent. Headers are usually processed by handlers (e.g., JAX-RPC handlers or HTTP pipeline modules) during the SOAP message processing pipeline. All headers must be processed (and stripped out of the message) before the request is passed to the application. Any information that needs to be sent to the application agent should be passed in the body rather than in the header.
If you do need to get this header information, then you will need to implement a handler that captures the header information and puts it someplace accessible by the application. Typically there's a context object that you should be able to use.
Dig Deeper on XML and XML schema
Related Q&A from Anne Thomas Manes
Anne Thomas Manes explains the differences between open source clients and open source implementations.continue reading
Anne Thomas Manes discusses the best way to go about creating an enterprise data dictionary and why the systems works well.continue reading
Anne Thomas Manes explains the difference between 'hard' real time and 'live' real time systems.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.