You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ruchith Fernando <ru...@gmail.com> on 2006/08/09 16:16:56 UTC

[Axis2] REST: Response content type and the wrapping XML

Hi Folks,

I'm developing a simple REST service. I'm trying to return some HTML
content and render that response in a browser window.
Right now it is not possible to do this since the content type
returned is text/xml. Shall we allow the service/handler developers to
switch the response content type in the REST case?

Also shall we add another switch to get rid of the wrapper xml in the
REST response? right now we wrap the response from an operation with :

<ns:operationResponse xmlns:ns="http://tinyurl.samples.axis2.apache.org/xsd">
 <ns:return>

 </ns:return>
</ns:operationResponse>

elements.

Thanks,
Ruchith

-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] REST: Response content type and the wrapping XML

Posted by Eran Chinthaka <ch...@opensource.lk>.
Ruchith Fernando wrote:
> Hi Folks,
> 
> I'm developing a simple REST service. I'm trying to return some HTML
> content and render that response in a browser window.
> Right now it is not possible to do this since the content type
> returned is text/xml. Shall we allow the service/handler developers to
> switch the response content type in the REST case?

Will check on this and fix of there is a problem.

> 
> Also shall we add another switch to get rid of the wrapper xml in the
> REST response? right now we wrap the response from an operation with :
> 
> <ns:operationResponse
> xmlns:ns="http://tinyurl.samples.axis2.apache.org/xsd">
> <ns:return>
> </ns:return>
> </ns:operationResponse>
> 
> elements.

Write your own message receiver my friend. RPC message receiver is for
rpc style of interaction and its a must that you wrap your response with
a return element. So the best option is writing your own message
receiver or to use XMLInOutMessageReceiver.

-- Chinthaka