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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing payload to tRESTClient as String instead of type Document

/
Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi, you probably need to use the component that supports a direct DOM to String conversion (tXmlWriteOutput or similar) and then pass String to tRESTClient (set body type to String)
HTH, Sergey
Anonymous
Not applicable
Author

/
Anonymous
Not applicable
Author

Hi, sorry, I meant tWriteXmlField...Hmm, I'm actually not sure which component can be used to convert XML DOM to String...May be you need to introduce a tJava after tXmlMap and use DOM4J API to convert DOM to String.
tRESTClient itself has a body of type String. May be the reason you see this exception is that you still pass DOM to tRESTClient...
Cheers, Sergey
Anonymous
Not applicable
Author

/
Anonymous
Not applicable
Author

The problem is you have tXmlMap connected directly to tRESTClient, and tXMlMap produces DOM4J AFAIK....
You don;t really need tXmlMap unless you intend to pass Document to tRESTClient, if you have a String available then simply drop tXMLMap and pass it directly to tRESTClient body 0683p000009M9p6.pngtring...
HTH, Sergey
Anonymous
Not applicable
Author

/
Anonymous
Not applicable
Author

Hi, passing DOM4J to tRESTClient or tRESTResponse relies on the ability of CXF-specific providers convert to XML or JSON string. So if you need to control the way String is created you need to do it in the studio
HTH, Sergey