Search code examples
esbtalend

Talend - ESB - SOAP webservice


I need to realize a Talend ESB project that basically have an input SOAP WS ,based on a parameter it needs to execute different subjobs.

This is the SOAP Request

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.talend.org/service/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:test_callOperationRequest>
         <user>user</user>
         <password>psw/password>
         <id_customer>test ESB</id_customer>
         <query>test mirror quality</query>
         <command>JOB1</command>
      </ser:test_callOperationRequest>
   </soapenv:Body>
</soapenv:Envelope>

So I'd like to call specific subjob based on "command" parameter (i.e.:JOB1).

This is my actual project structure: enter image description here

Any suggestion on right Talend component to use? Shall I include Routes?

Thanks in advance.


Solution

  • You can use the option "Use dynamic job" of tRunJob component :

    enter image description here

    Once you check the option, you get a field called "Context job", in which you specify the name of the child job you want to run, from a list of jobs that you choose by clicking "..." next to the Job field.

    You can connect tJavaRow_1 to tRunJob_1 by a main flow, and in the Context job field, specify the incoming flow's column containing the name of the job to run (in my example it's row2.JobToRun).
    The corresponding childjob is then called for each incoming row.