gravatar

Mediator SOAP header filtering

This post is all about how to access the SOAP headers using the mediator component in the oracle soa suite 11g.

Before looking at the steps to be followed to access the SOAP headers, first we need to understand the following things.
  • SOAP Message structure (This is required to understand where actually the SOAP body message and SOAP headers reside in the entire message).
  • Constructing WSDL to specify that SOAP headers will be accessed. (Without this jdeveloper design time cannot help you to build expressions using which you can access SOAP headers at run time).
  • Way to populate the SOAP headers ( We will be using BPEL component to achieve this)
  • Accessing the SOAP header value (We will be suing the Mediator component to achieve this).
 SOAP message structure
A SOAP message is made of an envelope and zero or more attachments..




A SOAP envelope is made of optional header and mandatory body parts..

Headers are always handled (or processed) by the intermediaries...and the
body is always handled (or processed) by the ultimate receiver..

The header is generally used for providing some contextual information, like, providing authentication related information, or providing transaction related information  etc...
 
Headers are used to represent that some special processing is required. Most of the WS-* standards use the header section to represent the special processing required . For example WS-Addresssing using this header section to represent where the ReplyTo message has to be sent.

Constructing WSDL


The following video shows how to construct the WSDL..It uses the jdeveloper tool to create and edit the WSDL file.





Way to populate SOAP headers


The following video shows how to use BPEL component to populate SOAP headers in the SOAP message.




Accessing SOAP header values
The following video shows how to access the SOAP header values in mediator.