Discussion:
HTTPClient connector and REST return value
(too old to reply)
Panste Frankee
2017-08-04 09:57:54 UTC
Permalink
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
Permalink
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
Permalink
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
Permalink
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
p***@gmail.com
2018-09-04 12:59:15 UTC
Permalink
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?
Same kind response I am getting from TDI connector of REST API ...Any Idea to resolve this ...TDI version is 7.2
p***@gmail.com
2018-09-04 13:09:23 UTC
Permalink
Post by p***@gmail.com
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?
Same kind response I am getting from TDI connector of REST API ...Any Idea to resolve this ...TDI version is 7.2
8:38:23,461 INFO - [Add] CTGDJP422I Authentication information from the Entry: http.remote_user=ADMIN, http.remote_pass=*****.
18:38:23,461 INFO - [Add] CTGDJP426I Authentication information: username:ADMIN, password: *****.
18:38:23,461 INFO - [Add] CTGDJP427I Authorization result: Basic QURNSU46QURNSU4=.
18:38:23,462 INFO - [Add] CTGDJP411I HTTP Parser entry being written has header set to 'Content-Type'.
18:38:23,462 INFO - [Add] CTGDJP411I HTTP Parser entry being written has header set to 'Authorization'.
18:38:23,462 INFO - [Add] CTGDJP411I HTTP Parser entry being written has header set to 'Accept'.
18:38:23,463 INFO - [Add] CTGDJP430I HTTP body for the HTTP Parser: {"AGENT_PRIVILEGES":"READ_ONLY","AGENT_EMAIL":"***@gmail.com","TRANSACTION_ID":"1234crdr123","AGENT_CIRCLE":"12","OPERATION_NAME":"ADD","AGENT_ID":"a1253179","AGENT_LOCATION":"DELHI","AGENT_NAME":"PADAM","AGENT_PASSWORD":"***@122"}.
18:38:28,074 INFO - [Add] CTGDJP405I HTTP Parser will read an entry using the character set 'ISO-8859-1'.
18:38:28,074 INFO - [Add] CTGDJP402I HTTP Parser will read a line from the input stream using character set 'ISO-8859-1'.
18:38:28,074 INFO - [Add] CTGDJP403I HTTP Parser starting to reading line.
18:38:28,379 INFO - [Add] CTGDJP406I HTTP Parser read in the following line: 'HTTP/1.1 200 '.
18:38:28,379 INFO - [Add] CTGDIS525I Closing Parser on output stream.
18:38:28,389 INFO - [Add] CTGDIS524I Closing Parser on input stream.
18:38:28,389 INFO - [Add] CTGDIS525I Closing Parser on output stream.
18:38:28,399 INFO - [Add] CTGDIS495I handleException , callreply, java.util.NoSuchElementException: No more tokens in String
18:38:28,399 INFO - [Add] CTGDIS350I Hook callreply_fail [1].
18:38:28,399 INFO - [Add] CTGDIS353I Script is: task.dumpEntry(error);
18:38:28,399 INFO - CTGDIS003I *** Start dumping Entry
18:38:28,399 INFO - Operation: generic
18:38:28,399 INFO - Entry attributes:
18:38:28,399 INFO - status (replace): 'fail'
18:38:28,399 INFO - connectorname (replace): 'Add'
18:38:28,399 INFO - operation (replace): 'callreply'
18:38:28,399 INFO - exception (replace): 'java.util.NoSuchElementException: No more tokens in String'
18:38:28,399 INFO - message (replace): 'No more tokens in String'
18:38:28,399 INFO - class (replace): 'java.util.NoSuchElementException'
18:38:28,399 INFO - CTGDIS004I *** Finished dumping Entry
j***@gmail.com
2018-09-05 03:01:06 UTC
Permalink
Please apply the latest SDI 7.2 fixpack. Here is a link to the list of recommended fixpacks for TDI and SDI: http://www-01.ibm.com/support/docview.wss?uid=swg27010509
Loading...