Webservices

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
tsktsk123
Participant
Posts: 32
Joined: Thu Dec 25, 2003 11:59 am

Webservices

Post by tsktsk123 »

through webservices. I am new to webservice pack of DS. While loading data to the Database, parallely we have to load the records into Filenet by calling their webservices. The job to load the Database is already created in PX. Using WSTransformer will it be possible to take the input in table structure and get the output in XML .

Appreciate greatly any help

Thanking in advance.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Yes...but there may be other challenges.....

First, get a copy of the WSDL. Determine if it needs security information, SOAP header details, and whether or not you'll need to go thru a proxy. See if you can import and test the Service Operation using an external testing tool (such as XMLSpy, Rational tooling with the Web Services Explorer, SOAPScope, etc.). Try to get a copy of a real request envelope and a resoponse envelope....

...in the simplest of cases, you'll be able to import the WSDL (Import...Table Definitions...WSDL Definitions) then select the Operation within the WSTransformer Stage, load the Message tabs on the input and output and you'll be done..... in harder cases you'll need to parse out the response yourself, using a custom user message from the Output side of the WSTransformer, and in some cases you'll want to prepare the request envelope beforehand, along with header details.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
tsktsk123
Participant
Posts: 32
Joined: Thu Dec 25, 2003 11:59 am

Post by tsktsk123 »

Thank you very much Ernie !!

I need some more clarification.Please correct me if i am wrong, my input will be Oracle stage, as the data is present in tables and i need to send these data to filenet through their webservices, will the below design fine (i didn't get the webservice, otherwise would have been able to test)

OracleStage (Input) --> WSTransformer

1 Will the WStransformer internally convert the table data into the structure required for the webservices.
2 As i have to send the data to filenet queues , will i require to use any other stage for output or will the webservice take care of dropping the records into Filnet

Thanking you in advance
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The first question is answered by the WS Transformer...it does all of the SOAP and HTTP handiwork (unless it's one of those cases where you have to build the SOAP XML bits yourself --- but even in that case the WSTransformer will do all of the HTTP stuff and communicate with the remote Web Service endpoint).....the second depends on FileNet and their Web Service. Ostensibly, it could/should do everything --- accept your input, validate it, INSERT it somewhere, etc. and then send you a return code ---- on the other hand, it may only do one simple step and require that you call a second or third service...you will need the WSDL for the service along with any documentation that is provided on how it is used by itself or in context with other FileNet services. Seeing as how it's an IBM product and "in the family," I'd like to see it too...

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
tsktsk123
Participant
Posts: 32
Joined: Thu Dec 25, 2003 11:59 am

Post by tsktsk123 »

Thank you very much Ernie for your valuable input.
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Post by srinivas143 »

Hi Ernie,

As you mentioned in the below post

"in harder cases you'll need to parse out the response yourself, using a custom user message from the Output side of the WSTransformer, and in some cases you'll want to prepare the request envelope beforehand, along with header details."

Help me out ..how to create header for the same using any of the webservices stages.....how to proceed further...


Kind Regards
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The WSTransformer Stage has a property for specifying the SOAP header....it allows you to select a column on the link that has the header content. Presumably, you would build this content in an upstream stage, perhaps using XMLOutput..... for most headers though, it's simplest to just build it in a Derivation upstream.....and for testing and prototyping, I usually take a sample SOAP envelope from the application specification or a test result using a tool like SOAPscope or XMLSpy, and cut/paste the header into a Derivation....... once I have things working, I then build the Header manually with whatever variables it might need (perhaps a value in the header comes from an upstream Lookup)....

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Post by srinivas143 »

Thanks a lot for your input.

First time I was working on this stuff.

Could you please help me out how to generate a header in XML output stage??

I was able to see the header option on the stage properties...and it's need to be a check box enabled ..then its asking for Load(client)..

Could you please help me..


Kind Regards
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Get the job working first by hard coding the entire header in quotes in a Derivation upstream from WSTransformer. Just a large string column called "myheader" with "<soap:Header><elements.................". Take it right from a functional capture of a SOAP envelope from a real invocation in some testing environment. Get that to work perfectly. Once that is done you can determine if XMLOutput would be useful. If the header is not that complex, forget it...just hard code it. Leave XMLOutput to more difficult XML ---- headers are usually very simplistic, unless they require WS-Security, which is beyond this thread.

XMLOutput on its own requires skills.....search the forum. There are many entries on using XMLOutput, something that, if you choose to use, should be tested and played with on its own, outside of interaction with WSTransformer, until you can use it to perfectly build your SOAP header string.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply