One Star

create concrete WSDL with input and output

Hello,
I want to expose a webservice to a partner and this should be done via the WSDL of the webservice, but I got some issues with that. The WSDL created by TOS does not specify what kind of input is required and what the response will be.
I checked http://talendforge.org/wiki/doku.php?id=doc:export_as_webservice but this example does not use the WSDL to call the webservice, it uses the URL with some parameters. This is not how webservices should work. And If I look as the WSDL of this example is does not have any input or output defined and my webService testtool raises an alert because the result of the webService is not valid.
Any idea how to make a proper WSDL (with input and output defined) , which than could be tested for example in SoapUI.
Also, the soapbinding:address field in the WSDL is not the same as the URL to call the webService, any idea how to fix this? I found several threads in the Forum but non gave an answer.
Thanks,
Stefan
12 REPLIES
Seventeen Stars

Re: create concrete WSDL with input and output

hi,
when you export a job like a web service you can access the wsdl file with url like :
http://localhost:8080/ws01_0.1/services/ws01?wsdl

If you want to use this web service, point your client soap to this description wsdl.
for example in php
<?php
$wsdl="http://localhost:8080/ws01_0.1/services/ws01?wsdl";
$service = new soapClient($wsql); // with soap php extension
print_r($services->__getFunctions ()); // get function service can use
print_r($service -> runJob()); // to run default talend method
?>

To have a more human readable wsdl file you also use the xslt style sheett by vanek.
Save wsdl and add <?xml-stylesheet type="text/xsl" href="wsdl-viewer.xsl"?> in the PI (process instruction) !
Open the result with your favorite browser ... firefox, opera, chrome , safari Smiley Happy
I'm also just start with Web service so perhaps it's not what you're looking for ...!
regards
laurent
edit:
you also add the vanek xslt directly in your j2ee server : apache-tomcat-6.0.26/webapps/ws01_0.1/wsdl after deployed war archive !
@talend team : Is it possible to add ( feature) this option in the dialog box when export job in Talend ? a check button "generate html documentation" ??
One Star

Re: create concrete WSDL with input and output

Hi,
Thanks for the input. this is not really what I am looking for.
Lets say you create a Axis export of your job. If you unzip the .war you will find a wsdl dir and inside this dir a wsdl file describing your job.
if you open this WSDL you will find a wsdlsoap:address in the there. The value for this is not identical to what the location of the webservice is when you deploy it.
In other words if you want to use this WSDL in, lets say SoapUI, it wont work as the endpoint is not right.
The second issue is, that the WSDL does not contain the correct definition for the input and also not for the reply. Therefore my partners are not able to develop against this WSDL in order to consume my webservice. So how can I create a proper WSDL or how can I define an input/ouptut to my job, so t hat the WSDL is created correctly.
Right now my WSDl contains an input args, but nowhere in the WSDL is defined what args should be.
lets assume i want have a webservice adding up 2 numbers. the Input for the WSDl should state
- numA
- numB
and the Output should state:
- sum
How can I get more than args and runjobReturn in my WSDL?
Stefan
One Star

Re: create concrete WSDL with input and output

Anybody any idea?
Is it only me who wants to get a wsdl containing well defined input and output?
Please let me know if this is something unusual for Talend.
Also what are the usual ways for you guys to start a job? Is the webservice the default way?
Thanks, Stefan
Community Manager

Re: create concrete WSDL with input and output

Hello
The commercial verison Talend Integration Suite gives access to a Service Oriented Architecture
(SOA) manager. This SOA manager enables you to expose jobs accomplished in Talend
Integration Suite Studio in a Web service-centric environment and thus establish interoperability
across multiple applications and systems. When you deploy the soa service and add the operators, you can define the input parameters and output parameter type. (please see my screenshot)
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: create concrete WSDL with input and output

ahhhh good to know. So what is the way to achieve some kind of integration with the free version?
Stefan
One Star

Re: create concrete WSDL with input and output

What version of TIS is this? We are interested in using Talend to setup Web Services
Community Manager

Re: create concrete WSDL with input and output

Hello
to slenke, SOA manager is only avaliable in TIS.
to Matthew Counts, I remember we add SOA manager since TIS3.0.0, the latest version is TIS4.0.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: create concrete WSDL with input and output

Shong,
According to Talend's Web Site www.talend.com and the "Data Integration Features Comparison Matrix". Under Deployment Facilities, it is possible to Expose a Job as a web service in all Talend products TOS and TIS. Is this not the case?
If the Matrix is accurate? What is the different between "Expose a Job as a web service" in the matrix, and what you stated earlier about using the SOA manager?
Thanks,
One Star

Re: create concrete WSDL with input and output

Hi,
Thanks for the input. this is not really what I am looking for.
Lets say you create a Axis export of your job. If you unzip the .war you will find a wsdl dir and inside this dir a wsdl file describing your job.
if you open this WSDL you will find a wsdlsoap:address in the there. The value for this is not identical to what the location of the webservice is when you deploy it.
In other words if you want to use this WSDL in, lets say SoapUI, it wont work as the endpoint is not right.
The second issue is, that the WSDL does not contain the correct definition for the input and also not for the reply. Therefore my partners are not able to develop against this WSDL in order to consume my webservice. So how can I create a proper WSDL or how can I define an input/ouptut to my job, so t hat the WSDL is created correctly.
Right now my WSDl contains an input args, but nowhere in the WSDL is defined what args should be.
lets assume i want have a webservice adding up 2 numbers. the Input for the WSDl should state
- numA
- numB
and the Output should state:
- sum
How can I get more than args and runjobReturn in my WSDL?
Stefan

I am also interested in this same capability and using Talend. The thread sort of ended without an
answer of how to support the feature if you are using the Community Version of Talend Open Studio.
I'm current running 4.0.2
Any help or other references are appreciated!
One Star

Re: create concrete WSDL with input and output

I have been trying to do this also, but required multiple return fields i.e. a set of address lines to load into a forms package. The package couldn't handle the array of strings, so I needed individual fields to be named.
I have been investigating the different types of return values from TIS, and I can see how a single return value can be achieved as shown in the thread, however I can't find any way to return multiple "named" values.
So to take slenke's example a step further, I'd like to return say the sum and the subtracted value.
So my returned soap message would contain two individual fields:
<sum>9</sum>
<subtract>1</subtract>
So what I would like to understand is, is there a way to convert a pre-defined schema into a wsdl with named fields or use a custom wsdl instead of the talend generated wsdl.
One Star

Re: create concrete WSDL with input and output

I have the same problem as Rick. Is there going to be any solution in TIS 4.1?
One Star

Re: create concrete WSDL with input and output

Hi
I am facing the similar problem and have posted my problem at the below thread:
http://www.talendforge.org/forum/viewtopic.php?pid=46950#p46950

Please help
Z