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 » HTTP Url decoding at Message broker

Post new topic  Reply to topic
 HTTP Url decoding at Message broker « View previous topic :: View next topic » 
Author Message
GeneRK4
PostPosted: Wed Dec 11, 2013 4:57 am    Post subject: HTTP Url decoding at Message broker Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

Hi ,
I have a new design requirement...Please provide your valuable inputs for me..

The HTTP client sends url encoded message to our HTTP Server(HTTPInput node). HTTPInput node set with ParseQueryString property.

* When the HTTP client sets the Request type as "GET" and content-type as "Url-encoded",our HTTPInput node is automatically decoding the input url-encoded message and places the decoded message under LocalEnvironment.HTTP.Input.QueryString.

*But,the new requirement is as HTTP "GET" has size restrictions and the client wants tp use "POST",we still have to get the message and decode the message.

Could someone help me how to decode the message through esql /some other alternatives in HTTP POST ?

[/list]
Back to top
View user's profile Send private message
gs
PostPosted: Thu Dec 12, 2013 1:33 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

While I haven't tried this myself, there should not be any difference in how you handle query strings for POST or GET methods.

Have you tried and stumbled upon issues?
Back to top
View user's profile Send private message
bit
PostPosted: Sun Dec 15, 2013 10:04 am    Post subject: Reply with quote

Newbie

Joined: 15 Dec 2013
Posts: 1

One way to to use a JCN and URLDecode.
Back to top
View user's profile Send private message
ajodowd
PostPosted: Sun Dec 15, 2013 11:00 am    Post subject: Reply with quote

Novice

Joined: 15 Dec 2013
Posts: 13

Hello GeneRK4,

The Query string will be populated for all HTTP methods, so you can check retrieve from LocalEnvironment.

Have a look at the product sample for an example on how to access these data.

IBM Integration Bus Version 9.0.0.1 > Product overview > Samples > Technology samples > Transports and Connectivity > HTTPHeader node > Introduction

Good Luck!
Back to top
View user's profile Send private message
GeneRK4
PostPosted: Wed Dec 18, 2013 11:01 pm    Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

Thanks will check that..
I tried through POST for which,the QueryString not generating.
I have raised a PMR now and waiting for their L3 support currently.
I will post the updates from IBM soon..

Thanks all for your support so far
Back to top
View user's profile Send private message
gs
PostPosted: Thu Dec 19, 2013 1:18 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

Which version are you on?
Just did a quick test and successfully got the query string for a simple HTTP POST.

This in WMB 8.0.0.3 (Windows)
Back to top
View user's profile Send private message
GeneRK4
PostPosted: Thu Dec 19, 2013 8:51 pm    Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

Oh ,...is it?
I am trying with WMB version 8.0.0.2
Back to top
View user's profile Send private message
GeneRK4
PostPosted: Thu Dec 19, 2013 8:53 pm    Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

I checked in ParseQueryString property in HTTPInput node.
Had the message parsing as BLOB.

When I used a simple java client for HTTP POST,I just got the same message (url encoded) and I am not able to get the decoded message in LocalEnvironment.HTTPInput.QueryString.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Dec 19, 2013 10:58 pm    Post subject: Reply with quote

Jedi Council

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

GeneRK4 wrote:
I checked in ParseQueryString property in HTTPInput node.
Had the message parsing as BLOB.

When I used a simple java client for HTTP POST,I just got the same message (url encoded) and I am not able to get the decoded message in LocalEnvironment.HTTPInput.QueryString.


how's about you put a TraceNode in your flow and set the pattern to
Code:

${LocalEnvironment}
${Root}

and post the results here?
_________________
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
GeneRK4
PostPosted: Sat Dec 21, 2013 7:44 pm    Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

