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 IndexWebSphere Message Broker SupportMultiple occurences of a HTTP Header error

Post new topicReply to topic
Multiple occurences of a HTTP Header error View previous topic :: View next topic
Author Message
wmqstankela
PostPosted: Fri Aug 31, 2018 5:43 am Post subject: Multiple occurences of a HTTP Header error Reply with quote

Acolyte

Joined: 29 Feb 2016
Posts: 70

Hi all,

I've tried to invoke third party service with HTTP request node. This node throws an exception "An error was found whilst parsing HTTP header data. Multiple occurences of a HTTP Header were found (or folded) lc". What does it means and how to resolve this problem?

Service that I'm invoking is SOAP and should response with soap envelope and with pdf in attachment.
There are two scenarios. First, when there is no pdf. Service respose is just soap envelope and everything working fine. But second, when service response is soap message with attachment, then I've got this error.

Reason why I'm using HTTP request instead of SOAP request is because third party service sends fault response with http 200 code, and SOAP request throws an error in this case. With HTTP request I can read this response and convert even http code is 200 with fault message.

IIB version is 10.0.0.6

Back to top
View user's profile Send private message
wmqstankela
PostPosted: Mon Sep 03, 2018 3:53 am Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2016
Posts: 70

I think that the problem is in attachment that invoked service response back. How in IIB you call that service which sends you attachment? and how to propagate this attachment to orinigal client?

Help, please.
Back to top
View user's profile Send private message
wmqstankela
PostPosted: Mon Sep 03, 2018 7:05 am Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2016
Posts: 70

I've tested third party web service using SoapUI and I've got soap response with an attachment. When I tried to invoke this service from IIB I've got an error An error was found whilst parsing HTTP header data. Multiple occurences of a HTTP Header were found (or folded) lc.
I think this part of response message is a problem: Content-Type: multipart/related; boundary=MIME_Boundary; start=3714874160838969196-35dd8942.16475881a4a.2961; type="text/xml"

Can anyone help me about this? How to call external SOAP service which returns soap response with an attachment?

I've tried to use SOAP Request and HTTP Request but Broker throws same error.

Back to top
View user's profile Send private message
mgk
PostPosted: Mon Sep 03, 2018 7:27 am Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1589
Location: IBM Hursley, UK

So this error should only occur if the remote server returns two or more headers with the same name. Have a look at all of the response headers and post them here if you can.
_________________
MGK
IBM Global Blockchain Enablement
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
timber
PostPosted: Mon Sep 03, 2018 7:46 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 868

mgk is almost certainly correct, and nothing that I'm about to say will fix a broken response from the server...
Quote:
Reason why I'm using HTTP request instead of SOAP request is because third party service sends fault response with http 200 code, and SOAP request throws an error in this case. With HTTP request I can read this response and convert even http code is 200 with fault message.
I'm fairly sure that there is an environment variable that makes the SOAPRequest node tolerate a fault with HTTP 200.
Back to top
View user's profile Send private message
wmqstankela
PostPosted: Tue Sep 04, 2018 12:45 am Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2016
Posts: 70

Thanks for your answers!

This is the error: BIP3157S: An error was found whilst parsing 'HTTP' header data. Multiple occurrences of a 'HTTP' Header were found, when only one is allowed, or a non-folding 'HTTP' Header was folded. The header was 'Content-Type'. The 'HTTP' Header 'Content-Type' cannot be folded or occur multiple times. Ensure that it occurs only once, and is not folded.

Response that I've got from SoapUI when calling external service is:
Code:

HTTP/1.1 200 OK
Date: Tue, 04 Sep 2018 08:26:43 GMT
Transfer-Encoding: chunked
Content-Type: multipart/related; boundary=MIME_Boundary;  start=3714874160838969196-35dd8942.16475881a4a.2c0f; type="text/xml"
X-Powered-By: Servlet/2.5 JSP/2.1

--MIME_Boundary
Content-ID: 3714874160838969196-35dd8942.16475881a4a.2c0f
Content-Type: text/xml; charset=utf-8
Content-Transfer-Encoding: 8bit

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:xsd="http://xy.services/xsd"/><soapenv:Body xmlns:xsd="http://xy.services/xsd"><xsd:Response><xsd:status>1</xsd:status></xsd:Response></soapenv:Body></soapenv:Envelope>
--MIME_Boundary
Content-ID: PDF_Attachment

%PDF-1.6
5 0 obj
etc.....(pdf in attachment)


Obviously Content-Type has multiple occurrences, but how to resolve this error? I can't change response from external service.

I can use SOAP Request as well as HTTP Request. Whatever seems to be better solution.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Sep 04, 2018 6:54 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 868

Interesting...the content-type header does appear twice, but the second time it applies to the MIME part, which I tihnk is valid.

I wonder if this is relevant...
http://www.mqseries.net/phpBB2/viewtopic.php?t=71434&sid=1014b10a33383081404b4d9d854e47b7
Back to top
View user's profile Send private message
wmqstankela
PostPosted: Wed Sep 05, 2018 3:44 am Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2016
Posts: 70

Thanks timber for your answer.

I've read this thread before. I've tried to remove HTTPInput Header and to set HTTPRequest Header, like in this thread, but still I've got same error.
visasimbu wrote:
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));


Resolution of this problem doesn't have any connection with an error he described.
Back to top
View user's profile Send private message
timber
PostPosted: Wed Sep 05, 2018 5:12 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 868

Might be worth opening a PMR with IBM. There is at least one APAR related to multiple HTTP headers, so you may find that it's a known problem.
Back to top
View user's profile Send private message
wmqstankela
PostPosted: Wed Sep 05, 2018 6:13 am Post subject: Reply with quote

Acolyte

Joined: 29 Feb 2016
Posts: 70

Ok, thanks. I saw that APAR, but it's not for IIB v10. I've recently opened PMR, so I'm hoping for solution from IBM.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportMultiple occurences of a HTTP Header error
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.