cancel
Showing results for 
Search instead for 
Did you mean: 

Var substitution

Former Member
0 Kudos

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"?>

<ns0:MT_TREASURY_MANAGEMENT_LEGACY xmlns:ns0="urn: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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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).

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Yes I tried.

Please clarify me whether Variable substitution works for Tunneling interfaces(which is not having IR part) or not?

Former Member
0 Kudos

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"?>

<ns0:MT_TREASURY_MANAGEMENT_LEGACY xmlns:ns0="urn: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"?>

<ns0:MT_TREASURY_MANAGEMENT_LEGACY xmlns:ns0="urn:chrysler.com/fi/I_FIN_AP_010">

<HEADER>

<SEQ_NUMBER>12</SEQ_NUMBER>

--

---

</ns0:MT_TREASURY_MANAGEMENT_LEGACY >

Regards,

Sunitha

Former Member
0 Kudos

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?

Former Member
0 Kudos

Verified. There were no spaces and both field name is corrected in the var sub. But still getting into same error.

Former Member
0 Kudos

Have you tried to test with SoapUI?

This error is raised also when there are characters before the "<?xml" tag of a xml document.

Former Member
0 Kudos

Is var substitution works for pass thru Interfaces?