cancel
Showing results for 
Search instead for 
Did you mean: 

MultipartHeader bean module

Former Member
0 Kudos

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

http://scn.sap.com/people/michal.krawczyk2/blog/2010/03/24/pixi-quick-tip-preserving-attributes-of-x...

Regards,

Jaya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

gagandeep_batra
Active Contributor
0 Kudos

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


Former Member
0 Kudos

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;

Former Member
0 Kudos

Hi Indrajit,

Thanks for the information.

Could you please help me with the below modules. Please share any blogs with scenario expamples.

Adding PutHeaderValueBean in the Module Processor

Send Ack Bean-

CloneMessageBean-

Former Member
0 Kudos

Hi Jaya

I would suggest you to create a separate thread for that and close this thread if you believe that we were able to solve your queries.

Answers (1)

Answers (1)

gagandeep_batra
Active Contributor
0 Kudos

Hi Jaya,

You can check the below blog for that :

Regards

Gagan