Using Web Services in Talend

One Star

Using Web Services in Talend

Hi,
I am evaluating Talend on behalf of a client.
I have a scenario where I need to call multiple web services. The first web service call returns a security token (a string value) - All subsequent web service calls use this security token (passed as a parameter).
I cannot figure out how to use this security token in the subsequent calls. Do I need to assign this value to a global variable, then merge this variable into the flow??
Also, most of my web service calls require a complex type as an input. Talend doesn't seem to expose complex types from my wsdl as schemas i can use. Is there a trick to do this?
Regards,
D.
Community Manager

Re: Using Web Services in Talend

Hi
I suggest you to learn tWebServicecomponent, the job looks like:
tWebservice_1--main--tWebservice_2--tLogRow
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Using Web Services in Talend

Thanks for your reply Shong.
I dont have a problem understanding how to use the output from one service call as the input to another!
My need is more specific where the result from the first web service call is used in the input of every subsequent web service call
e.g.
t_Webservice_1--main--tSetGlovalVar_1
But further down the processing chain, when i want to do this..
t_Webservice_2--main--tLogRow
How do i include the global variable in the input mapping for the second web service call?
Regards,
D.
Community Manager

Re: Using Web Services in Talend

Hi
You can use tFixedFlowInput to generate the data flow and pass it to t_Webservice_2 as input parameters. for example:
t_Webservice_1--main--tSetGlovalVar_1
|
onsubjobok
|
tFixedFlowInput--main--t_Webservice_2--main--tLogRow
on tFixedFlowInput, define the columns which you need to pass them to twebservice_2 as input paramter on the schema, and set its value like:
column:value
idSmiley SadInteger)globalMap.get("id_key")
//id_key is a key of a global variable defined on tSetGlovalVar_1.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Highlighted
One Star

Re: Using Web Services in Talend

Thanks Shong,
That makes sense.
I am trying to understand if Talend can import complex types from a WSDL and create schemas from these types?
The closest I have come to correctly consuming my service is using tWebServiceInput and using the advanced features to generate client stubs - then, mapping the inputs and outputs in the code window.
is this the only option for working with external complex types?
Regards.
D.
Community Manager

Re: Using Web Services in Talend

Hi
Have you tried tWebservice component for the complex types? Can you please show us an example of a WSDL?
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Using Web Services in Talend

Hi Shong,
Yes, I have tried the tWebService component.
The component does present my complex types in the input and output mappings section (although it insists on presenting my type as an array?)
Ideally, I'd like to map my complex type to an "instance" of the type, if that makes sense.
I have emailed you directly a link to our WSDL.
Kind Regards,
D.
One Star

Re: Using Web Services in Talend

Hi Shong,
Did you have a chance to look at my WSDL?
D.
One Star

Re: Using Web Services in Talend

Hi shong, david.
M new to talend and stuck in a sitiation.
I have a job in where i need to invoke a webservice.
and here i have the working wsdl url with me.
Can you suggest me the ways to do it.
Thanks