cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Response as Attachment

Former Member
0 Kudos

Hello,

I have a synchronous http scenario. I use a SOAP receiver adapter with "Do not use SOAP envelope" marked.

However when checking monitoring for the http response I just have "MainAttachment (text/html)" displayed in Payload.

So obviously there is just an attachment sent back.

What would be the easiest way to retrieve this attachment and set it as payload?

I tried to use the adapter module PayloadSwapBean, keyField = "content/type", keyValue = "text/html" but this has not solved my problem yet. Maybe I used it the wrong way. How would I use this module just for the response message?

Could you please help me with this?

Thank you!

Edited by: Florian Guppenberger on Feb 3, 2010 4:04 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

> I tried to use the adapter module PayloadSwapBean, keyField = "content/type", keyValue = "text/html" but this has not solved my problem yet. Maybe I used it the wrong way. How would I use this module just for the response message?

key field should be: content-type

But I have not understood: Do you have one payload or several? If you have one payload, there is nothing to do here.

former_member200962
Active Contributor
0 Kudos
I tried to use the adapter module PayloadSwapBean, keyField = "content/type", keyValue = "text/html" but this has not 
solved my problem yet. Maybe I used it the wrong way. How would I use this module just for the response message?

PayloadSwapBean has swap.keyName and swap.keyValue and does not have any keyField parameter....refer this similar discussion: ... the thread owner has mentioned a blog by Michal on the same...do refer it.

Regards,

Abhishek.

Former Member
0 Kudos

Of course, your are right. It was a typo in my message, in module configuration I have set the correct way.

Still there is the problem for the response message, if I check monitoring there only "MainAttachment ( text/html )" displayed as payload. Even if I use a Java Mapping to retrieve the attachment and write it to the payload the only result is that the Attachment is empty afterwards, but the payload is not there.

Should it not be the case that have two entries in message monitoring, one for the main payload (even if it is empty) and one for an attachment?