IBM Support

How to resolve parse error when HTTP content-type header is missing

Troubleshooting


Problem

DataPower throws parse error with the following message: implied action Parse input as SOAP, attempt pipeline failed: illegal character 'n' at offset 373 of the front side client URL such as "http://" followed by "hostname:port/URI" or "IP:port/URI".

Symptom

DataPower throws parse error with the following message: implied action Parse input as
SOAP, attempt pipeline failed: illegal character 'n' at offset 373 of the front side client URL such as "http://" followed by "hostname:port/URI" or "IP:port/URI".

Cause

The HTTP content-type header is missing in the request or response message.

Resolving The Problem


In order to resolve this issue, one can use one of the following methods to set the HTTP content-type header with correct value:

(1) set the HTTP "content-type" header in DataPower by using the Header Tabs of the Multi-Protocol Gateway or Web Services Proxy.

For the Multi-Protocol Gateway Service:
Objects -> Service Configuration -> Multi-Protocol Gateway -> Named MPGW Service -> Header Injection Tab -> Add

Direction
front | back (front for the response flow and back for the request flow)

Header Name
Content-Type

Header Value
text/xml; charset=utf-8

For the Web Service Proxy:
Objects -> Service Configuration -> Web Service Proxy -> Named Web Service Proxy -> Header Injection Tab -> Add

Direction
front | back (front for the response flow and back for the request flow)

Header Name
Content-Type

Header Value
text/xml; charset=utf-8

(2) Use custom stylesheet to inject HTTP content type header with correct value:

For the request flow:
<dp:set-http-request-header name="'Content-Type'" value="'text/xml; charset=utf-8'"/>

For the response flow:
<dp:set-http-response-header name="'Content-Type'" value="'text/xml; charset=utf-8'"/>

(3) set the "Include charset in reponse-type" for the respective service by using

Objects -> Service Configuration -> Multi-Protocol Gateway -> Named MPGW Service -> Proxy Setting -> Include charset in reponse-type box as "on"

Objects -> Service Configuration -> Web Service Proxy -> Named Web Service Proxy -> Proxy Setting -> Include charset in reponse-type box as "on"




Did you know that if you have any questions about the information in this technote you can ask them out on the DataPower Q&A forum? There is a growing community of DataPower experts from users to support professionals out on dW Answers. They are ready to answer your questions!

[{"Product":{"code":"SS6L4E","label":"WebSphere DataPower Integration Appliance XI50"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"5.0.0;6.0.0;6.0.0.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
15 June 2018

UID

swg21576380