axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kishanthan Thangarajah (JIRA)" <>
Subject [jira] [Commented] (AXIS2-5489) Encoding GET parameters with '+' character in generated REST clients with WSDL2Java
Date Fri, 12 Apr 2013 13:44:16 GMT


Kishanthan Thangarajah commented on AXIS2-5489:

OK, I can now reproduce this. It was a good debugging session.

Here is my observation.

When sending the character "+" in any of the following form, i.e. in URL, Path or with Query,
this character is treated as the legal character. It will not be encoded, because in,
this character is added under legal characters list. In there, it is also mentioned that the
set of legal characters are taken from [1]. So I don't see any issue on axis2 client side,
regarding this so far.

But I think the issue is at server side. When we send the "+" character in the REST request,
this is getting treated/changed with " " value. I managed to find the code segment which does
this change also. It is in URIEncoderDecoder#decode method, where the charactor "+" is treated
specially. Going into this further, I found that this is added as a fix to [2].

> Encoding GET parameters with '+' character in generated REST clients with WSDL2Java
> -----------------------------------------------------------------------------------
>                 Key: AXIS2-5489
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.6.2
>         Environment: Ubuntu
>            Reporter: Miguel Ángel Francisco Fernández
>            Priority: Blocker
>              Labels: +, GET, REST, encode,
>             Fix For: 1.6.2
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> Using the wsdl2java tool to generate a Java client to access a REST web service described
with a WSDL 2.0, the generated client does not encode the symbol '+' in GET parameters.
> For example, if I have an URL "/get_url", and I set the parameter "param" to "x+x", the
symbol "+" is not encoded, and therefore it is interpreted as a space on the server ("x x").
If I try to send the parameter encoded, i.e., "%2B", then "%252B" is received in the server.
> Therefore, it is not possible to send the '+' symbol in a GET parameter.
> I guess that it is caused by the definition of the field LEGAL_CHARACTERS_IN_QUERY in
the interface org.apache.axis2.description.WSDL2Constants, which is set to "-._~!$'()*+,;=:@/?"

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message