cancel
Showing results for 
Search instead for 
Did you mean: 

retrieving XML file from a FTP server Content not allowed in prolog

Former Member
0 Kudos

I running into 'Content is not allowed in prolog' when retrieving an XML file from a FTP server. At this point, I have tried changing transfer mode and file type to 'Text' and 'Binary' with no luck. In addition, I tried changing File Encoding to UTF-8 and still no luck. See attachment for further information. Any ideas?

Fyi.... I was to successfully test the file through operation mapping interface.

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

HI Chris,

there might be a space before the xml prolog. You should complain to the creator of the file if so. If you want to change such a file, you need a non parsing mapping deleting the space (java or abap).

/Udo

Former Member
0 Kudos

I switched transfer mode over to 'TEXT' and file type to 'TEXT' within sender communication channel. At this point, I am still coming up with 'Content not allowed in prolog' error. So, I tried writing XSL for translation of message type. However, I am still running into same error.

XSL


<?xml version='1.0' ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

          <xsl:template match="/">

          <ns0:ASN2T_AdvShipNotif_Catalyst_MT xmlns:ns0="http://asn.thomsonreuters.com/ASN2T_AdvShipNotif">

                    <xsl:copy-of select=" //DeliveryMessage"/>

          </ns0:ASN2T_AdvShipNotif_Catalyst_MT>

          </xsl:template>

</xsl:stylesheet>

XML Coming in (snippet)

<DeliveryMessage DeliveryMessageType="DeliveryMessage" DeliveryMessageStatusType="Replaced" Reissued="No" Language="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

</DeliveryMessage>


udo_martens
Active Contributor
0 Kudos

Hi Chris,

as i wrote above, check if there is a space before the prolog. No prolog at all might be as well the error reason.

Text or binary does not make a difference, because it fails during parsing. Message Mapping and xsl are parsing necessarily. You should consider a Java / ABAP mapping without a xml parser, just a small string operation to correct the file. This mapping is to be added as first mapping inside the operation mapping.

/Udo

Answers (3)

Answers (3)

marksmyth
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

There are a few notes which may or may not fit your situation. Does your scenario involve a split mapping or any of the standard modules? If you are using modules, check that they are in the correct/expected order.

1861721 Errors in message split scenarios using PayloadSwapBean

1863152 ABAP proxy: Missing XML prolog in the response

1807348 XMLAnonymizerBean does not replace quotes in xml prolog

1764691 XI runtime: Split mapping with XML payload w/o prolog III

1548095 XI runtime: Split mapping with XML payload without prolog

1515230 XI mapping: "Root tag missing" in split mapping

Regards

Mark

Former Member
0 Kudos

I switched transfer mode over and file type over to 'TEXT'. At this time, I am able to upload the file from ftp site. However, I am running into the error below.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Chris,

The transfer mode and file type should both be binary. When changing sender file cc's, stop it first in RWB, do the change in ID, activate it and then restart your file sender cc.

Hope this helps,

Mark