xml-rpc aufruf auf helma

hop.bat:
set XMLRPC_PORT=8082

app.properties:
XmlRpcAccess = MemberMgr.createAccount
XmlRpcHandlerName = *

MemberMgr/functions.js:
function createAccount(usr, masterAccountID) {
..
}

Root/type.properties:
members = mountpoint(MemberMgr)

JAVA CODE

import java.util.Vector;
import helma.xmlrpc.*;

public class JavaClient {
// The location of our server.
private final static String server_url = “localhost”;
public static void main(String[] args) {
try {
// Create an object to represent our server.
XmlRpcClient server = new XmlRpcClient(server_url, 8082);
// Build our parameter list.
Vector params = new Vector();
params.addElement(new Integer(5));
params.addElement(new Integer(3));

// Call the server, and get our result.
// this only works with Root mountpoints
Object o = server.execute(“members.createAccount”, params);
System.out.println(“result: ” + o);
}
catch (XmlRpcException exception) {
System.err.println(“JavaClient: XML-RPC Fault #” +
Integer.toString(exception.code) + “: ” +
exception.toString());
}
catch (Exception e) {
e.printStackTrace();
}
}
}

One thought on “xml-rpc aufruf auf helma

Comments are closed.