• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to use Talend Job exported as webservices

#1 2009-06-02 15:24:44

Kazuki
New member
Registered: 2009-06-02
Posts: 5

How to use Talend Job exported as webservices

Hi,

I have made a Job Talend named myjob and export it as a webservice with .war extension. I copied the .war in the webapp directory of a Tomcat 5.5 server.

When I use the common way to run the service "http://localhost:8080/myjob/services/myjob?method=runJob" it work very well.
But, when I tried to use it in Flex or in soapui it doesn't work. The wsdl is find at http://localhost:8080/myjob/wsdl/myjob.wsdl but, when I tried to run the method "runJob" of the webservice I have no results.

Is there a way to use Talend webservices with SAOP ?

Thank you

Offline

#2 2009-06-03 08:28:19

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: How to use Talend Job exported as webservices

Hello guy

Read the related article on wiki.

Best regards

          shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2009-06-03 14:03:51

Kazuki
New member
Registered: 2009-06-02
Posts: 5

Re: How to use Talend Job exported as webservices

Hi,

I have seen this wiki but it doesn't explain how to call the webservice directly by using SOAP.
For example, I want to send a request on the method "runJob" which look like this :

Code:

POST http://localhost:8080/test HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8080
Content-Length: 300

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tal="http://talend.org">
   <soapenv:Header/>
   <soapenv:Body>
      <tal:args>
         <!--Zero or more repetitions:-->
         <tal:item></tal:item>
      </tal:args>
   </soapenv:Body>
</soapenv:Envelope>

Is it possible to use SOAP directly or I can only use the web interface ?

Offline

#4 2009-06-23 11:07:06

cyril.verhaest
Member
Registered: 2009-06-03
Posts: 12

Re: How to use Talend Job exported as webservices

Hello I have the same question.
How can I call Talend webservice with soap ?

Regards,
Cyril

Offline

#5 2009-06-23 11:45:55

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: How to use Talend Job exported as webservices

Hello All
a)Run the job on browser, enter the url: http://localhost:8080/myjob/services/myjob?method=runJob
b)Run the job on tWebserviceInput component, enter
WSDL: "http://localhost:8080/myjob/services/myjob?wsdl" 
Method name:"runJob"

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#6 2009-06-24 14:53:11

cyril.verhaest
Member
Registered: 2009-06-03
Posts: 12

Re: How to use Talend Job exported as webservices

Hi Shong,

Thanks for your response.
In my case a) and b) are OK !!!
I want to call the talend web service with soap in a php page.
The problem is that I don't know how to load web service parameter ...
You can see my code bellow :

---------------------
    try {
        $wsdl='http://localhost:8086/MyJob_v1_0.1/services/MyJob_v1?WSDL';
        $client=new soapclient($wsdl, array('trace'=>1));
// It doesn't work
        $param=array('--context_param%20CpyName=' + (String)$CpyName);
        $result=$client->runJob($param);
    } catch (SoapFault $fault) {
        trigger_error("SOAP FAULT: $fault",E_USER_ERROR);
    }
    echo 'REQUEST: ' . $client->__getLastRequest();
    echo "<BR>";
    echo 'RESPONSE: ' . $client->__getLastResponse();
    echo "<BR>";
---------------------

Offline

#7 2009-06-24 17:23:29

cyril.verhaest
Member
Registered: 2009-06-03
Posts: 12

Re: How to use Talend Job exported as webservices

I've found the solution :
------------------------------------------------------------------------
$param[0]='--context_param CpyName=' . (String)$CpyName;

Offline

#8 2009-06-25 07:24:22

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: How to use Talend Job exported as webservices

Hello guy
You have finished a good work! wink
I have show someone to run talend job in a JSP page, see [Forum, topic 6945] JSP java server page.
But I did't try to run it on a PHP page. Can you show us the whole page code or write down the steps to share it with all the users?

Thanks for your support!!!

Best regards
     
         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to use Talend Job exported as webservices

Board footer

Powered by FluxBB