cancel
Showing results for 
Search instead for 
Did you mean: 

Queries on payload swap bean

former_member207701
Participant
0 Kudos

Hello Experts,

i am trying to understand the payload swap bean and i want to know how do we get the attributes for doing a particular swap.

for eg : i have attachment with name test1.txt and i guess the main payload will be maindocument(correct me if i am wrong).

so in this case if i want to swap then i understand that:

for attribute payload-name = test1.tx /.txt .

for attribute content-type = text / xml

are the above attributes correct ?

and what are the attributes payload-description / content-description /content -disposition ?where can i get these values for doing a particular swap ?

Screenshot would help a lot.

Thanks for your support

Kiran

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

The PayloadSwapBean does not actually swap the main payload with an attachment. You can see it more as a pointer. When you use the PayloadSwapBean, the following Modules (like MessageTransformBean) work on the selected attachment. The order of the Main Payload and the attachments are not changed with it. When you want to change the main payload with an attachment, you have to write an adapter module by yourself.

former_member207701
Participant
0 Kudos

Stefan ,

Thanks a lot for your reply!

ok so if you tell that it acts as a pointer , then lets take a scenario where i am getting payload as an txt file and xml as attachment if i don't use swap bean then off course it fails inmapping because in mapping its expecting a xml file but we got txt file , in case if i use swap bean then xml file will come as input in message mapping ..dosn't it mean that the payload is swapped in attachment .

I am just going through all standard modules to understand correctly.

And can you please let me know where can i find the attributes payload-description & content-description content-disposition ?

former_member207701
Participant
0 Kudos

Any other suggestions please!

former_member186851
Active Contributor
0 Kudos
former_member182412
Active Contributor
0 Kudos

Hi Kiran,

  • Content type you can find it when you open the message in message monitor.

  • Payload name you can find it under Message Content tab.

Regards,

Praveen.

former_member207701
Participant
0 Kudos

Praveen,

Thanks for your inputs .

Can you please let me know where i find the remaining attribute values for payload-description and content-decsription ??

Kiran

Answers (2)

Answers (2)

former_member207701
Participant
0 Kudos

So i guess we cannot find the attribute values for payload-description and content-description in PI.

Thanks for all your inputs.

Regards,

Kiran

nitindeshpande
Active Contributor
0 Kudos

Hello Kiran,

Most of the time payloadswapbean is used, when there is no transformation involved and you want to drop the attached file directly into some folder. In fact, if you want to have modification to the attached content, then it is suggested to use, Read attachment check box, present in your operation mapping.

This will help you read the attachment content. You can go through the below blog for more info on it -

Regards,

Nitin

former_member207701
Participant
0 Kudos

Hi Nitin,

I think you didnt understand my query .

Payload swap bean has totaly of four parameters payload-name , content-type , Content-description and payload-description.

My query was how to swap using attributes content-description and payload-description ??

As praveen showed we can find value of content-type and payload-name from message editor. same way where can i find the values for  Content-description and payload-description.

Regards,

Kiran

former_member207701
Participant
0 Kudos

Can any one help me on this please!!