cancel
Showing results for 
Search instead for 
Did you mean: 

Changing of Content Type ...

Former Member
0 Kudos

Hello,

I use Plain HTTP adapter for calling a web service. So it's sznchronous scenario. Problem is that content-type of response payload is appliacation/octet-stream and therefore message mapping doesn't work. Is any way how to change content type to text/xml. Unfortunetally it's not possible to use modules for http plain adapter.

Thank you in advance for every advice!

Regards

Zbynek

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

May be a relevant logic in JAVA mapping for response message can help....for reference:

You can include this JAVA mapping at the top in the Interface Mapping and then check.

Regards,

Abhishek.

Former Member
0 Kudos

Thank all very much! Finally I've resolved it without changing content-type. When I used XSLT mapping (instead od Message Mapping) I was able to process payload with application/octet-stream.

Regards

Zbynek

Answers (4)

Answers (4)

former_member187339
Active Contributor
0 Kudos

Hi Zbynek,

>>Is any way how to change content type to text/xml. Unfortunetally it's not possible to use modules for http plain adapter.

YEs we cannptuse adapter modules, but the same logic can be used in java mapping.. and have your response interface mapping as

1. Java mapping (to change the content Type)

2. Normal message mapping..

Give this a try.

Regards

Suraj

Former Member
0 Kudos

Hi,

While creating receiver HTTP communication channel, you will find a option content type....give text/xml there....

Regds,

Pinangshuk.

Former Member
0 Kudos

HI,

Give Content Type as " text/xml" in yout receiver HTTP adapter.

Regards,

Swetha.

sunil_singh13
Active Contributor
0 Kudos

HI ,

In receiver HTTP adapter there is an option to change the contet type of the payload.

thanks,

Sunil Singh

Former Member
0 Kudos

I know about the option but it doesn't work. I entered value "text/xml" but the response content-type is application/octet-stream. Probably it relates to outgoing message only (request), not incomming (response). However thank you!

Do you have any other suggestion?

Zbynek