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 » HTTPHeader node creates an invalid header

Post new topic  Reply to topic
 HTTPHeader node creates an invalid header « View previous topic :: View next topic » 
Author Message
Esa
PostPosted: Tue Jun 05, 2012 4:17 am    Post subject: HTTPHeader node creates an invalid header Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Hi,

I added an HTTPRequest header in a message with HTTPHeader node, then put the message in an MQ queue. When I try to read the message with MQget node, I get an exception with BIP 3159: "An error was found whilst parsing HTTP header data. The data is not a HTTP request or response. Invalid HTTP Header data."

V 6.1.0.5
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 05, 2012 4:31 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So what's the message look like sitting on the queue?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Jun 05, 2012 4:40 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.

mqjeff wrote:
So what's the message look like sitting on the queue?


Or even before it is put on the Queue?
_________________
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
Esa
PostPosted: Tue Jun 05, 2012 4:42 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

The messages in the queue seem quite OK. MQMD.Format is 'WSREQHDR', but the header contains only the fields I have added myself. I suspect they may be in wrong order or some mandatory fields may be missing.
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Jun 05, 2012 6:09 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

I did another test with HTTPReqestHeader containing only the Authorization field. I still got the same expection, but Insert 2 contained:

Authorization: Basic XXXXXXXXXX==

<SOAP_Domain_

So I guess WSREQHDR parser does not regognize two <CR><LF> sequences as the terminator of the header?
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Jun 07, 2012 3:59 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

For anybody struggling with this problem later:

The first field in the http header must be X-Original-Http-Command. That contains HTTP method and version:

Code:

CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('HTTPInputHeader') NAME 'HTTPInputHeader';
SET OutputRoot.HTTPInputHeader."X-Original-HTTP-Command" = 'POST http://dummy HTTP/1.1';


That field will be serialized correctly, without the field name and the colon, which is the tag-data separator of all the other header fields.

I chose to put the message in the queue with an HTTPInputHeader, but I suppose this applies to HTTPRequestHeader, too. You must add the field yourself, HTTPHeader node does not add it (probably because it does not know the actual endpoint URL). So you will have to add the header yourself, too, and then you don't actually need the HTTPHeader node for anything.

I was hoping HTTPHeader node would do the same thing that MQHeader node does: assign the correct parser and ensure that all required fields are present an in the correct order. But it seems the only thing it does is to assign the parser (and add the fields you configure it to add, in the order you added them to the node)
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 » HTTPHeader node creates an invalid header
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.