public class SimpleSOAPClient extends GenericService
#invoke(Vector)invoke
method.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
SimpleSOAPClient() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParameters(atg.apache.soap.rpc.Call pCall,
java.util.Vector pParameters)
Add the supplied parameter list to the
Call
object. |
protected atg.apache.soap.rpc.Call |
getCallObject()
This method returns a
Call object. |
java.lang.String |
getEncodingStyleURI()
The encoding style that should be set on the
Call
object. |
java.lang.String |
getMethodName()
The method name that is set on the
Call object. |
java.lang.String |
getSOAPActionURI()
Used by the
Call.invoke() method. |
java.lang.String |
getSOAPServerURL()
The URL that this SOAP client should make a request to.
|
java.lang.String |
getTargetObjectURI()
The targetObjectURI that is set on the
Call object. |
void |
invoke(java.util.Vector pParameters)
This is the expected method that will be called to send
a Vector of
atg.apache.soap.Parameter objects
via a SOAP request. |
boolean |
isCheckForFault()
If this component is configured to look for faults in the
Response
object, then the processFaults
method will be invoked. |
boolean |
isCheckForReturnValue()
If this component is configured to look for a response from the
server in the
Response object, then
the processFaults
method will be invoked. |
protected void |
processFaults(atg.apache.soap.rpc.Response pResponse)
This provides a simple implementation.
|
protected void |
processResponse(atg.apache.soap.rpc.Response pResponse)
This method processes the
Response object
from the invoke method on a call object. |
void |
processReturnValue(atg.apache.soap.rpc.Response pResponse)
This method is just an adapter method.
|
void |
setCheckForFault(boolean pCheckForFault)
Set the checkForFault property.
|
void |
setCheckForReturnValue(boolean pCheckForReturnValue)
Set the checkForReturnValue property.
|
void |
setEncodingStyleURI(java.lang.String pEncodingStyleURI)
Set the encodingStyleURI property.
|
void |
setMethodName(java.lang.String pMethodName)
Set the methodName property.
|
void |
setSOAPActionURI(java.lang.String pSOAPActionURI)
Set the SOAPActionURI property.
|
void |
setSOAPServerURL(java.lang.String pSOAPServerURL)
Set the SOAPServerURL property.
|
void |
setTargetObjectURI(java.lang.String pTargetObjectURI)
Set the TargetObjectURI property.
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public java.lang.String getSOAPServerURL()
Call.invoke()
method.
An example would be: http://localhost:8080/soap/servlet/rpcrouterpublic void setSOAPServerURL(java.lang.String pSOAPServerURL) throws java.net.MalformedURLException
MalformedURLException
is thrown.pSOAPServerURL
- java.net.MalformedURLException
public java.lang.String getSOAPActionURI()
Call.invoke()
method.public void setSOAPActionURI(java.lang.String pSOAPActionURI)
pSOAPActionURI
- public boolean isCheckForFault()
Response
object, then the processFaultsprocessFaults
method will be invoked.public void setCheckForFault(boolean pCheckForFault)
pCheckForFault
- public boolean isCheckForReturnValue()
Response
object, then
the processFaultsprocessReturnValue
method will be invoked.public void setCheckForReturnValue(boolean pCheckForReturnValue)
pCheckForReturnValue
- public java.lang.String getTargetObjectURI()
Call
object.
This is what the SOAP server uses to route incoming request
to a particular service.public void setTargetObjectURI(java.lang.String pTargetObjectURI)
pTargetObjectURI
- public java.lang.String getMethodName()
Call
object.public void setMethodName(java.lang.String pMethodName)
pMethodName
- public java.lang.String getEncodingStyleURI()
Call
object. This defaults to Constants.NS_URI_SOAP_ENC
public void setEncodingStyleURI(java.lang.String pEncodingStyleURI)
pEncodingStyleURI
- protected atg.apache.soap.rpc.Call getCallObject()
Call
object. This creates
a new Call
object and sets the following properties
on it.
Call
objectprotected void processFaults(atg.apache.soap.rpc.Response pResponse)
pResponse
- the Response
object returned
from an invoke
call.public void processReturnValue(atg.apache.soap.rpc.Response pResponse)
UnsupportedOperationException
.the
- response from the SOAP invocationprotected void processResponse(atg.apache.soap.rpc.Response pResponse)
Response
object
from the invoke
method on a call object.
It determines if the Response
object should
be checked for faults and/or returnValues. It does this
via the isCheckForFault
and isCheckForReturnValue
methods respectively.
If either of the above items should be checked then it will
call processFaults
and/or processReturnValue
pResponse
- a Response
valueprotected void addParameters(atg.apache.soap.rpc.Call pCall, java.util.Vector pParameters)
Call
object. The contents of the pParameters
list must be a list of atg.apache.soap.rpc.Parameter
objects.pCall
- the call object that is used to invoke SOAP servicepParameters
- list of vectors to pass as parameters to the
Call object. This list must be a list of atg.apache.soap.rpc.Parameter
objects.public void invoke(java.util.Vector pParameters)
atg.apache.soap.Parameter
objects
via a SOAP request.
It will create a call object by calling getCallObject
and then add the parameters to the call object via the
addParameters
. Finally, it will cal
invoke on the Call
object and determine if any
processing needs to be done on the Response
object by calling processResponse
pParameters
- the Object that contains parameters to be sent in the
SOAP rpc call. This Vector must contain Paramter objects.