Ask Your Question

Help with HttpClient Put request

asked 2018-01-11 15:23:52 -0500

juths gravatar image

I am building a flow where i need to invoke a http put request to a marklogic DB and i am using Http Client destination

Here are the config parameters : http://apssss:9080/api/documents?uri=... Authentication :Basic Data Format :Json Charset - UTF-8

I also have a expression evaluator that has - url = ${str:urlEncode(record:value('/uri'),'UTF-8')} before the HttpClient .

When I run this pipeline - I get a response back from the NoSQl database like below

Blockquote HTTP_40 - Error sending resource. Status: 500 Reason: Internal Server Error <html xmlns=""> <head> <title>500 Internal Server Error</title> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="/error.css"/> </head> <body>

500 Internal Server Error

XDMP-ARGTYPE: (err:XPTY0004) xdmp:unquote(document{array-node{object-node{"application": text{"aa1"}, "tmdbAppSearch": text{"T...}}, (), "format-json") -- arg1 is not of type xs:string
in /document-update.xqy, at 41:6, in xdmp:function(xs:QName("local:document-update"))() [1.0-ml]
$uri = "/IS0/appserver/datasource/aps7777-DefaultEJBTimerDataSource-..."
$collection = "dev"
$temporal-collection = "appserverdatasource"
$collection = "dev"
$collection = "dev"
$body = document{array-node{object-node{"application": text{"aa1"}, "tmdbAppSearch": text{"T...}}
in /document-update.xqy, at 196:0 [1.0-ml]
</body> </html>

Can you please help me troubleshoot what the issue is ? is there a log where I can see the request sent out ? I am very new to StreamSets . Thanks J

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-11 16:12:33 -0500

jeff gravatar image

Look for the Enable Request Logging and associated options under the Logging tab for your HTTP stage. That will log the request/response headers/payload, which will hopefully help you figure out why the server doesn't like the request.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-01-11 15:23:52 -0500

Seen: 688 times

Last updated: Jan 11 '18