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 » Using Name value pairs in the Body of HTTP Request Message

Post new topic  Reply to topic
 Using Name value pairs in the Body of HTTP Request Message « View previous topic :: View next topic » 
Author Message
kwelch
PostPosted: Tue Jul 19, 2005 8:56 am    Post subject: Using Name value pairs in the Body of HTTP Request Message Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Hi,

I have a request from a customer to create a post messasge that looks something like this:
ReqMsg=<Command><ServiceId>InsuranceScore</ServiceId><ServiceName>service.insurancescore.InsuranceScoreServiceHome</ServiceName><CommandName>GetRiskScoreCmd</CommandName><CmdArgs><RiskScoreRequest><PolSym>UE</PolSym><RegOff>02</RegOff><State>CT</State><Sic>7999</Sic><InsScore>ACCEPTABLE</InsScore><UWIndex>1</UWIndex><NumLosses>1</NumLosses><YrsInBus>3</YrsInBus><EffDate>2005-06-30</EffDate></RiskScoreRequest></CmdArgs></Command>

The only way I could think of doing this was to create a BLOB message but when I do that they don't get anything. Am I missing something obvious? Is this common practice? I am told it is an http standard to use name value pairs. I don't know much about this so am asking you folks.

I am able to get this to work by concatenating the entire message to the url. They would prefer to get the message from the body though. The message is there in the body but missing ReqMsg= .

Any help or thoughts are appreciated.

Thanks,
Karen
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Jul 19, 2005 9:34 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think they want you to put this in as an HTTP Header, which technically would not be in the body.

HTTP documents are built like email, with a header section separated from a body section by a single blank line.

It looks like the HTTP nodes let you set the HTTP Headers using the HTTP Request Header section of the message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kwelch
PostPosted: Tue Jul 19, 2005 9:40 am    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Hi Jeff,

No, they definitely don't want it in the HTTP Header. The examples they show me show the header with the blank line then the body. But instead of just the XML message they want it to be prefixed with ReqMsg=. They call it a name value pair and say it is in http standard.

Karen
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Jul 19, 2005 9:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

???

Okay.

I haven't heard of it, but it's been a couple of years since I looked at the standards docs for HTTP.

What properties have you set on the HTTPRequest node?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kwelch
PostPosted: Tue Jul 19, 2005 10:06 am    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Hi Jeff,

Basic:

We are setting the URL dynamically
Request Timeout = 120

Advanced:
Use whole Input Message as Request - checked
Replace Input Message with Web Service response - checked
Generate Http default headers from input - checked

Error:
Replace input with error - checked

Default:
Message Domain = XML

Validation: None

Are you saying that it is not possible to post a message with a body like this?

ReqMsg=<Command><ServiceId>InsuranceScore</ServiceId><ServiceName>service.insurancescore.InsuranceScoreServiceHome</ServiceName><CommandName>GetRiskScoreCmd</CommandName><CmdArgs><RiskScoreRequest><PolSym>UE</PolSym><RegOff>02</RegOff><State>CT</State><Sic>7999</Sic><InsScore>ACCEPTABLE</InsScore><UWIndex>1</UWIndex><NumLosses>1</NumLosses><YrsInBus>3</YrsInBus><EffDate>2005-06-30</EffDate></RiskScoreRequest></CmdArgs></Command>


Thanks for your help.

Karen
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Jul 19, 2005 10:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kwelch wrote:
Are you saying that it is not possible to post a message with a body like this?


Nope. But
kwelch wrote:
Message Domain = XML
is clearly wrong, as that's not an XML message.

Build your blob, and then set the domain to BLOB and see what they get.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kwelch
PostPosted: Tue Jul 19, 2005 10:19 am    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Jeff,

I thought that that was for the Reply from the Web Service. I will give that a whirl. Thanks.

Karen
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Jul 19, 2005 10:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

According to http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.etools.mft.doc/ac00476_.htm
Quote:
For outbound messages, the data is typically parsed according to the settings of the message properties in the Properties folder received by the HTTPReply or HTTPRequest node that parses the message from message tree to bit stream.


To expound a little more on why I think this is causing your problem...

If you create a BLOB message, it would end up in OutputRoot.BLOB.BLOB (or should), and if the HTTPRequest node domain is set to XML, it will be looking for data in OutputRoot.XML, which won't exist. Consequently, you will send an empty message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jul 19, 2005 12:13 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Hi,

Just out of interest could you ask them to point-out which section of the HTTP standard (RFC2616) which mentions this concept and let us know:

Quote:
They call it a name value pair and say it is in http standard.


I have read this standard do not believe that I saw this metioned, except when talking about HTTP headers in the form
Quote:
message-header = field-name ":" [ field-value ]
. I'm sure it does NOT mention this explicitly with regards to the body, except that by definition you can sent ANY data you like via HTTP, so they are correct in that sense. It looks to me like they are confusing different standards / ideas, but I would love to be proved wrong

With reference to your problem, I think Jeff is right about the properties folder. You need to send data of this sort as a BLOB or write a custom parser (but that is not really worth the trouble for this simple data)

Regards,
_________________
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
kwelch
PostPosted: Wed Jul 20, 2005 9:21 am    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Hi mgk,

I will ask about the HTTP standard. Since you and Jeff are both in agreement that it applies to the HTTP Headers, my money is on you.

As for the BLOB message not working with the HTTP Request Node setting of XML, it does now appear to work. It works when it is set to BLOB or XML. My understanding is there was a problem with the WebService that was making them think they were not receiving a POST, when they actually were. The difference with the XML or the BLOB setting is how the reply comes back which matched the documentation that I had found in the HELP but goes against the documentation that Jeff had found.
Regardless, my flow is now working and I thank you for your help.

Sincerely,
Karen
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Jul 20, 2005 9:30 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kwelch wrote:
The difference with the XML or the BLOB setting is how the reply comes back which matched the documentation that I had found in the HELP but goes against the documentation that Jeff had found.

Well, the documentation I found said "typically parsed", which means that there are known circumstances where it WON'T be parsed this way, but these circumstances are not documented.

kwelch wrote:
Regardless, my flow is now working and I thank you for your help.

Cool.
_________________
I am *not* the model of the modern major general.
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 » Using Name value pairs in the Body of HTTP Request Message
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.