[Freeswitch-users] API info
Brian West
brian at freeswitch.org
Tue Sep 2 02:53:42 PDT 2008
do a "show api" at the cli.
/b
On Sep 2, 2008, at 4:45 AM, Gayatri Kulkarni wrote:
> Hi all,
>
> Is there a way to find out what all API are accepted through the XML-
> RPC module and the list of parameters that each API would require?
> Is there a way to find out the syntax expected by the XML-RPC module
> for invoking the API
>
> I tried a code in Java to find out as follows:
>
> <code>
> 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
>
>
>
> Regards,
> Gayatri Kulkarni
>
> -----
> Whenever you find yourself on the side of the majority, it is time
> to pause and reflect.
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
Brian West
sip:brian at freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080902/cd9efd2c/attachment-0002.html
More information about the FreeSWITCH-users
mailing list