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 » parsing HTTP header data

Post new topic  Reply to topic
 parsing HTTP header data « View previous topic :: View next topic » 
Author Message
anilmekala
PostPosted: Sun Oct 19, 2014 6:54 pm    Post subject: parsing HTTP header data Reply with quote

Acolyte

Joined: 19 Oct 2012
Posts: 63

Hi Experts,

I hope every body doing good.

I have requirment like need to Audit incomming Web service request message as log file.

I have developed message flow to generate log file by using log4j.

MQINPUT node -> RCD NODE--> JCN

in MQ INPUT NODE i set message domain as "BLOB" and RCD node i set as BLOB. in JCN by using log4j logger writing entire incomming data in log file.

I am getting incoming data as belelow :

Content-Type: text/xml;charset=utf-8

<SOAP_Domain_Msg><Body><NS1:shipmentInfoRequest xmlns:NS1="ShipmentManagementITS/WSConsumer/WS/shipmentManagementITS"><MSG><Hdr GmtOff="+08:00" Dtm="2014-10-17 10:27:50" Ver="1.034" Id="1413512870"><Sndr AppNm="DMGRCF" AppCd="DMGRCF"/></Hdr><Bd><Shp Id="1234807011"/></Bd></MSG></NS1:shipmentInfoRequest></Body></SOAP_Domain_Msg><?xml version="1.0" encoding="UTF-8"?><MSG><Hdr No="750" Id="SHP-DET" Ver="1.038" Dtm="2014-08-14 03:21:57" GmtOff="+01:00"><Sndr AppCd="SSA" AppNm="SSA@MCI"><Gld Id="29521"/></Sndr></Hdr><Bd><Shp Id="1234807011"><ShpTr OrgSrvaCd="MCI" DstSrvaCd="DUB" PuDtm="2014-08-11T17:44:00" PuGMTOff="-05:00"><ShpChrg SChrgTyCd="T" Dsc="Other TAX Amount" CurCd="EUR" TotAmt="10.00" ChrgSqNo="0"><GI OprTy="U"/></ShpChrg><ShpChrg SChrgTyCd="V" Dsc="Duty VAT Amount" CurCd="EUR" TotAmt="17.93" ChrgSqNo="0"><GI OprTy="U"/></ShpChrg></ShpTr><ShpInDoc><SDoc DocId="1234807011"/></ShpInDoc></Shp></Bd></MSG>


when message reach to my MQ INput node am getting below exception

An error was found whilst parsing HTTP header data. The data is not a HTTP request or response. Invalid HTTP Header data.

Please help me how to resolve this.. need to generate log file for this webservice request.

Thanks in advance.

Regards,
Anil.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Oct 19, 2014 8:33 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Why are you trying to parse an HTTP header when you don't have one? With MQInput node you will have an MQMD and not an HTTP header...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
anilmekala
PostPosted: Sun Oct 19, 2014 8:52 pm    Post subject: Reply with quote

Acolyte

Joined: 19 Oct 2012
Posts: 63

Hi,

I am not trying to parse HTTPRequestHeader. Intailally am putting Webservice request message in one of the queue from there am try to convert in blob and after that am converting to log4j file.

when i debug the message it showing format as :

Format:CHARACTER:WSREQHDR

After MQMD tree am seeing HTTPRequestHeader but no child elements.

in Exception list :
BIP 3159:
An error was found whilst parsing HTTP header data. The data is not a HTTP request or response. Invalid HTTP Header data.

I am getting Webservice request message in the below format :

Content-Type: text/xml;charset=utf-8


<SOAP_Domain_Msg><Body><NS1:shipmentInfoRequest xmlns:NS1="ShipmentManagementITS/WSConsumer/WS/shipmentManagementITS"><MSG><Hdr GmtOff="+08:00" Dtm="2014-10-17 10:27:50" Ver="1.034" Id="1413512870"><Sndr AppNm="DMGRCF" AppCd="DMGRCF"/></Hdr><Bd><Shp Id="1234807011"/></Bd></MSG></NS1:shipmentInfoRequest></Body></SOAP_Domain_Msg><?xml version="1.0" encoding="UTF-8"?><MSG><Hdr No="750" Id="SHP-DET" Ver="1.038" Dtm="2014-08-14 03:21:57" GmtOff="+01:00"><Sndr AppCd="SSA" AppNm="SSA@MCI"><Gld Id="29521"/></Sndr></Hdr><Bd><Shp Id="1234807011"><ShpTr OrgSrvaCd="MCI" DstSrvaCd="DUB" PuDtm="2014-08-11T17:44:00" PuGMTOff="-05:00"><ShpChrg SChrgTyCd="T" Dsc="Other TAX Amount" CurCd="EUR" TotAmt="10.00" ChrgSqNo="0"><GI OprTy="U"/></ShpChrg><ShpChrg SChrgTyCd="V" Dsc="Duty VAT Amount" CurCd="EUR" TotAmt="17.93" ChrgSqNo="0"><GI OprTy="U"/></ShpChrg></ShpTr><ShpInDoc><SDoc DocId="1234807011"/></ShpInDoc></Shp></Bd></MSG>


