on 03-14-2016 10:16 AM
Hi All
We have file to SOAP scenario.
PI will pick the file from Application server and send to third party.
File name will be xxx.aba There is no message mapping and we have java mapping.
Now Dynamic file name should be passed to Target field "fileName"
I have included the below logic in to my java mapping:
private static final DynamicConfigurationKey KEY_FILENAME =
DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","fileName");
and assigned KEY_FILENAME as below:
"<ns0:fileName>" + KEY_FILENAME + "</ns0:fileName>"
I got the output as below:
<ns0:fileName>
<namespace>http://sap.com/xi/XI/System/File</namespace>
<name>FileName</name>
</ns0:fileName>
Required output:
As per wsdl we should send only filName not namespace.
<ns0:fileName>" + xxx.aba + "</ns0:fileName>
Hello Anitha,
Try the below code
private static final DynamicConfigurationKey KEY_FILENAME =
DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","fileName");
String FileName = conf.get(KEY_FILENAME);
"<ns0:fileName>" + FileName+ "</ns0:fileName>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
Use below code to get the fileName attribute from dynamic configuration.
DynamicConfiguration conf = transformationInput.getDynamicConfiguration();
DynamicConfigurationKey FILE_NAME_KEY = DynamicConfigurationKey
.create("http://sap.com/xi/XI/System/File", "FileName");
String fileName = conf.get(FILE_NAME_KEY);
@Ragu the attribute name is FileName not fileName
DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","fileName");
Regards,
Praveen.
Thank you all for your prompt response.
Hi Raghu
I tried your code but it was throwing error for "conf" as below line was missing.
DynamicConfiguration conf = transformationInput.getDynamicConfiguration();
Hi Praveen
I tried yours it worked perfectly and I can able to see Dynamic File name with out namespace.
Hi Vila
I checked the links... thank you
Closing the Thread
Thank you all
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
Check these codes depending your PI version:
DynamicConfiguration (PI Mapping and Lookup (Netweaver�2004S�SPS 09))
Sample JAVA Mapping code using PI 7.1 API - Process Integration - SCN Wiki
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
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.