ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E Jurach Jr." <muad...@erf.net>
Subject PATCH: XmlRpcServer.java - allow dots in handlerName
Date Tue, 11 Dec 2001 20:15:55 GMT
In XmlRpcServer.java, we find indexOf(".") of methodName to separate the
handlerName from the method name.  This both assumes the handlerName does
not have dots (which may or may not be correct according to the spec...),
but further allows dots to appear in the method name (which is almost
certainly NOT correct, given our mapping of methodName to java method
name).  By chanding that indexOf() to lastIndexOf(), we can better map
handlerName to a package, and methodName to a method name.

james

Index: src/java/org/apache/xmlrpc/XmlRpcServer.java
===================================================================
RCS file: /home/cvspublic/xml-rpc/src/java/org/apache/xmlrpc/XmlRpcServer.java,v
retrieving revision 1.2
diff -u -3 -r1.2 XmlRpcServer.java
--- src/java/org/apache/xmlrpc/XmlRpcServer.java	2001/09/04 22:03:49	1.2
+++ src/java/org/apache/xmlrpc/XmlRpcServer.java	2001/12/11 19:57:05
@@ -182,7 +182,7 @@
                 Object handler = null;
 
                 String handlerName = null;
-                int dot = methodName.indexOf (".");
+                int dot = methodName.lastIndexOf (".");
                 if (dot > -1)
                 {
                     handlerName = methodName.substring (0, dot);

Mime
View raw message