on 09-11-2014 12:50 PM
Hi All,
Could you kindly help me with this?
Mine is File to File Scenario. ECC drops a XML file in AL11 directory and i send that file using FTP to a third party system. There is no mapping involved and i use ICO. I need to get a value from the payload dynamically for using it in my file name.
When i tried to use Variable Substitution Method i get this error : VariableDataSourceException: Caught SAXException while parsing XML payload: Content is not allowed in prolog.
This is the reference i have given in my variable substitution : payload:customerelement,1,customer,1,sender,1,dealercode,1
and my XML structure is as below and i am trying to access the dealercode field in the XML.
<?xml version="1.0" encoding="UTF-8"?>
-<ns0:CustomerElement xmlns:ns0="http://www.xxxxxx.com/customer">
<recordCount>34</recordCount>
<Customer>
<Sender>
<transmitDate>ddmmyy</transmitDate>
<dealerCode>N050</dealerCode>
<DMSSystem>ABC</DMSSystem>
<DMSReleaseNumber>1.0</DMSReleaseNumber>
</Sender>
Thanks for your time. I had to write an adapter module to achieve this functionality.
Below link was of great help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Just wanted to update this thread, by mentioning that it's very much possible to set dynamic file name in a XML file to file scenario after reading the XML file content using variable substitution.
You have to just make sure that the XPath which u are trying to access in a XML file at receiver file adapter level is correct.
Thanks
Amit Srivastava
Hi Amit,
Yeah that is correct. But in my case the XML structure was not properly formed and i hwas frequently getting this error " Content is not allowed in Prolog" for which i tried all the solutions in SDN and nothing worked out. So i had no other option and had to go for adapter module.
Now the issue is solved and the interface is working as expected with the adapter module.
Thanks for your valuable inputs.
Regards,
Prabhu V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it is just a pass through scenario, you cannot achieve dynamic file name using variable substitution.
You can create a simple java mapping to set the file name. Refer to below wiki.
Dynamic file name for pass-through scenario - Process Integration - SCN Wiki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please note that case probably matters. Your variable substitution is all written in lowercase but the XML has mixed case. Please your variable substitution accordingly.
Come back if that doesn't solve the issue.
Cheers
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.