I requirment is need write any request in logfile. I am able write other than webservice request message into log file.

Regards,

Anil.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 20, 2014 4:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

something's wrong with your message.
Put a trace node immediately after the MQInput node and show us the content of $Root.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
anilmekala
PostPosted: Mon Oct 27, 2014 6:23 pm    Post subject: Reply with quote

Acolyte

Joined: 19 Oct 2012
Posts: 63

Code:
ExceptionList
   ParserException
         File:CHARACTER:/build/S700_P/src/DataFlowEngine/ImbRootParser.cpp
         Line:INTEGER:787
         Function:CHARACTER:ImbRootParser::parseNextItem
         Type:CHARACTER:ComIbmMQInputNode
         Name:CHARACTER:DMG_AUDITOUT_BACKUP_MF#FCMComposite_1_1
         Label:CHARACTER:DMG_AUDITOUT_BACKUP_MF.DMGCOMMONAUDITOUT
         Catalog:CHARACTER:BIPmsgs
         Severity:INTEGER:2
         Number:INTEGER:5902
         Text:CHARACTER:Exception whilst parsing
         Insert
               Type:INTEGER:5
               Text:CHARACTER:Root
         Insert
               Type:INTEGER:5
               Text:CHARACTER:HTTPRequestHeader
         Insert
               Type:INTEGER:5
               Text:CHARACTER:Null Buffer
         ParserException
               File:CHARACTER:/build/S700_P/src/WebServices/WSLibrary/ImbWSHeaderParsers.cpp
               Line:INTEGER:414
               Function:CHARACTER:ImbWSRequestHeaderParser::refreshElementsFromBitStream
               Type:CHARACTER:ComIbmMQInputNode
               Name:CHARACTER:DMG_AUDITOUT_BACKUP_MF#FCMComposite_1_1
               Label:CHARACTER:DMG_AUDITOUT_BACKUP_MF.DMGCOMMONAUDITOUT
               Catalog:CHARACTER:BIPmsgs
               Severity:INTEGER:3
               Number:INTEGER:6105
               Text:CHARACTER:Invalid buffer parameters
               Insert
                     Type:INTEGER:5
                     Text:CHARACTER:HTTPRequestHeader
               Insert
                     Type:INTEGER:5
                     Text:CHARACTER:WSREQHDR
               RecoverableException
                     File:CHARACTER:/build/S700_P/src/WebServices/WSLibrary/ImbWSRFC822HeaderParser.cpp
                     Line:INTEGER:1007
                     Function:CHARACTER:ImbHTTPHeaderParser::parseHttpHeaderLine
                     Type:CHARACTER:
                     Name:CHARACTER:
                     Label:CHARACTER:
                     Catalog:CHARACTER:BIPmsgs
                     Severity:INTEGER:1
                     Number:INTEGER:3159
                     Text:CHARACTER:An error was found whilst parsing HTTP header data. The data is not a HTTP request or response. Invalid HTTP Header data.
                     Insert
                           Type:INTEGER:2
                           Text:CHARACTER:0
                     Insert
                           Type:INTEGER:14
                           Text:CHARACTER:Content-Type: text/xml;charset=utf-8

<SOAP_Doma


The above am getting in exception list.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 28, 2014 4:29 am    Post subject: Reply with quote

Grand High Poobah

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

anilmekala wrote:
The above am getting in exception list.


So you are asserting that if you put a Trace node in your flow directly after the MQInput node, wired to the MQInput node's Out terminal with a trace pattern of $Root (as my associate asked you to do) then all you get is the Exception List?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 28, 2014 4:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Makes me wonder what the message looks like on the queue before it even hits the MQInput node...
_________________
MQ & Broker admin
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 » parsing HTTP header data
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.