Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.