GenericParallel Primer: Passing the User Headers

How to pass OSB user headers to and from the backend service in a parallel call.

ag1AMvX

A split-join service drops all user headers. End of story.

This is because split-join is not really an OSB service, but an implementation of a BPEL engine. It has no idea of OSB-specific concepts such as user headers.

As usual, GenericParallel has a built-in workaround for this limitation.

Passing User Headers to the Backend

To pass user headers with requests via GenericParallel, the caller just needs to include them as attributes of the <Request> element. Any attribute that is not GPS’s own, will be passed down to the target service as a user header.

In the example below a user header named DebugId with a value “100500” will be passed to the Profile/RetrieveProfile service.

<typ:GPS xmlns:typ="http://genericparallel/types">
  <typ:Requests>
   <typ:Request GPSTarget="Profile/RetrieveProfile" DebugId="100500">
       <RetrieveProfile>
         <AccountNo>12345678</AccountNo>
       </RetrieveProfile> 
     </soap-env:Envelope>
   </typ:Request> 

   ... more requests here ...

  </typ:Requests> 
</typ:GPS>

Passing User Headers from the Backend

If the response contains user headers, they will be provided in the GenericParallel response as well.

The headers will be returned as attributes of the <Response> element. In the example below, the response contains the user header DebugActualBackendDb with value “E12”.

<types:GPSResponse xmlns:types="http://genericparallel/types">
  <types:Responses>

    <types:Response GPSIndex="1" GPSBatchIndex="1" DebugActualBackendDb="E12">
    ...
    </types:Response>

    ... more responses here ...

  </types:Responses>
</types:GPSResponse>

If you’d like to learn more, feel free to try GenericParallel.

Vladimir Dyuzhev, author of GenericParallel

About Me

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.  canada   Email me at info@genericparallel.com


Tags: , , , ,
2 comments on “GenericParallel Primer: Passing the User Headers
  1. Thanks for the article. How do I pass XML as a User Header. My use case is, I am calling a Proxy with a XML as a User Header, and in normal call, i will put it in Transport Header. Not sure if this is applicable in Generic Parallel.

    • Vlad Dyuzhev says:

      You can try and use fn-bea:serialize() to convert XML into an escaped string and put that string into GPS attribute, and then fn-bea:inlinedXML() to convert that string back to XML inside of a receiving proxy.

Leave a Reply

Your email address will not be published. Required fields are marked *

*