Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Fetch value from database and insert into XML file in runtime

Hi ,

 

I am new to talend ESB, i am trying to fetch customer id by connecting to database and i am getting ex: 10 customer id's like(101,102,103......) now i want to iterate this value and insert into xml file dynamically.

 

please help me on this.

 

Labels (1)
  • Other

5 Replies
Anonymous
Not applicable
Author

Hello
Is it a new XML file for each id? Can you show us an example of XML file to explain your requirement?

Regards
Shong
Anonymous
Not applicable
Author

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://v2_3.customer.webservices.csx.dtv.com/">
<soapenv:Header/>
<soapenv:Body>
<v2:searchCustomers>
<customerData>
<CustomerID></CustomerID>
</customerData>
<securityUserId><securityUserID>
</v2:searchCustomers>
</soapenv:Body>
</soapenv:Envelope>

 

This is my input XML, where i need to pass value in runtime to securityiD and customerID. I am fetching these two values by querying database. 

Anonymous
Not applicable
Author

I am new to talend,please find attached screenshot (workflow.png) for the workflow i created.

Here i am to get values in tjava 

String cust_id=((String)globalMap.get("row1.CUST_ID"));
String create_user=((String)globalMap.get("row1.CREATE_USER"));

 

i have set these two variables and using the same in tXMLMap

 

please find attached screenshot txmlmap.png

But the values are not getting passed. please find below error .

 

<S:Envelope xmlns0683p000009M9p6.png="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S0683p000009M9p6.pngerver</faultcode>
<faultstring>The user supplied is not a valid Relate user.</faultstring>
<detail>
<ns2:RelateProcessingException xmlns:ns2="http://v2_3.customer.webservices.csx.dtv.com/">
<faultDetail>RelateProcessingException The user supplied is not a valid Relate user. CustomerServicesUtil:validateRelateUser:363 CustomerWebServiceImpl:validateRequest:75 CustomerWebServiceImpl0683p000009MAB6.pngrocess:66</faultDetail>
<message>The user supplied is not a valid Relate user.</message>
<relateExceptionCode>INVALID_USER</relateExceptionCode>
</ns2:RelateProcessingException>
</detail>
</S:Fault>
</S:Body>
</S:Envelope>

 

I don know whether its correct flow or not please guide me on the same.

 


tXMLMap.png
Anonymous
Not applicable
Author

Do you use a tFlowToIterate in the job to iterate the the input rows? I don't understand why you use a tJava component. Can you please a screenshot of your job?
Anonymous
Not applicable
Author

Hi ,

 

I am using tflowtoiterate and iteratetoflow component. As i am new i don know all the components available. 

 

please find attached screen shot(job image) i got the output(please let me know is this wrong process,I didnt work in talend so i don have much idea). But now i want to pass this response as input for the other web service will be invoked.(job 1 image)

i have done the flow its giving me an error:

 

Execution failed : Failed to generate code.
[org.eclipse.emf.codegen.jet.JETException: InvocationTargetException in WORKING1 job]
Job WORKING1 ended at 17:51 09/08/2017. [exit code=0]

 

Kindly help me on the same.

 

 

0683p000009Lw7j.png0683p000009LvoG.png

 

Thanks,

Padmini

 

 

 

 

 

 

 

 

 


JOB.png