on 04-30-2014 11:03 AM
Hello,
I am doing dynamic configuration in sap pi 7.3. I am using the following UDF.
String devFileName="'a.vc'";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
conf.put(FileName, devFilename);
I am using this UDF in message mapping and mapped this UDF in the message header.
I have selected the adapter specific message attribute in receiver communication channel also.
Still I am getting the folowing error.
MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header
Exception caught by adapter framework: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header
'Transmitting the message to endpoint using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header.
Please help me what to do.
Thanks & Regards,
Moumita
Hi, try this code:
String devFileName="a.vc";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(FileName, devFilename);
ASMA checkbox and respective parameter should be enabled in the required Adapter.
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hareesh/ Rodrigo,
I have tried both of your code. still I am getting the same error.
I have one more question. I have implemented the same code in Sandbox and it successfully runs. But now I am trying to implement it in Development same way and I am getting the error.
So my question is, is there any configuration changes needed in Development.
Thanks & Regards,
Moumita
Did you select the valid operation mapping in your interface determination???
please validate all the configuration again.. like if you have selected the correct graphical mapping in your operation mapping and the same is selected under interface determination...
Message was edited by: Hareesh Gampa
Hi Moumita
Did you check in the SOAP header of the message at the Adapter engine, if the value is populated in the Dynamic Configuration section? Maybe there is a typo/mismatch.
Can you also try without the concatenation when executing the create method:-
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried the following/;
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
Still I am getting the same error.
If I am selecting the ASMA property in sender communication channel then in the Dynamic configuration section I am getting the source file name correctly and this source file name is getting coppied in the targer file name.
conf.put(FileName, devFilename);-----> I think this line is not working properly.
I don't know why? Please suggest what to do.
there is mismatch in the code
String devFileName="'a.vc'";
conf.put(FileName, devFilename);
can you change it to "N" and try.
if you are in dual stack check the name in sxmb_moni.
SAPTechnical.COM - Dynamic File name using ASMA (Adapter Specific Message Attributes) in XI / PI
If the declared string name and is different from the one which is in conf.put then you should get syntax errors.
However can you try with below... the only difference is DynamicConfigurationKey.. I'm not sure if the "FileName" is causing issue.
String filename = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = "a.vc";
conf1.put(key1,filename);
return " ";
Hi,
Did you select ASMA property in the sender channel?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I am selecting the ASMA property in the sender channel then the target file name is getting same as sourcs file name. But the requirement is the target file name as "'a.vc'".
For the above reason I have not selected the ASMA property in sender channel.
If I select the ASMA property in sender channel, then what to do to fulfill the requirement.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.