Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5489

Encoding GET parameters with '+' character in generated REST clients with WSDL2Java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.6.2
    • 1.7.0
    • kernel, transports
    • Ubuntu

    Description

      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 "-._~!$'()*+,;=:@/?"

      Attachments

        1. AXIS2-5489.patch
          1.0 kB
          Kishanthan Thangarajah
        2. axis2-kernel-1.6.2.jar
          1021 kB
          Kishanthan Thangarajah

        Activity

          People

            kishanthan Kishanthan Thangarajah
            miguelafr Miguel Ángel Francisco Fernández
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified