1 16 17 18 package org.apache.xmlrpc; 19 20 import java.util.Vector ; 21 22 27 public class AuthDemo implements AuthenticatedXmlRpcHandler 28 { 29 32 public Object execute(String method, Vector v, String user, String password) 33 throws Exception  34 { 35 if (user == null || user.startsWith("bad")) 37 { 38 throw new XmlRpcException(5, "Sorry, you're not allowed in here!"); 39 } 40 41 return ("Hello " + user); 42 } 43 } 44 | Popular Tags |