#1 2012-06-21 21:46:17

minchi
Member
Registered: 2012-04-25
Posts: 43

tRestRequest

Hello all,

Just a few questions about the component tRestRequest:

-Why the received  request need an header content type  application/xml ?  (without header it doesn't work)

=>How can I receive post data (which contains no header, just tags and datas) ?


Thank you for your help !

Offline

#2 2012-06-22 12:22:21

gusto2
Member
Company: Apogado
Registered: 2011-09-27
Posts: 164
Website

Re: tRestRequest

Hi Minchi,

well - I believe it is fully ok to ask for content-type before processing data.
IMHO - I would try to use a camel proxy route - to receive a http request and add a content-type header..

http->SetHeader->http

Gabriel


Gabriel Vince
Senior Consultant
Apogado
www.apogado.com

Offline

#3 2012-06-22 12:33:19

minchi
Member
Registered: 2012-04-25
Posts: 43

Re: tRestRequest

Thanks, nice suggestion but in fact:

My job is deployed at the endpoint http://myurl:8040/services/servcieO2  (REST service)

I don't control the message sent but i need an xml header to receive datas properly ("content-type" "application/xml")

Can I do this directly in my job ?

I think I need a component like chttp but that Listen the request like tRestRequest, then add the header with cSetHeader and then recall my job.

Last edited by minchi (2012-06-22 13:13:40)

Offline

#4 2012-06-22 16:41:57

minchi
Member
Registered: 2012-04-25
Posts: 43

Re: tRestRequest

Actually, can we receive content-type text/html with the tRestRequest component (I think we can't sad so is there an alternative ? )

Offline

Board footer

Powered by FluxBB