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 » Query String in ESQL

Post new topic  Reply to topic
 Query String in ESQL « View previous topic :: View next topic » 
Author Message
ajayrana
PostPosted: Wed Aug 06, 2014 12:51 am    Post subject: Query String in ESQL Reply with quote

Apprentice

Joined: 08 May 2014
Posts: 35

Hi All,

I am trying to call a REST API for whcih i need to pass the parameters in the query string.

Message Flow:

HTTPInputNode --> Compute --> HTTPRequest --> HTTPReply

ESQL Code
Code:
CREATE COMPUTE MODULE testjson_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      CALL CopyMessageHeaders();
      CALL CopyEntireMessage();
      RETURN TRUE;
   END;

   CREATE PROCEDURE CopyMessageHeaders() BEGIN
      DECLARE I INTEGER 1;
      DECLARE J INTEGER;
      SET J = CARDINALITY(InputRoot.*[]);
      WHILE I < J DO
         SET OutputRoot.*[I] = InputRoot.*[I];
         SET I = I + 1;
      END WHILE;
   END;

   CREATE PROCEDURE CopyEntireMessage() BEGIN
      SET OutputRoot = InputRoot;
      SET OutputLocalEnvironment = InputLocalEnvironment;

      SET OutputRoot.Properties.IdentitySourceType='usernameAndPassword';
      SET OutputRoot.Properties.IdentitySourceToken = 'admin';
      SET OutputRoot.Properties.IdentitySourcePassword = 'admin';
      SET OutputLocalEnvironment.Destination.HTTP.QueryString.action= 'start';
      SET OutputLocalEnvironment.Destination.HTTP.QueryString.bpdId = '25.3b2df775-a731-4161-9b3e-195367b9ca85';
      SET OutputLocalEnvironment.Destination.HTTP.QueryString.parts = 'header';
END MODULE;


Now when i m trying to execute the flow it shows me setting the parameters in the OutputLocalEnvironment, but somehow these are not getting passed to the HTTPRequest node as the reply that i get from the API is that param action not found.

The API is working if i put the params ahead of the HTTPRequest node url.

Any help/documentation to proceed further would help here.

Thanks & Regards
Ajay Rana
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Aug 06, 2014 1:26 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

What is the compute node 'Compute Mode' set to?

does a Trace node output (placed after the compute node) with the output set to
${Root}
and
${LocalEnvironment}

show everything correct?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
ajayrana
PostPosted: Wed Aug 06, 2014 1:58 am    Post subject: Reply with quote

Apprentice

Joined: 08 May 2014
Posts: 35

Hi,

Thanks a lot man the problem was in the compute mode only. Thanks again!!

Thanks & Regards
Ajay Rana
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 » Query String in ESQL
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.