I think this article describes it properly: https://sswaro.wordpress.com/how-to-use-soap-header-in-bpel/
At least for your common.xsd based header. For the wsse:Security part, it should be possible to do the same. However, I'd recommend to take a look into OWSM and set the UserName token policy on your service: http://desarrolloconsoa.blogspot.com/2016/10/owsm-and-ws-security-username-token.html
OWSM and WS-Security: Username Token Authentication for SOAP and REST Services in OSB 12c. (This is about OSB, but with SOA 12c it works about the same.)
Thanks for your quick response @Martien van den Akker
I am able to figure out the OWSM part. However I am still not able to figure out the way to pass below header parameters
Whether I have to use the same XSD (used for OWSM Username/Password ) to include the SourceSystemId, TxID & BusinessID and follow the mechanism used for passing Username/Password as headers?
Following the first blog I mentioned, you need to adapt your wsdl to include a wsdl:message based on the com:TransactionReference element. Then in the wsdl:binding on the input, you need to add a soap12:header based on that message and part="header":
Since you're referencing a wsdl, I think you should take an abstract version of the referenced wsdl, and create a wrapper wsdl that imports that abstract wsdl. And then in the wrapper wsdl, add a copy of the wsdl:binding and adapt that adding the header parts.
In BPEL you need to create a variable based on the same element in the xsd (or maybe messagetype from the wsdl) and add those to the receive:
Or in your case: the invoke.
Then in an assign you should set the header elements.
But, do you happen to have OSB as well? Then you could consider using OSB as a gateway. Because then you can skip adapting BPEL. Create an OSB service with a proxy as well as the business service based on the exact same wsdl. Have BPEL call the OSB service and the OSB Service call the referenced service. On the OSB Business Service you can set the WS-Username/Token policy. And in the pipeline you can adapt the header variable to insert the com:TransactionReference element.