com.echomine.xmlrpc
Class Call

java.lang.Object
  extended by com.echomine.xmlrpc.Call

public class Call
extends java.lang.Object

The main object to construct a method call for the XML RPC. You set the method name, set the parameters, and then output it as a string within the intended protocol.. For instance, if you are using HTTP, you will need to wrap the method call inside a HTTP request.


Constructor Summary
Call(SerializerFactory factory)
          constructs an empty call object that's normally used for parsing an incoming call object
Call(java.lang.String methodName, Namespace ns, SerializerFactory factory)
          constructs a request object with the proper namespace
Call(java.lang.String methodName, SerializerFactory factory)
          constructs a request object for sending out
 
Method Summary
 void addParameter(java.lang.Object param)
           
 void addParameters(java.lang.Object[] param)
           
 Element getDOM()
           
 java.lang.String getMethodName()
           
 Namespace getNamespace()
           
 java.lang.Object getParameter(int idx)
          obtains the parameter value.
 java.lang.Object[] getParameters()
          retrieves all the parametes
 void parse(Element elem)
          parses a response from the element.
 void setMethodName(java.lang.String name)
           
 void setNamespace(Namespace ns)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Call

public Call(SerializerFactory factory)
constructs an empty call object that's normally used for parsing an incoming call object


Call

public Call(java.lang.String methodName,
            SerializerFactory factory)
constructs a request object for sending out


Call

public Call(java.lang.String methodName,
            Namespace ns,
            SerializerFactory factory)
constructs a request object with the proper namespace

Method Detail

setNamespace

public void setNamespace(Namespace ns)

getNamespace

public Namespace getNamespace()

setMethodName

public void setMethodName(java.lang.String name)

getMethodName

public java.lang.String getMethodName()

addParameter

public void addParameter(java.lang.Object param)

addParameters

public void addParameters(java.lang.Object[] param)

getParameter

public java.lang.Object getParameter(int idx)
obtains the parameter value. You will have to either know the type of the parameter beforehand or dynamically find out exactly what type the parameter value is. Technically, you should know the method signature when parsing this request. Otherwise, you will have to check if the instance is of the base XMLRPC type (ie. Double, Integer, Boolean, etc).


getParameters

public java.lang.Object[] getParameters()
retrieves all the parametes


getDOM

public Element getDOM()

parse

public void parse(Element elem)
parses a response from the element. This will effectively clear out the current parameters stored in the object.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2005 Echomine. All Rights Reserved.