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 » Parameters to POST Method

Post new topic  Reply to topic
 Parameters to POST Method « View previous topic :: View next topic » 
Author Message
ferquirino
PostPosted: Wed Dec 11, 2013 4:03 am    Post subject: Parameters to POST Method Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

Hello,

I'm trying to call a rest web service. In PHP has this option.
curl-d "recipient_email=test.test@test.com"

In ESQL tried to do something like this:

Code:
SET stringParaBLOB = 'RECIPIENT_EMAIL=test.test@test.com';
SET OutputRoot.BLOB.BLOB = CAST (stringParaBLOB AS BLOB CCSID 1208);

But the data does not arrive at the destination. Ok return in PHP and Broker receive that e-mail is invalid.

Message Broker V7

ESQL -> HTTP Header -> HTTP Request -> Reset Content -> ESQL

Searching the forum, I found this post, but did not succeed

http://www.mqseries.net/phpBB2/viewtopic.php?t=23737&highlight=outputroot+blob+blob+post

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 11, 2013 4:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Are you trying to send the data as part of the url or as part of the http body?

OutputRoot sets the contents of the http body.
Back to top
View user's profile Send private message
ferquirino
PostPosted: Wed Dec 11, 2013 5:05 am    Post subject: Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

Hi mqjeff

I'm trying to send as part of the http body.

Code:
SET OutputLocalEnvironment.Destination.HTTP.RequestLine.Method = 'POST';
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';


Is OutputRoot.BLOB.BLOB correct?
Back to top
View user's profile Send private message
ferquirino
PostPosted: Wed Dec 11, 2013 5:31 am    Post subject: Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

With the command linux
'curl-d "recipiente_email=test.test@test.com" H "X-Auth: password" http://service.com/path/service/id'
the call is successfully . The-H parameter in add HTTP Header node, but the -d parameter I do not know how to pass. I'm trying to use OutputRoot.BLOB.BLOB, but it failed. There is something in OutputLocalEnvironment that can be used?

Thanks
Back to top
View user's profile Send private message
hcinko5
PostPosted: Wed Dec 11, 2013 9:59 am    Post subject: Reply with quote

Novice

Joined: 12 Apr 2010
Posts: 21

Quote:
but the -d parameter I do not know how to pass


Check for QueryString in HTTPRequest node
Back to top
View user's profile Send private message
Simbu
PostPosted: Wed Dec 11, 2013 9:59 pm    Post subject: Reply with quote

Master

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

ferquirino wrote:
With the command linux
'curl-d "recipiente_email=test.test@test.com" H "X-Auth: password" http://service.com/path/service/id'
the call is successfully . The-H parameter in add HTTP Header node, but the -d parameter I do not know how to pass. I'm trying to use OutputRoot.BLOB.BLOB, but it failed. There is something in OutputLocalEnvironment that can be used?

Thanks


Which is correct email here

curl-d "recipient_email=test.test@test.com"
or
curl-d "RECIPIENT_EMAIL=test.test@test.com"
or
curl-d "recipiente_email=test.test@test.com"

Also ensure that you are using the correct email in ESQL code.
Back to top
View user's profile Send private message
gs
PostPosted: Thu Dec 12, 2013 1:23 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

You need to set OutputLocalEnvironment.Destination.HTTP.QueryString.recipient_email with your value.

More info here: http://pic.dhe.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/ac04595_.htm
Back to top
View user's profile Send private message
ferquirino
PostPosted: Thu Dec 12, 2013 1:38 am    Post subject: Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

hcinko5 wrote:


Check for QueryString in HTTPRequest node


Hi, thanks.

For the GET method think it would work. To do:

SET OutputLocalEnvironment.Destination.HTTP.QueryString.recipient_email = emailDestinatario;

Was sent in the HTTP protocol something like this:
http://host/path/Restful/service?recipient_email=test.test% 2540test.com

But I'm doing a POST method. I saw that linux curl command sends the data in something called "Line-based text data". Is there any option?
Back to top
View user's profile Send private message
ferquirino
PostPosted: Thu Dec 12, 2013 1:40 am    Post subject: Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

Simbu wrote:

Which is correct email here

curl-d "recipient_email=test.test@test.com"
or
curl-d "RECIPIENT_EMAIL=test.test@test.com"
or
curl-d "recipiente_email=test.test@test.com"

Also ensure that you are using the correct email in ESQL code.


Sorry.

Correct is "recipient_email=test.test@test.com"
Back to top
View user's profile Send private message
ferquirino
PostPosted: Thu Dec 12, 2013 2:54 am    Post subject: Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

Hahahaha

I discovered!

Yes, I was on the right track. Passing the message by OutputRoot.BLOB.BLOB. But it was necessary to modify the properties of the HTTP Request node.

In "Advanced" I have disabled "Use whole input message the request" and put in the "Request message location in tree*" InputRoot.BLOB.

In infocenter has something to get, but did not get to POST, no how I "love" these "hidden" things from IBM.

I want to thank mqjeff, hcinko5, Simbu and gs by me help you get the answer. And it gets around here that does not appear to suffer another ... unless objective was to suffer, to make money from consulting.

Thanks.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Dec 12, 2013 3:49 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.

If you are unhappy with the documentation why don't you fill in a feedback form and send it to IBM. Without people saying that the information contained in the InforCentre is wrong or inadequate it will remain so and not get changed
_________________
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
ferquirino
PostPosted: Thu Dec 12, 2013 4:06 am    Post subject: Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

smdavies99 wrote:
If you are unhappy with the documentation why don't you fill in a feedback form and send it to IBM. Without people saying that the information contained in the InforCentre is wrong or inadequate it will remain so and not get changed


I agree with what you said. Where can I get this form?
Back to top
View user's profile Send private message
Simbu
PostPosted: Thu Dec 12, 2013 4:16 am    Post subject: Reply with quote

Master

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

ferquirino wrote:
smdavies99 wrote:
If you are unhappy with the documentation why don't you fill in a feedback form and send it to IBM. Without people saying that the information contained in the InforCentre is wrong or inadequate it will remain so and not get changed


I agree with what you said. Where can I get this form?


All pages in the Infocenter has the feedback link in the bottom.
Back to top
View user's profile Send private message
ferquirino
PostPosted: Thu Dec 12, 2013 4:38 am    Post subject: Reply with quote

Apprentice

Joined: 05 May 2008
Posts: 34
Location: São Paulo, Brazil

Simbu wrote:


All pages in the Infocenter has the feedback link in the bottom.


Great. Sorry for not seeing.

I will pay more attention to it and I will be more formal with my words regarding IBM, just will not edit the previous post.
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 » Parameters to POST 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.