IBM Support

500 Internal Server Error when charset is not on SOAP request

Troubleshooting


Problem

You can send in a SOAP request specifying the charset value on the Content-Type header and all works fine. However, if you omit the charset parameter on the request it fails with a 500 Internal Server Error at the browser. You also receive error messages DFHPI0401 and DFHPI0502.

Symptom

DFHPI0401 QPIH The CICS pipeline HTTP transport mechanism failed to send a response or receive a request because the client codepage was invalid.

DFHPI0502 QPIH The CICS Pipeline Manager has failed to receive a request from the underlying transport. TRANSPORT: HTTP, PIPELINE: pipeline.

Cause

CICS requires the charset value to be specified on the Content-Type header for inbound SOAP requests.

Diagnosing The Problem

Following is an example of an incoming SOAP header that is not valid:

POST /AAA/BBB/ApplicationRequest HTTP/1.1..Content-Type: text/xml..Accept-Language: en-us..Content-Length: 8831..Accept: */ *..User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)..Host: ipaddr:port ..Connection: Keep-Alive....

The Content-Type header should include the charset. For example, Content-Type: text/xml; charset=ISO-8859-1. Note that in this example that the ipaddr:port would contain a valid ip address and port number, but they have been removed from the example.

The CICS trace shows the following failure:

WB 0300 WBAP  ENTRY - FUNCTION(GET_MESSAGE_BODY)
  SERVER_CODEPAGE(19924970 , 0000000A , 00000000)
  CONTAINER_NAME(DFHREQUEST) CONTAINER_POOL(1B7E7030)


WB 0301 WBAP  EXIT  - FUNCTION(GET_MESSAGE_BODY) RESPONSE(EXCEPTION)
  REASON(
INVALID_CLIENT_CODEPAGE) SERVER_CODEPAGE(19924970 ,
  0000000A , 00000000)

For CICS Transaction Server for z/OS (CICS TS) V3.1, CICS requires the charset on the content-type header for inbound SOAP requests. This problem does not occur in CICS TS V3.2 or later. There should also be a SOAPAction header as well even if the value is blank (for example, ""). CICS does default the codepage to ISO-8859-1 for ordinary Web requests that do not specify a charset.

If the URIMAP has USAGE(PIPELINE), it means it is using the Web Services support and therefore the data is a SOAP message. It also forces the check on the charset being present in CICS TS V3.1.

If the URIMAP had USAGE(SERVER) then the request can still contain XML and be a valid SOAP request but it would not use the CICS Web Services support. The request would just be handled by CICS as a regular HTTP request and the charset would default to ISO-8859-1.

Resolving The Problem

Specify the character set as Content-Type: text/xml; charset=ISO-8859-1.

[{"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Web Services","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"3.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Product Synonym

CICS/TS CICS TS CICS Transaction Server

Document Information

Modified date:
15 June 2018

UID

swg21244670