|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Parser Error- httpRequest node |
« View previous topic :: View next topic » |
Author |
Message
|
Skumarmly |
Posted: Thu Jun 11, 2015 9:31 am Post subject: Parser Error- httpRequest node |
|
|
Novice
Joined: 09 Sep 2014 Posts: 13
|
Even after the backend successful call, am getting parser error
i am able to parse the resonse only through BLOB domain and all other domains are showing error, i am suppose to get response either in json or in xml
am setting these things in compute node before HTTP Request node to override the properties
SET OutputLocalEnvironment.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
SET OutputLocalEnvironment.Destination.HTTP.RequestLine.Method = 'POST';
SET OutputLocalEnvironment.Destination.HTTP.QueryString.grant_type = 'client_credentials';
SET OutputLocalEnvironment.Destination.HTTP.RequestURL ='https://ww.abcd.com/auth/oauth/v2/token';
SET OutputLocalEnvironment.Destination.HTTP.QueryString.client_id = 'kjfslakhflsag097350947shfsgd';
SET OutputLocalEnvironment.Destination.HTTP.QueryString.client_secret = '9e6dec90ee634783b0c596ce4e4396a1';
header:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Cache-Control: no-store
Content-Encoding: gzip
Content-Type: application/json;charset=UTF-8
Content-Length: 128
Date: Thu, 11 Jun 2015 16:01:44 GMT
but am not able to populate the message in either JSON /XML its is visible only in BLOB
am i missing anything to add in Request Header or Response header ?
below is the response am suppose to get ( below response is from Soap UI)
{
"access_token":"420ca316-609b-4c0e-a8a0-3ed913e3bb2f",
"token_type":"Bearer",
"expires_in":31536000,
"scope":"oob"
}
Response am getting has same content length as in Soap UI.
i tried to CAST BLOB to CHAR but its throwing parser error
kindly suggest me to either convert this BLOB to XML/json format or to get reponse directly in JSON /XML format |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 11, 2015 9:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Have you confirmed that the response is actually JSON or XML?
Have you confirmed the value of the property on the HTTPRequest node that controls how the response is parsed?
Have you taken a user trace to see what's going on? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 11, 2015 9:57 am Post subject: Re: Parser Error- httpRequest node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Skumarmly wrote: |
i am able to parse the resonse only through BLOB domain |
BLOB doesn't parse the data stream at all.
Skumarmly wrote: |
i am suppose to get response either in json or in xml |
How, in your application design, do you know which in any given circumstance? Do some calls return JSON while others return XML, or does any given call return either? Be specific.
Skumarmly wrote: |
am setting these things in compute node before HTTP Request node to override the properties |
That's nice - what does this have to do with your problem in your view?
Skumarmly wrote: |
i tried to CAST BLOB to CHAR but its throwing parser error |
Well even if you got the response as a character string, how would that help parsing it as JSON or XML?
Skumarmly wrote: |
kindly suggest me to either convert this BLOB to XML/json format or to get reponse directly in JSON /XML format |
According to SoapUI, it's already in a JSON format so how have you attempted to explain that to the broker? If the answer is "by casting it to CHAR", then I've found your problem. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Skumarmly |
Posted: Fri Jun 12, 2015 2:39 am Post subject: |
|
|
Novice
Joined: 09 Sep 2014 Posts: 13
|
my opinion abt response type is based on soap UI,I could see JSON as well as XML in two different tabs when I hit the same URL
if I set Message domain property in Httprequest node
as XMLNSC am getting XML parsing error have occurred and for JSON its showing "Unconvertable character"
working on getting the user trace |
|
Back to top |
|
 |
Skumarmly |
Posted: Fri Jun 12, 2015 3:38 am Post subject: |
|
|
Novice
Joined: 09 Sep 2014 Posts: 13
|
I found where the problem was , I was using HttpInput node to get the input from external system which was adding the input header ,now I deleted the input header and able to get response   |
|
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
|
|
|
|