Send message to RPC API by using tXMLRPCInput component

Highlighted
Five Stars

Send message to RPC API by using tXMLRPCInput component

Hi All,

 

I have created a customer by using a RPC API according the specifications below:

UserAdd.JPG

This is how I have configured my tXMLRPCInput compontent in Talend:

 

2.JPG

In this case I have already prefilled some values in global variables and I'm also using a context variable. This works perfect!!!

 

I also want to update a user in case the user already exists. This are my specifications to edit a user:

 

Specs.JPG

The XML structure should look something like this (to update the firstname):

Message.JPG

This is how I have configured my tXMLRPCInput component in Talend:

3.JPG

My question is how I need to define the "struct" part (highlighted in yellow)? I can't define a struct class in this case.

I basically need to add this part to the message:

 

<struct>
   <member>
      <name>firstname</name>
      <value>
          <string>piet2</string>
      </value>
   </member>
</struct> 

 

Please help me because I'm out of options right now.

 

Thanks in advance

Tags (1)
Moderator

Re: Send message to RPC API by using tXMLRPCInput component

Hello,

What's your source file? Are you trying to parse data from an XML file and pass its elements as parameter values to a RPC API by using tXMLRPCInput component?

If so, you could read your XML file and then retrive the root element node, parse it and store the values in globalMap on tJavaRow.

tFileInputXML--main--tJavaRow--oncomponentok--tXMLRPCInput--main--tLogRow

Let us know if it is what you are looking for.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read