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 "Jarosław Bałut (JIRA)" <ji...@apache.org> on 2011/04/14 12:40:05 UTC

[jira] [Created] (AXIS2-5004) Missing backslash in a regular expression causes improper operation's name calculation

Missing backslash in a regular expression causes improper operation's name calculation
--------------------------------------------------------------------------------------

                 Key: AXIS2-5004
                 URL: https://issues.apache.org/jira/browse/AXIS2-5004
             Project: Axis2
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.5.4
            Reporter: Jarosław Bałut


The class org.apache.axis2.util.Utils implements the getOperationName(String path, String serviceName) method, which purpose is to "Compute the operation path from request URI using the servince name". This method is called during handling of REST style requests and contains the following line of code:

temp = path.split(serviceName + ".");

which is supposed to split the request URI on the boundary of the "<service name>." (service name followed by the dot character). The regular expression (serviceName + ".") is missing a backslash character before the dot. This effectively means that the regular expression matches the sequence "<service name><any character>" instead of "<service name><dot character>". Described behaviour causes problems, when the method's name contains service's name (e.g. when the service is called "echo" and the method is called "echoString"). The line of code mentioned above should look like: 

temp = path.split(serviceName + "\\.");

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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