XML-RPC WebServices

Xml-Rpc is a simple Remote Procedure Call protocol in XML. Many implementations are referenced at Xml-Rpc home. Join uses the Apache Xml-Rpc implementation for Java on the server side to expose its APIs.

Services

All available services are exposed via the XmlRpcHandler interface. You can find API documentaion here.

Parameters

These are some parameters and details on how to call Xml-Rpc services:

  • The URL for Xml-Rpc requests is http://host[:port]/[context]/xmlrpc,
  • All services name should be prefixed by join.. For calling the setBuildStatus service, the method name is join.setBuildStatus,
  • All keys in struct are case sensitive,
  • All strings are passed as UTF-8, and not ASCII per the XML-RPC update on 6/30/2003.

Samples

This is a sample on how to call a Join service from a Groovy script. Because Join has built-in support for launching Groovy scripts, this is a useful piece of code for making your script report a process status...

...
import groovy.net.xmlrpc.*
def service = new XMLRPCServerProxy("http://localhost:8080/join/xmlrpc")
def token = service.join.login("mylogin", "mypassword")
println "Got a security token: ${token}"
service.join.setBuildStatus(token, "build_ok", buildId)
...
            

Another sample in pure Java can also be found into Join tests suite.