cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Variable Substitution, SFTP Receiver adapter

Former Member
0 Kudos

Hi ,

I am working on Proxy --> PI --> File scenario. At receiver end, we are using SFTP adapter.

I am getting the below error while using variable substitution but it works fine with FTP adapter.

"Delivery of the message to the application using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: javax.resource.ResourceException: The variable substitution can not be parse the message xml: Content is not allowed in prolog."

please suggest me .

Thanks

Dhileep

Accepted Solutions (0)

Answers (4)

Answers (4)

manikandan_shanmugam3
Active Participant
0 Kudos

Hi Dhileep,

I am also facing same issue, can you please share the solution?

My Thread :

Regards,

Mani

0 Kudos

Hi ,

Me to face the same issue as an alternate solution have created a udf and assigned file name to dynamic configuration and got it using ASMA.

Regards

Mukheed

Former Member
0 Kudos

I had the exactly same problem, and resolved it with this simple UDF:

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System","FileName");

conf.put(key, NAME_FILE_VAR);

return "";

put it, into your massage mapping and then use the ASMA to get the filename

udo_martens
Active Contributor
0 Kudos

Hi Dhileep,

i suspect there might be spaces before the xml prolog in the message coming to the adapter. This makes a xml message not well formed.

/Udo

ambrish_mishra
Active Contributor
0 Kudos

Hi Dhileep,

Hope you have taken a look at the links below:

http://scn.sap.com/message/13681806

http://scn.sap.com/thread/2030198

http://scn.sap.com/thread/3278764

Hope it helps!

Ambrish