ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parser Error- httpRequest node

Post new topic  Reply to topic
 Parser Error- httpRequest node « View previous topic :: View next topic » 
Author Message
Skumarmly
PostPosted: Thu Jun 11, 2015 9:31 am    Post subject: Parser Error- httpRequest node Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Jun 11, 2015 9:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Jun 11, 2015 9:57 am    Post subject: Re: Parser Error- httpRequest node Reply with quote

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
View user's profile Send private message
Skumarmly
PostPosted: Fri Jun 12, 2015 2:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Skumarmly
PostPosted: Fri Jun 12, 2015 3:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parser Error- httpRequest node
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.