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();
}
}
}

Advertisements
This entry was posted in howtos. Bookmark the permalink.

One Response to xml-rpc aufruf auf helma

  1. Webagentur says:

    Ich verstehe das nicht ganz …. was ist dieses xml-rpc? Hat das was mit Pingdiensten zu tun?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s