You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sean Hile (JIRA)" <ji...@apache.org> on 2007/12/13 17:20:43 UTC

[jira] Created: (AXIS2-3405) Encoded ampersands in REST URLs terminate parameters

Encoded ampersands in REST URLs terminate parameters
----------------------------------------------------

                 Key: AXIS2-3405
                 URL: https://issues.apache.org/jira/browse/AXIS2-3405
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.2
            Reporter: Sean Hile


My project uses Axis2 to provide a REST interface.  If, in the URL, there is an encoded ampersand for one of the parameter values, the parameter value is truncated at the encoded ampersand.  For example:

http://example.com/myService?param=Foo%20%26%20Bar

The param value should be "Foo & Bar" but it is truncated to "Foo ".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (AXIS2-3405) Encoded ampersands in REST URLs terminate parameters

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Godwin Chapman reassigned AXIS2-3405:
-------------------------------------------

    Assignee: Keith Godwin Chapman

> Encoded ampersands in REST URLs terminate parameters
> ----------------------------------------------------
>
>                 Key: AXIS2-3405
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3405
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Sean Hile
>            Assignee: Keith Godwin Chapman
>
> My project uses Axis2 to provide a REST interface.  If, in the URL, there is an encoded ampersand for one of the parameter values, the parameter value is truncated at the encoded ampersand.  For example:
> http://example.com/myService?param=Foo%20%26%20Bar
> The param value should be "Foo & Bar" but it is truncated to "Foo ".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-3405) Encoded ampersands in REST URLs terminate parameters

Posted by "David Hancock (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555595#action_12555595 ] 

David Hancock commented on AXIS2-3405:
--------------------------------------

I can confirm this is also the case on Axis2 1.3 and it is quite a serious issue.

I tried to explore the source to patch it, but got completely overwhelmed.

It seems Axis2 isn't using the JDK or http commons code for parsing URLs but has it's own hidden away somewhere. 

If someone gives me a clue where to look, I'll be happy to delve further.

regards,

Dave Hancock.



> Encoded ampersands in REST URLs terminate parameters
> ----------------------------------------------------
>
>                 Key: AXIS2-3405
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3405
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Sean Hile
>            Assignee: Keith Godwin Chapman
>
> My project uses Axis2 to provide a REST interface.  If, in the URL, there is an encoded ampersand for one of the parameter values, the parameter value is truncated at the encoded ampersand.  For example:
> http://example.com/myService?param=Foo%20%26%20Bar
> The param value should be "Foo & Bar" but it is truncated to "Foo ".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-3405) Encoded ampersands in REST URLs terminate parameters

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Godwin Chapman resolved AXIS2-3405.
-----------------------------------------

    Resolution: Fixed

Fixed in revision 641744. As specified in http://www.w3.org/TR/xforms/#serialize-urlencode we should be breaking the parameters b4 decoding


> Encoded ampersands in REST URLs terminate parameters
> ----------------------------------------------------
>
>                 Key: AXIS2-3405
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3405
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Sean Hile
>            Assignee: Keith Godwin Chapman
>
> My project uses Axis2 to provide a REST interface.  If, in the URL, there is an encoded ampersand for one of the parameter values, the parameter value is truncated at the encoded ampersand.  For example:
> http://example.com/myService?param=Foo%20%26%20Bar
> The param value should be "Foo & Bar" but it is truncated to "Foo ".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-3405) Encoded ampersands in REST URLs terminate parameters

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555600#action_12555600 ] 

Keith Godwin Chapman commented on AXIS2-3405:
---------------------------------------------

Hi Guys,

This is not a bug. Here is the explanation. & is the default query parameter separator (This is the case were all servlet engines). There is a mechanism to override this default value via WSDL 2.0 deployment. The problem is that these parameters cannot be set via POJO deployment as there are no standard annotations to control these parameters. May be we should come up with a set of axis2 specific annotations that can control parameters introduced WSDL 2.0. WSDL 2.0 has a rich description of the HTTPBinding (RESTBinding) hence it gives you control of the whole URL where you can even send parameters in the path (not limited to query parameters).

If you need some help for the moment I can help you get your service deployed via WSDL 2.0 until we fix this in Axis2 (to be able to control this parameters via annotations). I will send a mail on this matter to the dev list so that we can discuss this further and come up with a good solution.

Thanks,
Keith.

> Encoded ampersands in REST URLs terminate parameters
> ----------------------------------------------------
>
>                 Key: AXIS2-3405
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3405
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Sean Hile
>            Assignee: Keith Godwin Chapman
>
> My project uses Axis2 to provide a REST interface.  If, in the URL, there is an encoded ampersand for one of the parameter values, the parameter value is truncated at the encoded ampersand.  For example:
> http://example.com/myService?param=Foo%20%26%20Bar
> The param value should be "Foo & Bar" but it is truncated to "Foo ".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-3405) Encoded ampersands in REST URLs terminate parameters

Posted by "David Hancock (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555653#action_12555653 ] 

David Hancock commented on AXIS2-3405:
--------------------------------------

Hi Keith,

Thanks for the quick reply.

I'm not sure I understand you though.

The problem it that if I make a servlet request which has a parameter with a value that includes an ampersand, then I need to encode that ampersand as %26.

That's fine, it works in Tomcat and SunAppServer exactly as expected.

But if I pass the same request through Axis2, it decodes the %26 to an ampersand before it parses the parameters from the query portion of the URL.

I know next to nothing about WSDL and POJO deployment and the REST of it (ha ha), but it seems to me that wen Axis2 is operating in REST mode, it has full control over how it maps inbound URLs to the classes that it is providing web services for. Therefore if this mapping is breaking, then Axis2 might be the place to look for a fix.

Or have I got completely the wrong end of the stick?

regards,

Dave Hancock.

> Encoded ampersands in REST URLs terminate parameters
> ----------------------------------------------------
>
>                 Key: AXIS2-3405
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3405
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Sean Hile
>            Assignee: Keith Godwin Chapman
>
> My project uses Axis2 to provide a REST interface.  If, in the URL, there is an encoded ampersand for one of the parameter values, the parameter value is truncated at the encoded ampersand.  For example:
> http://example.com/myService?param=Foo%20%26%20Bar
> The param value should be "Foo & Bar" but it is truncated to "Foo ".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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