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 Steve <sv...@googlemail.com> on 2008/02/13 10:31:29 UTC

URL encoding in RESTful service

Hello,

My web service client is sending application/x-www-form-urlencoded POST
requests to the web service. The problem is that Axis2 is not decoding the
POST body name/value pairs. I've tracked this down to
XFormURLEncodedBuilder.java, which is decoding the URL but not the body. I
could use GET requests but this is not ideal.

Is this the way it's supposed to work or is it a bug?

Thanks,

Steve

Re: URL encoding in RESTful service

Posted by keith chapman <ke...@gmail.com>.
May be its a bug in Axis2. I'll have a look at it.

Thanks,
Keith.

On Feb 18, 2008 2:31 PM, Steve <sv...@googlemail.com> wrote:

> Thanks for getting back to me Anne.
>
> According to the spec:
>
> http://www.w3.org/TR/html4/interact/forms.html#form-content-type
>
> the body of a POST request with the"application/x-www-form-urlencoded"
> content type also URL encoded. So why is the body not decoded by Axis'
> XFormURLEncodedBuilder.java at the server side?
>
>
> On 17/02/2008, Anne Thomas Manes <at...@gmail.com> wrote:
> >
> > You should only use urlencoded with GET.
> > For POST, you send the input message in the HTTP message body, not in
> > the URL.
> >
> > See http://ws.apache.org/axis2/1_3/rest-ws.html
> >
> > Anne
> >
> > On Feb 13, 2008 4:31 AM, Steve <sv...@googlemail.com> wrote:
> > > Hello,
> > >
> > > My web service client is sending application/x-www-form-urlencoded
> > POST
> > > requests to the web service. The problem is that Axis2 is not decoding
> > the
> > > POST body name/value pairs. I've tracked this down to
> > > XFormURLEncodedBuilder.java, which is decoding the URL but not the
> > body. I
> > > could use GET requests but this is not ideal.
> > >
> > > Is this the way it's supposed to work or is it a bug?
> > >
> > > Thanks,
> > >
> > > Steve
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>


-- 
Keith Chapman
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Re: URL encoding in RESTful service

Posted by Steve <sv...@googlemail.com>.
Thanks for getting back to me Anne.

According to the spec:

http://www.w3.org/TR/html4/interact/forms.html#form-content-type

the body of a POST request with the"application/x-www-form-urlencoded"
content type also URL encoded. So why is the body not decoded by Axis'
XFormURLEncodedBuilder.java at the server side?


On 17/02/2008, Anne Thomas Manes <at...@gmail.com> wrote:
>
> You should only use urlencoded with GET.
> For POST, you send the input message in the HTTP message body, not in the
> URL.
>
> See http://ws.apache.org/axis2/1_3/rest-ws.html
>
> Anne
>
> On Feb 13, 2008 4:31 AM, Steve <sv...@googlemail.com> wrote:
> > Hello,
> >
> > My web service client is sending application/x-www-form-urlencoded POST
> > requests to the web service. The problem is that Axis2 is not decoding
> the
> > POST body name/value pairs. I've tracked this down to
> > XFormURLEncodedBuilder.java, which is decoding the URL but not the body.
> I
> > could use GET requests but this is not ideal.
> >
> > Is this the way it's supposed to work or is it a bug?
> >
> > Thanks,
> >
> > Steve
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: URL encoding in RESTful service

Posted by Anne Thomas Manes <at...@gmail.com>.
You should only use urlencoded with GET.
For POST, you send the input message in the HTTP message body, not in the URL.

See http://ws.apache.org/axis2/1_3/rest-ws.html

Anne

On Feb 13, 2008 4:31 AM, Steve <sv...@googlemail.com> wrote:
> Hello,
>
> My web service client is sending application/x-www-form-urlencoded POST
> requests to the web service. The problem is that Axis2 is not decoding the
> POST body name/value pairs. I've tracked this down to
> XFormURLEncodedBuilder.java, which is decoding the URL but not the body. I
> could use GET requests but this is not ideal.
>
> Is this the way it's supposed to work or is it a bug?
>
> Thanks,
>
> Steve
>

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