cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping multiple xml attachments

Former Member
0 Kudos

Dear all,

We have a scenario where we receive multiple xml messages in a zip file. It is possible to unzip this file using the standard PayloadZipBean, and the xml messages are added as attachments to my PI message.

Now I want to map each attachment to a target message. What is the best way to achieve this?

I have seen this thread for accessing the attachments in the graphical map:

/people/yugapreetha.t/blog/2009/08/24/read-the-attachments-of-the-input-xi-message-in-the-message-mapping

However, should I develop an additional UDF for parsing the data? How can I achieve this?

Any suggestions?

Regards,

Rudy

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Stefan,

Since in the end the target is a synchronous enterprise service (so I cannot use a multimap) I was thinking to make a split mapping first. Each xml attachment should result in one service call.

Regards,

Rudy

stefan_grube
Active Contributor
0 Kudos

> Each xml attachment should result in one service call.

In that case I recommend to unzip the file with an OS command and process the XML files individually.

But when you say, you have a sync call, what do you want to do with the response message?

Former Member
0 Kudos

Hi Stefan,

Would your recommendation be different if we use an asynchronous service? The service we intend to use does have an asynchronous variant as well.

Regards,

Rudy

stefan_grube
Active Contributor
0 Kudos

> Would your recommendation be different if we use an asynchronous service? The service we intend to use does have an asynchronous variant as well.

No, it would be different, when you have a sync scenario, as a sync scenario is more complex.

Former Member
0 Kudos

What would be your recommendation in case of an asynchronous scenario?

stefan_grube
Active Contributor
0 Kudos

> What would be your recommendation in case of an asynchronous scenario?

Just what I have told you already.

stefan_grube
Active Contributor
0 Kudos

> Now I want to map each attachment to a target message. What is the best way to achieve this?

Do you want to create one target message from all attchments, or should each attachment create an own target message?

Where do you want to send the data to? Which adapter?