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 » Identify HTTP method

Post new topic  Reply to topic
 Identify HTTP method « View previous topic :: View next topic » 
Author Message
saviobarr
PostPosted: Thu Feb 04, 2016 8:22 am    Post subject: Identify HTTP method Reply with quote

Centurion

Joined: 21 Oct 2014
Posts: 100
Location: Sao Paulo, Brazil

Hi Everybody,
I am trying to know which is the HTTP method of an incoming message (POST, GET, PUT or DELETE).
I my flow I have a HTTPInput node, and right before it I placed a Compute node, and tried to use the piece of code below

InputLocalEnvironment.HTTP.Input.RequestLine.Method

But it is coming empty... can anyone help, pls?

Many thanks

Savio Barros
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Feb 04, 2016 8:35 am    Post subject: Re: Identify HTTP method Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

saviobarr wrote:
tried to use the piece of code below

InputLocalEnvironment.HTTP.Input.RequestLine.Method

But it is coming empty


I don't see anywhere in the InfoCenter that says the node populates that field (or any field) with the method.

saviobarr wrote:
can anyone help, pls?


Put a Trace node directly after the HTTPInput node. See which LocalEnvironment field (if any) has the method value.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
saviobarr
PostPosted: Thu Feb 04, 2016 8:42 am    Post subject: Reply with quote

Centurion

Joined: 21 Oct 2014
Posts: 100
Location: Sao Paulo, Brazil

Hi Vitor, thanks for replying
I just got it. I only had to check the "Advanced/Set destination list" property

The KnowledgeCenter is not quite clear about it, but there says: "This property specifies whether to add the method binding name to the route to label destination list...".

https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac04565_.htm

Warm regards

Savio Barros
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Feb 04, 2016 8:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

saviobarr wrote:
I just got it. I only had to check the "Advanced/Set destination list" property


I am enriched by this new knowledge. Which shows how often I use an HTTPInput node.

saviobarr wrote:
The KnowledgeCenter is not quite clear about it, but there says: "This property specifies whether to add the method binding name to the route to label destination list...".

https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac04565_.htm


So not a LocalEnvrionment variable per se, but accessible.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 04, 2016 8:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
saviobarr wrote:
I just got it. I only had to check the "Advanced/Set destination list" property


I am enriched by this new knowledge. Which shows how often I use an HTTPInput node.

saviobarr wrote:
The KnowledgeCenter is not quite clear about it, but there says: "This property specifies whether to add the method binding name to the route to label destination list...".

https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac04565_.htm


So not a LocalEnvrionment variable per se, but accessible.


Anything in the format of LocalEnvironment.input_node_name.input, for example; LocalEnvironment.Adapter.Input, contains information that has been stored by an input node.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Simbu
PostPosted: Thu Feb 04, 2016 6:19 pm    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

Hi, you can refer the sample "RESTful Web Service Using JSON" which uses the Set destination list property to route the message based on the HTTP method.
https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.samples.jsonrest.doc/doc/introduction.htm?lang=en
Back to top
View user's profile Send private message
saviobarr
PostPosted: Fri Feb 05, 2016 12:20 am    Post subject: Reply with quote

Centurion

Joined: 21 Oct 2014
Posts: 100
Location: Sao Paulo, Brazil

Simbu wrote:
Hi, you can refer the sample "RESTful Web Service Using JSON" which uses the Set destination list property to route the message based on the HTTP method.
https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.samples.jsonrest.doc/doc/introduction.htm?lang=en

Hi,
I did that before

Tks
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Identify HTTP method
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.