on 11-19-2008 3:29 AM
Dear All,
Result Payload:
<ns1:MT_Level1 xmlns:ns1="http://test.com">
<Header>
<Separator>,</Separator>
</Header>
<Detail>
<FileNumber>30</FileNumber>
<LinkToNextLevel />
<Expansion1>0</Expansion1>
<Expansion2>0</Expansion2>
<Expansion3>0</Expansion3>
<Expansion4>0</Expansion4>
</Detail>
<Detail>
<FileNumber>30</FileNumber>
<LinkToNextLevel />
<Expansion1>0</Expansion1>
<Expansion2>0</Expansion2>
<Expansion3>0</Expansion3>
<Expansion4>0</Expansion4>
</Detail>
<FileNode>
<FileName>test.txt</FileName>
</FileNode>
</ns1:MT_Level1>
I want to use "File Name" in the "File Node" node for my variable substitution.
In the configuration:
File Name Scheme = %filename%
Variable = filename
reference = payload: Messages, 1, Message, 1, MT_Level1, 1, FileNode, 1, FileName, 1
Note: I'm using multimapping (1 to N).
File Name path is /ns0:Messages/ns0:Message2/ns1:MT_Level1/FileNode/FileName ( from right click in the file name --> copy path).
I got following error:
"Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: filename"
Please advise!
Best Regards,
Victor.
Hi Victor,
Make sure you use the exactly same name as in payload as it is case sensitive. You are using filename and in paylaod u r having FileName.
regards
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Ria,
In the variable substitution reference I'm using:
payload: Messages, 1, Message, 1, MT_Level1, 1, FileNode, 1, FileName, 1
"FileName" is the same case with the payload.
Only the variable name (file scheme) I'm using: %filename% --> all lower case.
Variable name is not must to be the same with the payload right? I even can put anything in the file scheme?
Best Regards,
Victor.
Hi Santhos,
The element was in the target not in the source, hence i can't see the element in the condition receiver determination.
But in the mapping i can right click my target element (FileName) and copy the path.
The result is: /ns0:Messages/ns0:Message2/ns1:MT_Level1/FileNode/FileName
Please Suggest!
Best Regards,
Victor.
Hi Sudhir,
This is the error in RWB:
Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: filename
The file name field is populated, i can see it in the payload.
And i have tried to put constant for the file name and file can be generated without error.
Best Regards,
Victor.
Dear All,
My problem is solved!
The issue is because I don't put the interface mappings sequence as the same sequence as the message mappings sequence. Hence the structure name that i put in the variable substitution all are not match with the structure name in the payload even though all have the file name element.
So what i did is i have to reorder the sequence of my message mappings to be the same sequence as the interface mappings sequence.
Thanks for all that trying to help!
Appreciated it guys.
BTW, for the variable reference it's correct that i no need to put message and message2 as the reference.
payload:MT_Level1,1,FileNode,1,FileName,1 will do.
Best Regards,
Victor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.