Skip to Content
avatar image
Former Member

Var substitution

Hello All,

I am getting below error in my receiver FTP(File) channel:

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Caught SAXException while parsing XML payload: Content is not allowed in prolog.

Taret payolad is as below:

<?xml version="1.0" encoding="UTF-8"?>

chrysler.com/fi/I_FIN_AP_010">

<HEADER>

<SEQ_NUMBER>12</SEQ_NUMBER>

--

---

</MT_TREASURY_MANAGEMENT_LEGACY >

I have to read the sequence number which is coming in the target payload. So, I have enabled Variable subs option in the receiver FTP channel. And mentioned the var1 as payload:MT_TREASURY_MANAGEMENT_LEGACY,1,HEADER,1,SEQUENCE_NUMBER,1

can someone pls help me here

Thanks,

Regards,

Moorthy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 02, 2011 at 02:17 PM

    Hello Mr,

    This usually happens if have some invalid binary characters in the message.

    Generally this invalid characters will be in the start of the message, so you can use substring function to element them.... If you are reading message from a file, then please open file in word pad or in notepad, delete first few empty spaces(if no empty spaces are found, delete the first char and re-type).

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2011 at 02:18 PM

    In Target payload, you have mentioned tag name is 'SEQ_NUMBER'

    while you have var1 declared as below where you have text SEQUENCE_NUMBER

    payload:MT_TREASURY_MANAGEMENT_LEGACY,1,HEADER,1,SEQUENCE_NUMBER,1

    have you made typo?

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 02, 2011 at 03:46 PM

    have you tried using dynamic configuration?

    /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi DasikaMoorthy,

      In the target message you have no prefix "ns0"

      end of the root element should be "</ns0:MT_TREASURY_MANAGEMENT_LEGACY>" but, in your message "ns0" is missing.

      I guess that is the error....

      *your message*

      <?xml version="1.0" encoding="UTF-8"?>

      chrysler.com/fi/I_FIN_AP_010">

      <HEADER>

      <SEQ_NUMBER>12</SEQ_NUMBER>

      --

      ---

      </MT_TREASURY_MANAGEMENT_LEGACY >

      *Expected message*

      <?xml version="1.0" encoding="UTF-8"?>

      chrysler.com/fi/I_FIN_AP_010">

      <HEADER>

      <SEQ_NUMBER>12</SEQ_NUMBER>

      --

      ---

      </ns0:MT_TREASURY_MANAGEMENT_LEGACY >

      Regards,

      Sunitha