getSipServices(XmlRpcClientConfigImpl conf, PrintStream services_file)
{ try { //create client:XmlRpcClient registryClient = new XmlRpcClient(conf.getServerURL());
String url_str = conf.getServerURL().toString();
//create collection
RemoteCollection Switch =
new RemoteCollection(registryClient, getUri(url_str)); //actually obtain services:.
services = Switch.getServices();.
props = Switch.getProperties();.
props.list(services_file);Enumeration prop_enum =
props.elements();System.
out.println("--------------Properties----------------"); while (prop_enum.hasMoreElements()){System.
out.println(prop_enum.nextElement());}
System.
out.println("----------------------------------------");String[] resources = Switch.listResources();
int i = 0;System.
out.println("--------------Resources----------------"); while(i < resources.length){System.
out.println(resources[i]);}
System.
out.println("----------------------------------------");}
catch (Exception e) { ....}
return (services);}
</code>
Unfortunately, the it does not return any properties! for resources, it returns an exception:
java.lang.InstantiationError: org.apache.xmlrpc.XmlRpcRequest
and services returned are:
-----List of available services--------
XPathQueryService
CollectionManagementService
UserManagementService
DatabaseInstanceManager
IndexQueryService
XUpdateQueryService
ValidationService
----------------------------------------
with these services, how do I originate a call from within my application