org.activemath.util
Class XMLRPCtests
java.lang.Object
org.activemath.util.XMLRPCtests
- All Implemented Interfaces:
- org.apache.xmlrpc.XmlRpcHandler
public class XMLRPCtests
- extends Object
- implements org.apache.xmlrpc.XmlRpcHandler
A simple class to run XML-RPC requests for console-testing purposes.
It takes as first parameter a URL, as second the method name and
all further arguments are converted to arguments.
The types a rather limited: only string, int and boolean are accepted.
The latter two are explicitly tested using the canonical conversion methods
(Boolean.parseBoolean(java.lang.String) and Integer.parseInt(java.lang.String, int)). This means
one cannot send the string "true" or "1".
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLRPCtests
public XMLRPCtests(String url,
String methodName,
Object[] args)
main
public static void main(String[] consoleArgs)
callClient
public void callClient()
declareServer
public void declareServer()
throws IOException
- Throws:
IOException
add
public Number add(Integer a,
Integer b)
execute
public Object execute(String method,
Vector params)
- Specified by:
execute in interface org.apache.xmlrpc.XmlRpcHandler