Author |
Message
|
visasimbu |
Posted: Thu Nov 19, 2015 9:24 am Post subject: HTTP response parsing |
|
|
![](images/avatars/gallery/misc/2.gif) Disciple
Joined: 06 Nov 2009 Posts: 171
|
Hi All,
I have simple message flow like SOAPInput ->compute node ->SOAPRequest node->SOAP reply node.
I am trying to hit the 3rd party URL in SOAP request node. Flow is routed to failure terminal of SOAP request node saying below error message.
Code: |
RecoverableException
File:CHARACTER:F:\build\S700_P\src\WebServices\WSLibrary\ImbWSRFC822HeaderParser.cpp
Line:INTEGER:678
Function:CHARACTER:ImbRFC822HeaderParser::checkReservedHeaderNameUsage
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3157
Text:CHARACTER:An error was found whilst parsing HTTP header data. Multiple occurences of a HTTP Header were found (or folded) lc
Insert
Type:INTEGER:14
Text:CHARACTER:Content-Type
Insert
Type:INTEGER:14
Text:CHARACTER:HTTP |
When i googled i understood that above error is WMB bug and it is fixed in APAR IC99401 and this fix is avilable in WMB 7.0.0.8 as per the https://www-304.ibm.com/support/docview.wss?uid=swg24041187.
I am using WMB 7.0.0.8 broker and executed below command.
Code: |
mqsichangebroker LOCALBRK -f 7.0.0.8 |
After running the above command also i am facing same issue.
Can you please show some light on this issue. Thanks in Advance. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Vitor |
Posted: Thu Nov 19, 2015 9:44 am Post subject: Re: HTTP response parsing |
|
|
![](images/avatars/905340816499abc1cdfb07.jpg) Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
visasimbu wrote: |
After running the above command also i am facing same issue. |
I'm not surprised. An APAR would be automatically installed and activated, that command is to enable optional new functionality within the fix level.
I would theorize that you're getting the same error message for a different reason. If WMBv7 was still supported, you could raise a PMR. But it isn't, so you can't. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
mqjeff |
Posted: Thu Nov 19, 2015 9:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I wonder how you have gotten more than one content-type in your request message. _________________ chmod -R ugo-wx / |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
visasimbu |
Posted: Thu Nov 19, 2015 9:59 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Disciple
Joined: 06 Nov 2009 Posts: 171
|
mqjeff - Thanks for reply!
mqjeff wrote: |
I wonder how you have gotten more than one content-type in your request message. |
I am not manipulating anything on the HTTP headers. compute node just calls the CopyEntireMessage function.
I cross checked the content type sent in the request by placing break point just before http request node and resulted with below headers. It has single content type header.
Code: |
HTTPInputHeader
X-Original-HTTP-Command:CHARACTER:POST http://localhost:7801/b2b/service/ServiceOutbound HTTP/1.1
Accept-Encoding:CHARACTER:gzip,deflate
Content-Type:CHARACTER:text/xml;charset=UTF-8
SOAPAction:CHARACTER:""
Content-Length:CHARACTER:490
Host:CHARACTER:localhost:7801
Connection:CHARACTER:Keep-Alive
User-Agent:CHARACTER:Apache-HttpClient/4.1.1 (java 1.5)
X-Remote-Addr:CHARACTER:127.0.0.1
X-Remote-Host:CHARACTER:127.0.0.1
X-Server-Name:CHARACTER:localhost
X-Server-Port:CHARACTER:7801
X-Query-String:CHARACTER:CH=4 |
|
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
visasimbu |
Posted: Thu Nov 19, 2015 10:10 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Disciple
Joined: 06 Nov 2009 Posts: 171
|
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
mqjeff |
Posted: Thu Nov 19, 2015 10:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Is an HTTPInputHeader the right thing to send to an HTTPRequest node ? _________________ chmod -R ugo-wx / |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
visasimbu |
Posted: Thu Nov 19, 2015 2:45 pm Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Disciple
Joined: 06 Nov 2009 Posts: 171
|
mqjeff wrote: |
Is an HTTPInputHeader the right thing to send to an HTTPRequest node ? |
I have rebuilt HTTPrequest headers for the request. But still no difference in the error which i am receiving it.
Code: |
HTTPRequestHeader
Accept-Encoding:CHARACTER:gzip,deflate
Content-Type:CHARACTER:text/xml
Host:CHARACTER:localhost:7801 |
Note - My 3rd party url has basic authentication. Hence i have included username and password in properties as like below.
Code: |
ContentType:CHARACTER:text/xml
IdentitySourceType:CHARACTER:usernameAndPassword
IdentitySourceToken:CHARACTER:myusername
IdentitySourcePassword:CHARACTER:myPwd
IdentitySourceIssuedBy:CHARACTER:
IdentityMappedType:CHARACTER:
IdentityMappedToken:CHARACTER:
IdentityMappedPassword:CHARACTER:
IdentityMappedIssuedBy:CHARACTER:
|
|
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
mqjeff |
Posted: Fri Nov 20, 2015 6:16 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Are you still including the HTTPInput header... ?
Are you positive that the request is actually reaching the remote server and that the failure is there? _________________ chmod -R ugo-wx / |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
visasimbu |
Posted: Fri Nov 20, 2015 8:52 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Disciple
Joined: 06 Nov 2009 Posts: 171
|
mqjeff wrote: |
Are you still including the HTTPInput header... ?
Are you positive that the request is actually reaching the remote server and that the failure is there? |
Hi Mqjeff,
I am not including HTTPInput header now. I have added HTTPrequestheader and removed HTTPInput headers by below snippet.
Code: |
SET OutputRoot.Properties.IdentitySourceType ='usernameAndPassword';
SET OutputRoot.Properties.IdentitySourceToken = 'username';
SET OutputRoot.Properties.IdentitySourcePassword = 'pwd!';
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('HTTPRequestHeader') NAME 'HTTPRequestHeader';
SET OutputRoot.HTTPRequestHeader."Accept-Encoding" = InputRoot.HTTPInputHeader."Accept-Encoding";
SET OutputRoot.HTTPRequestHeader."Content-Encoding" = InputRoot.HTTPInputHeader."Content-Encoding";
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'text/xml';
SET OutputRoot.HTTPRequestHeader.Host = InputRoot.HTTPInputHeader.Host;
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||base64Encode(CAST('username:pwd' as BLOB CCSID InputRoot.Properties.CodedCharSetId)); -- I tried removing this line as well.
SET OutputRoot.HTTPInputHeader = null; |
It seems i can able to hit the request to server. I can see HTTP 200 in the HTTPResponse header.
Code: |
HTTPResponseHeader
X-Original-HTTP-Status-Line:CHARACTER:HTTP/1.1 200 OK
X-Original-HTTP-Status-Code:INTEGER:200
Via:CHARACTER:1.0 xxx.xxx.com ()
Connection:CHARACTER:close
X-CorrelationID:CHARACTER:Id-734e4f5647d55c00ce1806008xxxe86a 0
Date:CHARACTER:Fri, 20 Nov 2015 16:46:43 GMT
Content-Type:CHARACTER:text/xml; charset=utf-8 |
If i am not wrong, the response coming from the server has some content-type duplicated which could not accepted by WMB7.0.0.8 and it routes to the failure terminal. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
smdavies99 |
Posted: Fri Nov 20, 2015 9:45 am Post subject: |
|
|
![](images/avatars/4738380695809c05f78f20.jpg) Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Time to get out tools like Wireshark and see exactly what is coming over the wire? _________________ 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 |
|
![](templates/DAJ_Glass/images/spacer.gif) |
visasimbu |
Posted: Fri Nov 20, 2015 9:58 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Disciple
Joined: 06 Nov 2009 Posts: 171
|
Issue got resolved!!!
Thanks mqjeff,Vitor and smdavies99.
Resolution - I have added below line in my esql.
Code: |
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||base64Encode(CAST('username:pwd' as BLOB CCSID InputRoot.Properties.CodedCharSetId)); |
If i remove this line, i am gettting error saying
Quote: |
RecoverableException
File:CHARACTER:F:\build\S700_P\src\WebServices\WSLibrary\ImbWSRFC822HeaderParser.cpp
Line:INTEGER:678
Function:CHARACTER:ImbRFC822HeaderParser::checkReservedHeaderNameUsage
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3157
Text:CHARACTER:An error was found whilst parsing HTTP header data. Multiple occurences of a HTTP Header were found (or folded) lc
Insert
Type:INTEGER:14
Text:CHARACTER:Content-Type
Insert
Type:INTEGER:14
Text:CHARACTER:HTTP |
But i am not sure how that line is related to content-type.
I have cross checked few times by commenting and uncommenting the "authorization" in the requestheader.
Once again thanks for everyone. ![](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
|