Author |
Message
|
wmqstankela |
Posted: Fri Aug 31, 2018 5:43 am Post subject: Multiple occurences of a HTTP Header error |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
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 |
|
 |
wmqstankela |
Posted: Mon Sep 03, 2018 3:53 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
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 |
|
 |
wmqstankela |
Posted: Mon Sep 03, 2018 7:05 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
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 |
|
 |
mgk |
Posted: Mon Sep 03, 2018 7:27 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
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
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
timber |
Posted: Mon Sep 03, 2018 7:46 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
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 |
|
 |
wmqstankela |
Posted: Tue Sep 04, 2018 12:45 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
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 |
|
 |
timber |
Posted: Tue Sep 04, 2018 6:54 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
|
Back to top |
|
 |
wmqstankela |
Posted: Wed Sep 05, 2018 3:44 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
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 |
|
 |
timber |
Posted: Wed Sep 05, 2018 5:12 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
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 |
|
 |
wmqstankela |
Posted: Wed Sep 05, 2018 6:13 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
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 |
|
 |
|