superwaba.ext.xplat.webservice
Class SOAP

java.lang.Object
  |
  +--superwaba.ext.xplat.webservice.SOAP

public class SOAP
extends java.lang.Object


Field Summary
static boolean debug
          Turn this TRUE to print the xml in the console.
 java.lang.String mtd
           
 java.lang.String namespace
           
 int openTimeout
           
static java.lang.String prefix
          The prefix string used when sending requests.
 int readTimeout
           
static java.lang.String suffix
          The suffix string used when sending requests.
 java.lang.String uri
           
 
Constructor Summary
SOAP(java.lang.String mtd, java.lang.String uri)
          Constructs a SOAP request with the given parameters.
 
Method Summary
 void execute()
          This method must be called to execute the soap request
 java.lang.Object getAnswer()
          Returns the answer of the soap request.
 void setObjectParam(java.lang.String paramName, java.lang.String[] fieldNames, java.lang.String[] fieldValues)
          Sets an object param identifying it as .
 void setParam(boolean param)
          Sets a boolean parameter in the order of the method call, identifying it as
 void setParam(boolean[] param)
          Sets a boolean array parameter in the order of the method call, identifying it as
 void setParam(boolean[] param, java.lang.String paramName)
          Sets a boolean array parameter in the order of the method call, identifying it as .
 void setParam(boolean param, java.lang.String paramName)
          Sets a boolean parameter in the order of the method call, identifying it as .
 void setParam(double param)
          Sets a double parameter in the order of the method call, identifying it as
 void setParam(double[] param)
          Sets a double array parameter in the order of the method call, identifying it as
 void setParam(double[] param, java.lang.String paramName)
          Sets a double array parameter in the order of the method call, identifying it as .
 void setParam(double param, java.lang.String paramName)
          Sets a double parameter in the order of the method call, identifying it as .
 void setParam(float param)
          Sets a float parameter in the order of the method call, identifying it as
 void setParam(float[] param)
          Sets a float array parameter in the order of the method call, identifying it as
 void setParam(float[] param, java.lang.String paramName)
          Sets a float array parameter in the order of the method call, identifying it as .
 void setParam(float param, java.lang.String paramName)
          Sets a float parameter in the order of the method call, identifying it as .
 void setParam(int param)
          Sets a int parameter in the order of the method call, identifying it as
 void setParam(int[] param)
          Sets a int array parameter in the order of the method call, identifying it as
 void setParam(int[] param, java.lang.String paramName)
          Sets a int array parameter in the order of the method call, identifying it as .
 void setParam(int param, java.lang.String paramName)
          Sets a int parameter in the order of the method call, identifying it as .
 void setParam(java.lang.String param)
          Sets a string parameter in the order of the method call, identifying it as
 void setParam(java.lang.String[] param)
          Sets a String array parameter in the order of the method call, identifying it as .
 void setParam(java.lang.String[] param, java.lang.String paramName)
          Sets a String array parameter in the order of the method call, identifying it as .
 void setParam(java.lang.String[] param, java.lang.String paramName, java.lang.String paramType)
          Sets an array parameter in the order of the method call.
 void setParam(java.lang.String param, java.lang.String paramName)
          Sets a string parameter in the order of the method call, identifying it as .
 void setParam(java.lang.String param, java.lang.String paramName, java.lang.String paramType)
          Sets a parameter with the name and type specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Turn this TRUE to print the xml in the console. You may also call HttpStream.debugHeader = true.

namespace

public java.lang.String namespace

uri

public java.lang.String uri

mtd

public java.lang.String mtd

openTimeout

public int openTimeout

readTimeout

public int readTimeout

prefix

public static java.lang.String prefix
The prefix string used when sending requests. Note that it uses UTF-8, so unicode characters are not supported.

suffix

public static java.lang.String suffix
The suffix string used when sending requests.
Constructor Detail

SOAP

public SOAP(java.lang.String mtd,
            java.lang.String uri)
Constructs a SOAP request with the given parameters. The default namespace will be used, along with a open timeout of 25 seconds and a read timeout of 60 seconds.
Parameters:
mtd - The method you're calling.
uri - The complete URI.
Method Detail

setParam

public void setParam(java.lang.String param,
                     java.lang.String paramName,
                     java.lang.String paramType)
Sets a parameter with the name and type specified. Important: unicode characters are not accepted because the default header uses UTF-8.

setParam

public void setParam(java.lang.String param)
Sets a string parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(java.lang.String param,
                     java.lang.String paramName)
Sets a string parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(int param)
Sets a int parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(int param,
                     java.lang.String paramName)
Sets a int parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(double param)
Sets a double parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(double param,
                     java.lang.String paramName)
Sets a double parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(float param)
Sets a float parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(float param,
                     java.lang.String paramName)
Sets a float parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(boolean param)
Sets a boolean parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(boolean param,
                     java.lang.String paramName)
Sets a boolean parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(java.lang.String[] param,
                     java.lang.String paramName,
                     java.lang.String paramType)
Sets an array parameter in the order of the method call. The array type will be and the name is . Important: unicode characters are not accepted because the default header uses UTF-8.
Parameters:
param -  
paramName -  
paramType -  

setParam

public void setParam(java.lang.String[] param)
Sets a String array parameter in the order of the method call, identifying it as . Important: unicode characters are not accepted because the default header uses UTF-8.
Parameters:
param -  

setParam

public void setParam(java.lang.String[] param,
                     java.lang.String paramName)
Sets a String array parameter in the order of the method call, identifying it as . Important: unicode characters are not accepted because the default header uses UTF-8.
Parameters:
param -  
paramName -  

setParam

public void setParam(int[] param)
Sets a int array parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(int[] param,
                     java.lang.String paramName)
Sets a int array parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(double[] param)
Sets a double array parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(double[] param,
                     java.lang.String paramName)
Sets a double array parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(float[] param)
Sets a float array parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(float[] param,
                     java.lang.String paramName)
Sets a float array parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setParam

public void setParam(boolean[] param)
Sets a boolean array parameter in the order of the method call, identifying it as
Parameters:
param -  

setParam

public void setParam(boolean[] param,
                     java.lang.String paramName)
Sets a boolean array parameter in the order of the method call, identifying it as .
Parameters:
param -  
paramName -  

setObjectParam

public void setObjectParam(java.lang.String paramName,
                           java.lang.String[] fieldNames,
                           java.lang.String[] fieldValues)
Sets an object param identifying it as . The object fields names and values must be informed as the String arrays and . Important: unicode characters are not accepted because the default header uses UTF-8.
Parameters:
paramName -  
fieldNames -  
fieldValues -  

getAnswer

public java.lang.Object getAnswer()
Returns the answer of the soap request. Important: the values may be escaped; use superwaba.ext.xplat.util.EscapeHtml.unescape to convert it back.
Returns:
Object

execute

public void execute()
             throws XmlRpcException
This method must be called to execute the soap request
Throws:
XmlRpcException -  
OutOfMemoryError - If the request String is greater than 32750 characters.