while using HTTP POST,I am getting below trace :
( ['MQROOT' : 0x7ff7640156c0]
(0x01000000:Name):Destination = (
(0x01000000:Name):HTTP = (
(0x03000000:NameValue):RequestIdentifier = X'414d51204d42444855423031202020206f3b1b5207ed0023' (BLOB)
)
)
) ^M
( ['WSRoot' : 0x7ff7640159c0]
(0x01000000:Name):Properties = ( ['WSPROPERTYPARSER' : 0x7ff76407d310]
(0x03000000:NameValue):MessageSet = '' (CHARACTER)
(0x03000000:NameValue):MessageType = '' (CHARACTER)
(0x03000000:NameValue):MessageFormat = '' (CHARACTER)
(0x03000000:NameValue):Encoding = 546 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 1208 (INTEGER)
(0x03000000:NameValue):Transactional = FALSE (BOOLEAN)
(0x03000000:NameValue):Persistence = FALSE (BOOLEAN)
(0x03000000:NameValue):CreationTime = GMTTIMESTAMP '2013-12-22 02:20:28.473864' (GMTTIMESTAMP)
(0x03000000:NameValue):ExpirationTime = -1 (INTEGER)
(0x03000000:NameValue):Priority = 0 (INTEGER)
(0x03000000:NameValue):ReplyIdentifier = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):ReplyProtocol = 'SOAP-HTTP' (CHARACTER)
(0x03000000:NameValue):Topic = NULL
(0x03000000:NameValue):ContentType = 'application/x-www-form-urlencoded' (CHARACTER)
(0x03000000:NameValue):IdentitySourceType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceToken = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedType = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedToken = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
)
(0x01000000:Name):HTTPInputHeader = ( ['WSINPHDR' : 0x7ff764015d30]
(0x03000000:NameValue):X-Original-HTTP-Command = 'POST http://MBDHUB01:7080/StockFeedService HTTP/1.1' (CHARACTER)
(0x03000000:NameValue):Content-Type = 'application/x-www-form-urlencoded' (CHARACTER)
(0x03000000:NameValue):User-Agent = 'Java/1.6.0' (CHARACTER)
(0x03000000:NameValue):Host = 'MBDHUB01:7080' (CHARACTER)
(0x03000000:NameValue):Accept = 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2' (CHARACTER)
(0x03000000:NameValue):Connection = 'keep-alive' (CHARACTER)
(0x03000000:NameValue):Content-Length = '5339' (CHARACTER)
(0x03000000:NameValue):X-Remote-Addr = '10.245.11.50' (CHARACTER)
(0x03000000:NameValue):X-Remote-Host = '10.245.11.50' (CHARACTER)
(0x03000000:NameValue):X-Server-Name = 'MBDHUB01' (CHARACTER)
(0x03000000:NameValue):X-Server-Port = '7080' (CHARACTER)
(0x03000000:NameValue):X-Scheme = 'http' (CHARACTER)
)
(0x01000000:Name):BLOB = ( ['none' : 0x7ff7640964e0]
(0x03000000:NameValue):UnknownParserName = '' (CHARACTER)
(0x03000000:NameValue):BLOB = X'3d2533636e2533614d6573736167652b786d6c6e732533616e25336425323268747470253361253266253266626f6f74732e636f6d25326673706d7367735f76315f302532322b786d6c6e73253361787369253364253232687474702533612532662532667777772e77332e6f726725326632303031253266584d4c536368656d612d696e7374616e63652532322b787369253361736368656d614c6f63617469.....<a big blob data>

=========================================
Using HTTP GET,getting below :-

( ['MQROOT' : 0x7f8f24007880]
(0x01000000:Name):Destination = (
(0x01000000:Name):HTTP = (
(0x03000000:NameValue):RequestIdentifier = X'414d51204d42444855423031202020206f3b1b5202b61a23' (BLOB)
)
)
(0x01000000:Name):HTTP = (
(0x01000000:Name):Input = (
(0x01000000:Name):QueryString = (
(0x03000000:NameValue):Input = '<n:Message xmlns:n="http://boots.com/spmsgs_v1_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://....<entire message in decoded form>
Back to top
View user's profile Send private message
GeneRK4
PostPosted: Sat Dec 21, 2013 8:37 pm    Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

gs wrote:
Which version are you on?
Just did a quick test and successfully got the query string for a simple HTTP POST.

This in WMB 8.0.0.3 (Windows)


Can you let me know how the HTTP POST was made?
Here is the extract from my code :
URL url = new URL("http://MBDHUB01:7080/StockFeedService");
HttpURLConnection urlConn = (HttpURLConnection)url.openConnection();
urlConn.setRequestMethod("POST");
urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

FileReader fileReader = new FileReader("H://Input_URLEncoded"); // Input XML (It is same as above input xml)
urlConn.setDoOutput(true);

<H://Input_URLEncoded> contains the input url-encoded message
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 » HTTP Url decoding at Message broker
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.