on 01-08-2014 7:14 AM
Hi All,
I have a query reg the Multipart header bean module. I have gone through the below michal blog which expalins it. Please gide me on how to proceed with the below point.Please share if any blogs available.
Inside your mappings you could use that to set the dynamic configuration parameters for some receiver adapter
Regards,
Jaya
Hi Jaya
"Inside your mappings you could use that to set the dynamic configuration parameters for some receiver adapter"
The blog is showing how we can get the content type and content disposition in the dynamic configuration section of the message in MONI.
For example , suppose we have a sender mail adapter by which we are sending an email with attachment. Now if we don't use any module, then we will not be able to see the content type and content disposition in the dynamic config section of message in MONI.
But if we use that module , we will get that values in dynamic config, and we can read the same values using an UDF like the same way to read file name from dynamic config.
Let me know if you still have any doubt.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Indrajit,
Thanks for the explanation. But what I require is I need the sample UDF which can read the values in dynamic config.
If suppose I have a scenario like JMS to file where I have used the multipart header module in sender adapter. Module will store the attribute values in dymanic config. how can i call the dynamic config values in UDF.
For reading the file name from dynamic config we will pass the file name as constant input parameter to UDF in mapping. In such a way how can i pass the values in dymanic config(of sender side adapter) to the UDF
Hope your understand my explaination.
Regards,
Jaya
Hi Jaya,
I think you can check the following code that might work :
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
if (conf != null)
{
DynamicConfigurationKey filename = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/JMS","Part[1].Content-Description");
toReturn = conf.get(filename);
}
Regards
GB
Hi Jaya
Suppose you have a requirement that you need read the attachment file name. Below is code which will do that
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keyurl =DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/JMS", "Part[0].Content-Disposition");
String cont_desc = conf.get(keyurl);
String attachmentname = cont_desc.split("=")[1];
return attachmentname;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.