<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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?</FONT></DIV>
<DIV><FONT face=Arial size=2>Is there a way to find out the syntax expected by
the XML-RPC module for invoking the API</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I tried a code in Java to find out as
follows:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><code></FONT></DIV>
<DIV><FONT size=2>
<P align=left>getSipServices(XmlRpcClientConfigImpl conf, PrintStream
services_file) </FONT><FONT size=2>{</P>
<P align=left></FONT><B><FONT color=#7f0055 size=2>try</B></FONT><FONT size=2>
{</P>
<P align=left></FONT><FONT color=#3f7f5f size=2>//create client:</FONT></P>
<P align=left><FONT size=2> XmlRpcClient registryClient =
</FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2>
XmlRpcClient(conf.getServerURL());</P>
<P align=left></FONT><FONT size=2>String url_str =
conf.getServerURL().toString();</P>
<P align=left></FONT><FONT color=#3f7f5f size=2>//create
collection</P></FONT><FONT size=2>
<P align=left>RemoteCollection Switch = </FONT><B><FONT color=#7f0055
size=2>new</B></FONT><FONT size=2> RemoteCollection(registryClient,
<I>getUri</I>(url_str));</P>
<P align=left></FONT><FONT color=#3f7f5f size=2>//actually obtain
services:</P></FONT><FONT size=2>
<P align=left>.</FONT><I><FONT color=#0000c0 size=2>services</I></FONT><FONT
size=2> = Switch.getServices();</P>
<P align=left>.</FONT><I><FONT color=#0000c0 size=2>props</I></FONT><FONT
size=2> = Switch.getProperties();</P>
<P align=left>.</FONT><I><FONT color=#0000c0 size=2>props</I></FONT><FONT
size=2>.list(services_file);</P>
<P align=left><U>Enumeration</U> prop_enum = </FONT><I><FONT color=#0000c0
size=2>props</I></FONT><FONT size=2>.elements();</P>
<P align=left>System.</FONT><I><FONT color=#0000c0 size=2>out</I></FONT><FONT
size=2>.println(</FONT><FONT color=#2a00ff
size=2>"--------------Properties----------------"</FONT><FONT size=2>);</P>
<P align=left></FONT><B><FONT color=#7f0055 size=2>while</B></FONT><FONT size=2>
(prop_enum.hasMoreElements()){</P>
<P align=left>System.</FONT><I><FONT color=#0000c0 size=2>out</I></FONT><FONT
size=2>.println(prop_enum.nextElement());</P>
<P align=left>}</P>
<P align=left>System.</FONT><I><FONT color=#0000c0 size=2>out</I></FONT><FONT
size=2>.println(</FONT><FONT color=#2a00ff
size=2>"----------------------------------------"</FONT><FONT size=2>);</P>
<P align=left></P>
<P align=left>String[] resources = Switch.listResources();</P>
<P align=left></FONT><B><FONT color=#7f0055 size=2>int</B></FONT><FONT size=2> i
= 0;</P>
<P align=left>System.</FONT><I><FONT color=#0000c0 size=2>out</I></FONT><FONT
size=2>.println(</FONT><FONT color=#2a00ff
size=2>"--------------Resources----------------"</FONT><FONT size=2>);</P>
<P align=left></FONT><B><FONT color=#7f0055 size=2>while</B></FONT><FONT
size=2>(i < resources.</FONT><FONT color=#0000c0 size=2>length</FONT><FONT
size=2>){</P>
<P align=left>System.</FONT><I><FONT color=#0000c0 size=2>out</I></FONT><FONT
size=2>.println(resources[i]);</P>
<P align=left>}</P>
<P align=left>System.</FONT><I><FONT color=#0000c0 size=2>out</I></FONT><FONT
size=2>.println(</FONT><FONT color=#2a00ff
size=2>"----------------------------------------"</FONT><FONT size=2>);</P>
<P align=left></P></FONT><FONT size=2>
<P align=left>}</P>
<P align=left>catch (Exception e) { ....}</P></FONT><FONT size=2>
<P align=left></FONT><B><FONT color=#7f0055 size=2>return</B></FONT><FONT
size=2> (</FONT><I><FONT color=#0000c0 size=2>services</I></FONT><FONT
size=2>);</P>
<P align=left>}</P>
<P align=left></code></P>
<P align=left><FONT face=Arial>Unfortunately, the it does not return any
properties! for resources, it returns an exception: </FONT><FONT color=#ff0000
size=2></P>
<P>java.lang.InstantiationError: org.apache.xmlrpc.XmlRpcRequest </P>
<P><FONT face=Arial color=#000000>and services returned are:</FONT></P>
<P><FONT face=Arial color=#000000> </FONT><FONT
size=2></P>
<P align=left><FONT face=Arial color=#000000>-----List of available
services--------</FONT></P>
<P align=left><FONT face=Arial color=#000000>XPathQueryService</FONT></P>
<P align=left><FONT face=Arial
color=#000000>CollectionManagementService</FONT></P>
<P align=left><FONT face=Arial color=#000000>UserManagementService</FONT></P>
<P align=left><FONT face=Arial color=#000000>DatabaseInstanceManager</FONT></P>
<P align=left><FONT face=Arial color=#000000>IndexQueryService</FONT></P>
<P align=left><FONT face=Arial color=#000000>XUpdateQueryService</FONT></P>
<P align=left><FONT face=Arial color=#000000>ValidationService</FONT></P>
<P><FONT face=Arial
color=#000000>----------------------------------------</FONT></P>
<P><FONT face=Arial color=#000000>with these services, how do I originate a call
from within my application</FONT></P>
<P> </P></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,<BR>Gayatri Kulkarni</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----<BR>Whenever you find yourself on the side of
the majority, it is time to pause and reflect.<BR></FONT></DIV></BODY></HTML>