|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Unconvertable character Error while Parsing |
« View previous topic :: View next topic » |
Author |
Message
|
wmbv7newbie |
Posted: Sat Oct 17, 2015 8:07 pm Post subject: Unconvertable character Error while Parsing |
|
|
Centurion
Joined: 13 May 2014 Posts: 121
|
Hi,
I am doing a simple PoC to test the services of a REST API. It's a simple flow where I set the HTTP properties, send an HTTP Request and read the response.
I am setting below properties in the header -
Code: |
SET OutputRoot.Properties.CodedCharSetId = 1208;
SET OutputRoot.Properties.Encoding = 546;
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/json';
|
The call is successful but I am getting an 'Unconvertable Character' in the response. Below trace -
Quote: |
Message
Properties
HTTPRequestHeader
HTTPResponseHeader
X-Original-HTTP-Status-Line HTTP/1.1 200 OK
X-Original-HTTP-Status-Code 200
Date Sun, 18 Oct 2015 02:59:17 GMT
Content-Type application/json; charset=utf-8
Connection close
Server nginx
Vary Accept-Encoding
X-OANDA-Exchange-Rates-API-Version 1.0.2
X-Rate-Limit-Remaining 103
Set-Cookie opc_id=387D88EE-7544-11E5-92BE-8F29F889AB3E; path=/; Expires=Wed, 15-Oct-2025 02:59:17 GMT
Content-Encoding gzip
JSON
Unconvertable character
RecoverableException
File /build/slot1/S900_P/src/DataFlowEngine/MessageServices/ImbDataFlowNode.cpp
Line 1155
Function ImbDataFlowNode::createExceptionList
Type ComIbmSOAPInputNode
Name SendRequestToOANDA#FCMComposite_1_8
Label SendRequestToOANDA.SOAP Input
Catalog BIPmsgs
Severity 3
Number 2230
Text Node throwing exception
Insert
RecoverableException
File /build/slot1/S900_P/src/DataFlowEngine/PluginInterface/ImbJniNode.cpp
Line 1304
Function ImbJniNode::evaluate
Type ComIbmHTTPHeaderNode
Name SendRequestToOANDA#FCMComposite_1_10
Label SendRequestToOANDA.HTTP Header
Catalog BIPmsgs
Severity 3
Number 2230
Text Caught exception and rethrowing
Insert
RecoverableException
File /build/slot1/S900_P/src/DataFlowEngine/MQLibrary/linklib/ImbMqOutputNode.cpp
Line 877
Function ImbMqOutputNode::evaluate
Type ComIbmMQOutputNode
Name SendRequestToOANDA#FCMComposite_1_5
Label SendRequestToOANDA.MQ Output
Catalog BIPmsgs
Severity 3
Number 2230
Text Caught exception and rethrowing
Insert
ParserException
File /build/slot1/S900_P/src/DataFlowEngine/JSON/ImbJSONParser.cpp
Line 176
Function ImbJSONParser::refreshBitStreamFromElementsInner
Type ComIbmSOAPInputNode
Name SendRequestToOANDA#FCMComposite_1_8
Label SendRequestToOANDA.SOAP Input
Catalog BIPmsgs
Severity 3
Number 5706
Text JSON writing errors have occurred
RecoverableException
File /build/slot1/S900_P/src/CommonServices/ImbConverter.cpp
Line 583
Function ImbConverterCPP::internalToUnicode
Type
Name
Label
Catalog BIPmsgs
Severity 3
Number 2135
Text Unconvertable character
Insert
Insert
Insert
Type 2
Text 1208
|
It looks like some kind of mismatch in the way I am reading the response but somehow not able to figure it out.
The request gives expected response in SOAP UI and Postman client. Also, there are no special characters involved.
Same behaviour with XML format as well, since the API gives us flexibility to get response in either formats. The last 'Text 1208' in the parser exceptions gives me an impression that it has to do something with thw CCSID I am setting. But since API header says UTF-8, I am using 1208/546. Is this something that I should confirm with the service providers?
I tried changing a few things on the compression/decomp part, changing CCSID to 1209 but nothing worked. Can someone guide me a little please?
Thanks! |
|
Back to top |
|
 |
wmbv7newbie |
Posted: Sun Oct 18, 2015 1:09 pm Post subject: |
|
|
Centurion
Joined: 13 May 2014 Posts: 121
|
Issue solved when I changed the Content Type to 'application/json; charset=utf-8' instead of application/json following the HTTPResponseHeader. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Oct 18, 2015 3:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
and thanks for sharing the solution  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|