Discussion:
HTTPClient connector and REST return value
Add Reply
Panste Frankee
2017-08-04 09:57:54 UTC
Reply
Permalink
Raw Message
So we've created a simple HTTPClientConnector to send a piece of JSON to a REST-server. It seems to be working on some level because we're getting HTTP 200 OK result back from the server. However, right after that we receive this weird looking error:

INFO - [HTTPClientConnector] CTGDJP403I HTTP Parser starting to reading line.
INFO - [HTTPClientConnector] CTGDJP406I HTTP Parser read in the following line: 'HTTP/1.1 200 '.
INFO - [HTTPClientConnector] CTGDIS495I handleException , callreply, java.util.NoSuchElementException: No more tokens in String
INFO - [HTTPClientConnector] CTGDIS350I Hook default_fail [1].

The server sends a response with content length 0 so I'm not sure if that's no an issue or what. We construct the JSON message simply by creating an hierachical entry and then just using to toJSON-method and it seems to be OK.

There's currently no parser selected for the connector. Any ideas?
Eddie Hartman
2017-08-05 18:04:29 UTC
Reply
Permalink
Raw Message
Post by Panste Frankee
INFO - [HTTPClientConnector] CTGDJP403I HTTP Parser starting to reading line.
INFO - [HTTPClientConnector] CTGDJP406I HTTP Parser read in the following line: 'HTTP/1.1 200 '.
INFO - [HTTPClientConnector] CTGDIS495I handleException , callreply, java.util.NoSuchElementException: No more tokens in String
INFO - [HTTPClientConnector] CTGDIS350I Hook default_fail [1].
The server sends a response with content length 0 so I'm not sure if that's no an issue or what. We construct the JSON message simply by creating an hierachical entry and then just using to toJSON-method and it seems to be OK.
There's currently no parser selected for the connector. Any ideas?
Be sure not to attach the JSON Parser directly to the HTTP Connector. Instead, grab the http.bodyAsString attribute after you get your response and handle it yourself (along with the http result code). Also make sure you have the latest fixpack for your TDI version. You can find the list here:

http://www.tdi-users.org/foswiki/Integrator/WebHome
Panste Frankee
2017-08-07 11:51:39 UTC
Reply
Permalink
Raw Message
Post by Eddie Hartman
http://www.tdi-users.org/foswiki/Integrator/WebHome
OK I guess this time the fixpack 7.1.1 FP6 did the trick. :) I was running on FP-level 4. Thanks, should have figured this one out myself, though.
Eddie Hartman
2017-08-07 19:18:06 UTC
Reply
Permalink
Raw Message
Glad you sorted it out! Yes, applying the latest FP is usually a good starting place. And thanks for sharing your success, Panste :D

-Eddie

Loading...