Axis2 REST Content-Type

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Axis2 REST Content-Type

anishde
Hi,

I am trying to acces an axis web service in RESTful way using HTTP POST method.

Axis 2 documentation says
"Axis2 server, if REST is enabled, will act as both a REST endpoint and a SOAP endpoint. When a message is received, if the content type is text/xml and if the SOAPAction Header is missing, then the message is treated as a RESTful Message, if not it is treated as a usual SOAP Message."

folloiwng this i am using Content-Type as "text/xml" . This cause the axis to give exception saying message should be wrapped in soap:Envelope.

It works fine if I use "application/xml" as the Content-Type.

Is it a bug? or wrong documentation. Or am I missing some setting?

Regards,
Anish
Reply | Threaded
Open this post in threaded view
|

Re: Axis2 REST Content-Type

anishde
After going through axis 2 code and some blogs.

It seems according to wsdl 2.0 REST convention only following content types are accepted

     * 1. application/xml
     * 2. application/x-www-form-urlencoded
     * 3. multipart/form-data

Is there any way to conform this to wsdl 1.1? because wsdl generated by axis sayes content type accepted is "text/xml"