com.tinnef.soap
Class SOAPHelper

java.lang.Object
  |
  +--com.tinnef.soap.SOAPHelper

public class SOAPHelper
extends java.lang.Object

Helper class to simplify access to SOAP services. To use this class you will need to use some of the Apache SOAP classes. They are accessible from Text Wielder replace statements, you just need to import them. For documentation on these classes go here.

Here is sample code demonstrating how to use this class:


Constructor Summary
SOAPHelper(java.lang.String url, java.lang.String uri, java.lang.String methodName, int timeout)
          Construct a new SOAPHelper object.
 
Method Summary
 void addParameter(org.apache.soap.rpc.Parameter p)
          Add a Parameter
 void clearParameters()
          Remove all parameters
 org.apache.soap.rpc.Response executeService()
          Execute the SOAP service.
 java.lang.String getMethodName()
          Return the method name
 java.util.Vector getParameters()
          Return the Vector of parameters
 int getTimeout()
          Return the timeout
 java.lang.String getUri()
          Return the URI as a string
 java.lang.String getUrl()
          Return the URL as a string
 void setMethodName(java.lang.String methodNameIn)
          Set the method name.
 void setTimeout(int newTimeout)
          Set the timeout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOAPHelper

public SOAPHelper(java.lang.String url,
                  java.lang.String uri,
                  java.lang.String methodName,
                  int timeout)
           throws java.net.MalformedURLException
Construct a new SOAPHelper object.
Parameters:
url - The URL of the SOAP service.
uri - The URI of the SOAP service.
methodName - The method name to use for the SOAP service.
timeout - Timeout in ms.
Method Detail

setTimeout

public void setTimeout(int newTimeout)
Set the timeout

getTimeout

public int getTimeout()
Return the timeout

getUrl

public java.lang.String getUrl()
Return the URL as a string

getUri

public java.lang.String getUri()
Return the URI as a string

setMethodName

public void setMethodName(java.lang.String methodNameIn)
Set the method name.
Parameters:
methodNameIn - The new method name.

getMethodName

public java.lang.String getMethodName()
Return the method name

getParameters

public java.util.Vector getParameters()
Return the Vector of parameters

clearParameters

public void clearParameters()
Remove all parameters

addParameter

public void addParameter(org.apache.soap.rpc.Parameter p)
Add a Parameter
Parameters:
p - The Parameter to add.

executeService

public org.apache.soap.rpc.Response executeService()
                                            throws org.apache.soap.SOAPException
Execute the SOAP service.
Returns:
The Response object from the SOAP call.