Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to read data (several rows) from a database table, build json strings from each row (by using tWriteJSONField) and send them to a REST service by a POST request.
But the tRESTClient component used with a POST method does not write the body. Is this a bug?
Someone else recommends using the tREST component but this component does not accept an input (row).
What else can I do?
Solved! I overlooked that the body must be of type document (not: String!)
Furthermore you can use tXMLMap to create such a document and pass it to tRESTClient.
In tRESTClient you can select ContentType JSON (althought you passed an XML document!!!) and in the Advanced settings check "Drop JSON Request Root".
In tXMLMap you create 2 attributes: body (of type document) and string (of type String). For an attribute of type document automatically a sub-element named "root" for looping is created. With a right-click on this root-element you can create next-level sub-elements where-to you can map your input-attributes...
Solved! I overlooked that the body must be of type document (not: String!)
Furthermore you can use tXMLMap to create such a document and pass it to tRESTClient.
In tRESTClient you can select ContentType JSON (althought you passed an XML document!!!) and in the Advanced settings check "Drop JSON Request Root".
In tXMLMap you create 2 attributes: body (of type document) and string (of type String). For an attribute of type document automatically a sub-element named "root" for looping is created. With a right-click on this root-element you can create next-level sub-elements where-to you can map your input-attributes...