If we talk about Oracle BPEL Process Manager (Oracle's implementation of BPEL specification) it is having SOAP header manipulation capabilities through BPEL extensions. You can send or receive SOAP headers from a BPEL process using bpelx:inputHeaderVariable, bpelx:headerVariable extensions.
To send SOAP headers from the BPEL process you need to use bpelx:inputHeaderVariable extension in the invoke activity, just give a comma separated list of all the variables you want to send in the SOAP header. To receive SOAP headers you need to use bpelx:headerVariable extension in the receive activity. Once you add these extensions in the receive or invoke activity your part is over and the BPEL Process Manager will add your variables to SOAP header if you are invoking a web service or extract SOAP headers if you are using receive activity and assign SOAP headers to the specified variables.
Sending or receiving SOAP headers from Oracle BPEL is very simple, you need to create messages inside WSDL, variables in BPEL process and then need to use bpelx:inputHeaderVariable and bpelx:headerVariable extensions. See the following to understand how to add bpelx:inputHeaderVariable and bpelx:headerVariable into the invoke, receive, onMessage and reply activities respectively:
<receive name="receiveInput" partnerLink="client" portType="client:TestProcess"
operation="process" variable="inputVariable" createInstance="yes" bpelx:headerVariable="yourVariable1, yourVariable2"/>
<invoke name="Invoke_1" partnerLink="NestedSchemaTest"
portType="ns1:NestedSchemaTest" operation="process"
inputVariable="Invoke_1_process_InputVariable" outputVariable="Invoke_1_process_OutputVariable" bpelx:inputHeaderVariable="yourVariable1, yourVariable2 .." bpelx:outputHeaderVariable="yourVariable1, yourVariable2 ..."/>
If you are invoking an asynchronous process then don't use bpelx:outputHeaderVariable extension.
<onMessage bpelx:headerVariable="variable_1 variable_2 ..." />
<reply bpelx:headerVariable="variable_1 variable_2..." />
Deploy your BPEL process and use TCP protocol monitor or obtunnel to see the SOAP headers in the SOAP envelop. Don't forget to set the "optSoapShortcut" property to "false" otherwise you wont be able to see the SOAP headers in obtunnel or TCP monitor. From oracle 10.1.3.1 this property is not available on the BPEL control so you need to add it in the <BPEL Home>/domains/<domain>/config/domain.xml as given below:
<property id="optSoapShortcut">
<name>Optimize SOAP invocations.</name>
<value>false</value>
<comment></comment>
</property>