How does Java Client and Java Transformer stage works?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
mayank.chaudhary
Participant
Posts: 1
Joined: Fri Aug 03, 2007 5:45 pm
Location: CA

How does Java Client and Java Transformer stage works?

Post by mayank.chaudhary »

Hi,
I am new to DataStage, and am working on 8.0 ver.

1) I want to know as how to use the Java Transformer and Java Client stage.
I am not able to find any information/tutorial on this.

2) I have to communicate to a third party application using the webservice stages. The third party application has exposed some webservices which i have to call from DataStage webservice stages.
Also, this third party application exposes a Java API and i have to pass the Java classes defined in this API as object parameters while making the webservice call.
How do i read this API from datastage.

When i import the .wsdl file provided by the third party application, in the webservice meta data importer, i just get the name of the operations which are defined in the wsdl. It does not import the corressponding java classes from the API, which i have to use as parameters while making the webservice call.

Can anyone help me in this?
Mayank Chaudhary
asaf_arbely
Premium Member
Premium Member
Posts: 87
Joined: Sat Jul 14, 2007 2:24 pm

Post by asaf_arbely »

Hi,

Hope I can answer your first question regarding the Java PACK. I used to work with the Java PACK on v 7.5.2, but I believe it did not change alot.

I general, a Java stage is a simple class that inherits the Stage class provided by IBM.

You should implement 2 methods: initialize() and process().

initialize() is called once when the job is started. Then, process() is called for each row that is sent to that java stage via the input link.

You compile your class with your favourite compiler, so it can be used by DataStage.

When placing it on the canvas, you should provide your class name, relevant class path that should include other packages used by your java class, parameters, etc.

Please note that for each java stage on your canvas DataStage will start a new JVM (it means that if you placed two java stages on your canvas, two seperate JVMs afre started, that do not share anything between them.

Please note also that the Java stage, for some reason, will process all input rows before transffering them to the output link.

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

Post by eostic »

The Java Transformer will do row-by-row (one input row, one output row)....the JavaClient Stage will probably implement classic passive stage functionality (when used in a Server Job) and exhibit the "finish all input rows before output rows" behavior.

The api is very well documented.

Ernie
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Mayank,
You need to read the .pdf files for Java PACK, WebService PACK, and RTI's Job Control Web Service documentation. Each of them has some examples. Sinec you are using version 8.0.1, then you need to read the extra SOA guide.

WSDL describes your Web Services' operations. I have no idea what you are talking about "that you imported the metadata, but it didn't import the corresponding java classes from the API"???
Post Reply