You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mark Thompson <ma...@sirsidynix.com> on 2007/08/10 23:49:12 UTC

[axis2] rest question

The axis2/1_2/rest.ws.html documentation indicates that if the content
type is text/xml and the SOAPAction Header is missing that the message
is treated as a restful message.

If that is the case should the AxisServlet code be changed to check if
the request.getHeader(HTTPConstants.HEADER_SOAP_ACTION) value is not
empty in addition to checking if !isRESTRequest(contentTYpe) near the
top of the doPost(...) method?

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


Re: [axis2] rest question

Posted by keith chapman <ke...@gmail.com>.
This is not the case now. text/xml contentType is used for SOAP 1.1 request,
the way we figure out whether a request is REST is based on the contentType.
Obviously If the HTTPMethod is PUT, GET or DELETE then this is treated as
REST automatically. From 1.2 onwards we hace the notion of messageBuilders
and Message Formatters who are called upon to build request messages and to
format response messages (This mapping is in the axis2 xml). So if the
contentType is text/xml then the SOAP builder will take control. If the
content Type is application/xml then the ApplicationXMLBuilder (RESP POST
style) will take over. The GET is processed by XFormURLEncodedBuilder and so
on. These mappings can be changed in your axis2.xml.

Thanks,
Keith.



On 8/11/07, Mark Thompson <ma...@sirsidynix.com> wrote:
>
> The axis2/1_2/rest.ws.html documentation indicates that if the content
> type is text/xml and the SOAPAction Header is missing that the message
> is treated as a restful message.
>
> If that is the case should the AxisServlet code be changed to check if
> the request.getHeader(HTTPConstants.HEADER_SOAP_ACTION) value is not
> empty in addition to checking if !isRESTRequest(contentTYpe) near the
> top of the doPost(...) method?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/