cancel
Showing results for 
Search instead for 
Did you mean: 

REST Adapter: How to send Body with Raw type TEXT

0 Kudos

Hi,

I need to create a interface SOAP --> PI --> REST, but the body of the MESSAGE is used RAW type TEXT rather than JSON.

The Text in the raw body is sent the connection data like user Name and Password.

I need to know how to Mapping the Data Type of SOAP source for the Body Raw-Text. On the screen below I'm testing the POST http://desenv.wappa.com.br/wsseguradoras/token using the Postman program within Google Chrome, but could also be used via SoapUI.

Someone has an idea to help me?

Tks!

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

HI Adilson,

Have this question solved?

I think I am in the same trouble now.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Adilson,

current version of REST adapter supports only two types of content, they are application/xml and application/json

however your screenshot seems, you are getting response when you are using text content type.

and response seems JSON formate, i guess that mean your receiver server will accept JSON formate too..so please just check what json structure you can send to that server with corresponding team and then send with content type application/json.

before checking with that team, please do make an dummy scenario and try to send that text raw data from runtime work bench to receiver server, in case this not works in pi..i belive even after you write java code to convert raw text data will not works ..that means java mapping wont work...

please update the things

engswee
Active Contributor
0 Kudos

Hi Adilson

From your screenshot, it looks like you are trying to get an authentication token, maybe an OAuth token.

The REST adapter should be able to handle this automatically, so I'm not sure why you have to develop a channel to manually retrieve the token.

If you really need to do it this way, you will need to use Java mapping to create the body because the payload is non-XML.

Rgds

Eng Swee