IBM Support

DFHPI9523E SAXParseException Content is not allowed in prolog

Troubleshooting


Problem

You are running DFHWS2LS (the CICS web services assistant) and you receive error message: DFHPI9523E An unexpected error occurred whilst processing file "/u/usr/test.wsdl". The problem is: "WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.".

Symptom

DFHPI9523E An unexpected error occurred whilst processing file "/u/usr/test.wsdl". The problem is: "WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.".

Cause

Characters, including a space, are located before the first XML tag in the WSDL such as:
 <?xml version="1.0" encoding="EBCDIC-CP-US"?>

Diagnosing The Problem

The DFHWS2LS LOGFILE has the following error details:

Error Details:

--------------

com.ibm.cics.wsdl.CICSWSDLException: DFHPI9523E An unexpected error occurred whilst processing file "/u/usr/test.wsdl". The problem is: "WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.".

Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.

Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.

If run the WSDL through an Eclipse validation tool (like Eclipse IDE for Java EE Developers), it returns the following error message:

The processing instructions target matching {xX}{mM}{lL} is not allowed.

Resolving The Problem

Remove any characters, including spaces, from the start of the WSDL so there is nothing before the "<?xml".

[{"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Web Services","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"4.2;4.1;3.2;3.1","Edition":"","Line of Business":{"code":"LOB70","label":"Z TPS"}}]

Product Synonym

CICS/TS CICS TS CICS Transaction Server

Document Information

Modified date:
05 January 2026

UID

swg21592668