Skip to Content
avatar image
Former Member

SFTP File Content Conversion Error:The variable substitution can not parse the message xml: Content is not allowed in prolog.

Hi

My Scenario is IDOC to SFTP using File Content Conversion.

I have successfully configured the whole scenario and i am able to send FCC file to sftp directory.

But when implementing variable substitution i am facing following error


ERROR:


Transmitting the message to endpoint <local> using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: javax.resource.ResourceException: The variable substitution can not parse the message xml: Content is not allowed in prolog.


For Variable substitution i am taking two values from the payload one from the Header segment and one from the Indicator segment.

The target structure looks like below

<Record_Set>

<Header>

<IDOC_NO>000001234<IDOC_NO> {variable used in variable substitution}

</Header>

<Data_Segment>

</Data_Segment>

<Trailer_Segment>

</Trailer_Segment>

<Indicator_Segment>

<Indicator_No>1234<Indicator_No> {variable used in variable substitution}

<Indicator-Segment>

</Record_Set>

i have already implemented same using FTP adapter and it is working fine there but in SFTP it is giving above ERROR.

Please provide any suggestion for this .

Thanks,

Jatin Sharma

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 21, 2015 at 02:34 PM

    Hello Jatin,

    Please check the spelling in VS.It is case sensitive.

    Please post the VS parameters maintained in the channel.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Raghuraman,

      I have maintained the VS variables in Lower case.

      for IDOC_NO i have maintained variable as "idoc" and for Indicator_No i have maintained as "id"

  • Oct 22, 2015 at 02:07 AM

    Hi Jatin

    Can you confirm if you are using MessageTransformBean to perform FCC in the SFTP receiver channel?

    If so, then variable substitution will not work. The error "Content is not allowed in prolog" you are getting is a common error whenever Java logic is trying to parse data that is expected to be in XML format. Variable substitution requires the payload in XML format, however it is no longer in XML format due to FCC transformation.

    Rgds

    Eng Swee

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Eng Swee Yeoh

      So as per the link usage of Bean is not mentioned in the module parameter .

      Can this be achieved without using AF_Modules/DynamicConfigurationBean in the module tab?

      Is it sufficient to just give file name as * in the receiver channel?

      Regards

      Advit