Hi Nirodha, Try setting "messageType" property before calling the Rest backend, sample would be [1]
[1] - <property name="messageType" value="text/plain" scope="axis2"/> Thanks, On 27 August 2016 at 19:41, Nirodha Gallage <niro...@wso2.com> wrote: > Hi, > > I'm have created a proxy service which calls a REST endpoint which sends a > text response. Before calling the endpoint I have set the below headers to > get the response as text/plain. And then I read values from response using > xpath function. > > <property name="messageType" value="text/plain" scope="axis2"/> > <header name="Accept" scope="transport" value="text/plain"/> > > The whole scenario works fine when you call the proxy service with a SOAP > client. But when the proxy is invoked with a scheduled task it does not > work and gives a message builder error. While debugging it I figured out > that 'Content-Type' header is not set in the second scenario(task) in the > rest service call, due to that it is sending text/html response. Is this a > known issue? Is there any solution for this. > > I also tried with setting following two header/property but that also did > not work. > > <header name="Content-Type" scope="transport" value="text/plain" > action="set" /> > <property name="ContentType" value="text/plain" scope="axis2" > action="set" /> > > Thanks, > Nirodha > > -- > > *Nirodha Gallage* > Associate Technical Lead > WSO2 Inc.: http://wso2.com/ > Mobile: +94716429078 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Rajith Vitharana Senior Software Engineer, WSO2 Inc. : wso2.com Mobile : +94715883223 Blog : http://lankavitharana.blogspot.com/ <http://wso2.com/signature>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev