Bug in current version (07/14/2006).

class - org.apache.xmlrpc.server.ReflectiveXmlRpcHandler

bug in the method :

        public Object execute(XmlRpcRequest pRequest) throws XmlRpcException
{
            AuthenticationHandler authHandler =
mapping.getAuthenticationHandler();
            if (authHandler != null  &&
!authHandler.isAuthorized(pRequest)) {
                throw new XmlRpcNotAuthorizedException("Not authorized");
            }
            Object[] args = new Object[pRequest.getParameterCount()];
            for (int j = 0;  j < args.length;  j++) {
                args[j] = pRequest.getParameter(j);
            }
            Object instance = getInstance(pRequest);
            for (int i = 0;  i < methods.length;  i++) {
            MethodData methodData = methods[i];
            TypeConverter[] converters = methodData.typeConverters;
            if (args.length == converters.length) {
                boolean matching = true;
                for (int j = 0;  j < args.length;  j++) {
// As is:
//                    if (!converters[j].isConvertable(args[i])) {
// As should be:
                    if (!converters[j].isConvertable(args[j])) {
                        matching = false;
                        break;
                    }
                }
                if (matching) {
                    for (int j = 0;  j < args.length;  j++) {
                        args[i] = converters[i].convert(args[i]);
                    }
                    return invoke(instance, methodData.method, args);
                }
            }
            }
            throw new XmlRpcException("No method matching arguments: " +
Util.getSignature(args));
    }



Hope it helps ...

Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • [PATCH] dwzr
    • [PATCH] Alexey Bezrodnov

Reply via email to