#1 2012-07-03 13:37:18

sbystrov
New member
Registered: 2012-07-03
Posts: 1

Couldn't pass parameters to Job through web-service call

Please, help us solve a problem, we encountered with Talend.
We’ve created Job and Process (calling this Job) as web-service, but couldn’t pass parameters into it.

More details: a simple Job to add a person into MDM database, and Process, which calls this Job.
  The Process is:
1) Stylesheet

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:mdm="java:com.amalto.core.plugin.base.xslt.MdmExtension" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<xsl:template match="/" priority="1">
<exchange>
                <report>
                               <xsl:copy-of select="Update"/>
                </report> 
                <item>
                               <xsl:copy-of select='mdm:getItemProjection(Update/RevisionID,Update/DataCluster,Update/Concept,Update/Key)'/>
                </item>
</exchange>
</xsl:template>
</xsl:stylesheet>

2) Escape the item XML
<parameters>
<method>DECODE</method>
<algorithm>XMLESCAPE</algorithm>
</parameters>

3) Invoke the job
<configuration>
<url>http://localhost:8280/CreatePersonMDM_0.1/services/CreatePersonMDM</url>
<contextParam>
<name>xmlInput</name>
<value>{decode_xml}</value>
</contextParam>
</configuration>

Job algorithm: input value (context.xmlInput) receives component tFixedFlowInput and transfer it to component tExtractXMLField for parsing, and then transfer to tMDMOutput (through tMap). If this Job have default value, then everything works fine:
<Update>
                <UserName>user</UserName>
                <Source>genericUI</Source>
                <TimeInMillis>1339686714605</TimeInMillis>
                <RevisionID>null</RevisionID>
                <DataCluster>Registers</DataCluster>
                <DataModel>Registers</DataModel>
                <Concept>Person</Concept>
                <Key>799d6e86-d907-41b9-9f5d-169b738bfabc</Key>
                <OperationType>CREATE</OperationType>
                <LastName>LastName_42</LastName>
                <FirstName>FirstName_42</FirstName>
                <PatronymicName>PatronymicName_42</PatronymicName>
</Update>

…person was added to the MDM database. But if we call this Job as web-service and pass XML (such as described above), no XML parameters available from the Job, as if call was without parameters at all (it uses default values, or no values, if default was not set). The Job works, but incorrectly.

Where the mistake?


We are using "Talend Open Studio for MDM"
Version: 5.1.1
Build id: r84309-20120530-0633

Offline

 

Board footer

Powered by FluxBB