Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing XML body to REST API client

Hi All,

 

First let me say that I am really, really, really new to Talend, but not to IT.  I know what I want to do, but I need help figuring out how to do it in Talend.

 

I am trying to pass a small bit of XML to a tREST_Client.

Here is what I have so far:

0683p000009LzaX.png

As you can see I have an exclamation point which is there because of:

Warning: No schema has been defined yet

Error: Parameter (Mapping) must have at least one value.

 

When I run the job as is I get the following:

0683p000009LzvE.png

 

I am trying to access Quickbase, but to do that the first thing you have to do is get an authentication token which I am planning to write to the outfile and retrieve it for the next process.

The working curl statement I have is:

curl --request POST \
  --url https://mycompany.quickbase.com/db/main \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/xml' \
  --header 'quickbase-action: API_Authenticate' \
  --data '<qdbapi>\n   <username>me@mycompany.com</username>\n   <password>ReallyCleverPassword01</password>\n   <hours>1</hours>\n   <udata>optional data</udata>\n</qdbapi>'

 

Any thoughts on where I am going wrong?

 

Thanks!

Labels (4)
1 Reply
Anonymous
Not applicable
Author

Hello,

If you want to pass directly the xml file as request to the web service when calling, read the root element as a node, see below:

0683p000009LzvO.png

Best regards

Sabrina