In an ideal world, a split-join service would pass any SOAP headers to the backend service and back without any effort.
In the real world, the headers inevitably get lost along the way.
There is apparently a predefined set of conditions that both the WSDL and the request must comply with for the headers to travel through safely; however, most services I see in the real world simply do not comply.
Making sure the headers reach their destination then becomes an exercise in hacking – unless you’re using GenericParallel.
Passing SOAP Headers to the Backend
To pass SOAP headers with the requests via GenericParallel, the caller just needs to include the whole SOAP envelope under the <Request> element. Every SOAP header defined there will be passed to the target service.
<typ:GPS xmlns:typ="http://genericparallel/types"> <typ:Requests> <typ:Request GPSTarget="Profile/RetrieveProfile"> <soap-env:Envelope> <soap-env:Header> <!-- this header will be passed to the Profile/RetrieveProfile service --> <pro:LOB xmlns:pro="http://profile">Internet</pro:LOB> </soap-env:Header> <soap-env:Body> <RetrieveProfile> <AccountNo>12345678</AccountNo> </RetrieveProfile> </soap-env:Body> </soap-env:Envelope> </typ:Request> ... more requests here ... </typ:Requests> </typ:GPS>
Passing SOAP Headers from the Backend
If a response contains SOAP headers, those headers will be provided in the GenericParallel response as well.
<types:GPSResponse xmlns:types="http://genericparallel/types"> <types:Responses> <types:Response GPSIndex="1" GPSBatchIndex="1"> <soap-env:Envelope> <soap-env:Header> <!-- this header was passed from the Profile/RetrieveProfile service --> <pro:LOB xmlns:pro="http://profile">Internet</pro:LOB> </soap-env:Header> <soap-env:Body> <RetrieveProfileResponse> ... profile here ... </RetrieveProfileResponse> </soap-env:Body> </soap-env:Envelope> </types:Response> ... more responses here ... </types:Responses> </types:GPSResponse>
If you would like to learn more, feel free to try GenericParallel.
My name is Vladimir Dyuzhev, and I’m the author of GenericParallel, an OSB proxy service for making parallel calls effortlessly.
I’m building SOA enterprise systems for clients large and small for almost 20 years. Most of that time I’m working with BEA (later Oracle) Weblogic platform, including OSB and other SOA systems.
Feel free to contact me if you have a SOA project to design and implement. See my profile on LinkedIn.
I live in Toronto, Ontario, Canada. Email me at firstname.lastname@example.org