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 » Reset API Not Returning any response

Post new topic  Reply to topic
 Reset API Not Returning any response « View previous topic :: View next topic » 
Author Message
arun_ace
PostPosted: Thu Dec 28, 2023 2:44 pm    Post subject: Reset API Not Returning any response Reply with quote

Newbie

Joined: 18 Dec 2023
Posts: 3

I am trying to connect to a rest API through HTTP Request Node to get OAuth token, But the flow isn't erroring or no progress once it reaches Http Request node. Is there any special setting to be done or how do I trace the activity of the http request node?
Http Input --> Compute --> Http Request --> Http Reply
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = OAuthURL;
SET OutputLocalEnvironment.Destination.HTTP.RequestLine.Method = 'POST';
SET OutputRoot.BLOB.BLOB = CAST('client_id=' || client_id || '&grant_type=' || grant_type || '&scope=' || scope || '&client_secret=' || client_secret AS BLOB CCSID 1208);
Set OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Dec 29, 2023 3:42 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1639

I'm not sure if this is your only problem but what you posted shows that the order of message creation is wrong. The message is built and sent in the order it is created, so you need to create the RequestHeaders before BLOB body.

Currently these lines:
Code:
SET OutputRoot.BLOB.BLOB = CAST('client_id=' || client_id || '&grant_type=' || grant_type || '&scope=' || scope || '&client_secret=' || client_secret AS BLOB CCSID 1208);
Set OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';


Should be:
Code:
Set OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
SET OutputRoot.BLOB.BLOB = CAST('client_id=' || client_id || '&grant_type=' || grant_type || '&scope=' || scope || '&client_secret=' || client_secret AS BLOB CCSID 1208);


Also check that your compute node that is building your OutputLocalEnvironment has the ComputeMode property set to one of the modes that includes the LocalEnvrionment such as "ALL"

I hope that helps get you going...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » Reset API Not Returning any response
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.