Adding Headers into Web Service

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Aquilis
Participant
Posts: 204
Joined: Thu Apr 05, 2007 4:54 am
Location: Bangalore
Contact:

Adding Headers into Web Service

Post by Aquilis »

Can anybody elaborate on including the Header and passing on them to Web Service Transformer ?
Actually I have two Input parameters UserId & Password through which I will be extracting Header details like 'ServerURL' and 'SessionId'. Now My query is,
How to send these two parameters as Header after getting connected to web service and get the Response back ? I was wondering, If I have only one parameter either 'SessionId' or 'URL' then i would have sent it directly to web server as Input Header, If i have two parameters , then what should be my strategy? Can anybody Elaborate :)
Aquilis
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It's not easy to do, but it can be done....you have to build the header separately in an upstream stage (Transformer, or xmlOutput if it is really large and complex).

As to your ultimate goal, if your service requires that you first "sign in" and then respond back with "another call" that includes the session ID, it will be difficult to accomplish in the ETL "row by row" stateless pattern supported by WSPack. You might need to consider alternatives.

Either way, send me a note offline with your email and I can send you an example.....

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Aquilis
Participant
Posts: 204
Joined: Thu Apr 05, 2007 4:54 am
Location: Bangalore
Contact:

Post by Aquilis »

Thanks Ernie,
I tried building the header with login details and the added specific hardcoded value (as it's SOAP over HTTPS) by creating the XML Response (using XML Output stage) and sending back to web service through Web Service Transformer.
But didn't succeed to make it work. So It would be very pleasing if you send me an example that you have. I ma sendign you an offline request with my email Contact.

It's very Appreciable.
Aquilis
Post Reply