public class SendObjectAsXML extends ActionImpl
#executeAction(ProcessExecutionContext)executeAction()
method.
This action requires a single parameter: marshalObject.atg.xml.service.ObjectMarshallerDispatcher,
ActionImpl,
SimpleSOAPClient| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
| Constructor and Description |
|---|
SendObjectAsXML() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(java.lang.Object pConfiguration)
Configures the action using the given configuration object, of
type SendObjectAsXMLConfiguration.
|
protected atg.apache.soap.rpc.Parameter |
createParameter(org.w3c.dom.Element pObjectAsXML)
Create the Parameter that will be used to invoke
the SOAP client.
|
protected void |
executeAction(ProcessExecutionContext pContext)
This method peforms the work for the action.
|
atg.xml.service.marshal.ObjectMarshallerDispatcher |
getMarshalService()
This service is used to marshal the supplied object parameter
into an XML document.
|
protected org.w3c.dom.Element |
getObjectAsXML(java.lang.Object pObjectToMarshal,
java.lang.Object pKey)
This method will obtain the XML representation
of the supplied object.
|
SimpleSOAPClient |
getSimpleSOAPClient()
This is the SOAP client that will be used to send the XML
document out via a SOAP call.
|
protected java.lang.String |
getSOAPParameterName()
Return the value of
SOAPConstants.SOAP_PARAMETER_NAME
This defaults to xmlDocument |
void |
initialize(java.util.Map pParameters)
The initialize method is used to initialize this
Scenario action before first time use.
|
void |
setMarshalService(atg.xml.service.marshal.ObjectMarshallerDispatcher pMarshalService)
Set the MarshalService property.
|
void |
setSimpleSOAPClient(SimpleSOAPClient pSimpleSOAPClient)
Set the SimpleSOAPClient property.
|
execute, execute, getActionName, getParameterExpression, getParameterValue, storeOptionalParameter, storeRequiredMutableParameter, storeRequiredParameter, toString, toStringpublic atg.xml.service.marshal.ObjectMarshallerDispatcher getMarshalService()
#initialize(Map)configure() method.public void setMarshalService(atg.xml.service.marshal.ObjectMarshallerDispatcher pMarshalService)
pMarshalService - the service marshal the objectpublic SimpleSOAPClient getSimpleSOAPClient()
#initialize(Map)configure() method.public void setSimpleSOAPClient(SimpleSOAPClient pSimpleSOAPClient)
configure method.pSimpleSOAPClient - the simple SOAP client to use to
send messagespublic void configure(java.lang.Object pConfiguration)
throws ProcessException
marshalObject.
configure in interface Actionconfigure in class ActionImplProcessException - if the action could not be configured
- for example, because some of the required properties are
missing from the configurationpublic void initialize(java.util.Map pParameters)
throws ProcessException
marshalObject parameter.
This key is handed to the ObjectMarshallerDispatcher class. This parameter
is optional.
initialize in interface Actioninitialize in class ActionImplpParameters - map of parameters that were handed to this scenarioProcessException - if an error occursExpressionprotected void executeAction(ProcessExecutionContext pContext) throws ProcessException
#getObjectAsXML(Object, Object)getObjectAsXML.
Once it has the XML representation, it will create a
SOAP parameter object by calling the createParameter
method. Finally, it will send the XML document out via a SOAP
request by calling the invoke method on the
class.executeAction in class ActionImplpContext - a ProcessExecutionContext valueProcessException - if an error occursprotected java.lang.String getSOAPParameterName()
SOAPConstants.SOAP_PARAMETER_NAME
This defaults to xmlDocumentprotected atg.apache.soap.rpc.Parameter createParameter(org.w3c.dom.Element pObjectAsXML)
atg.apache.soap.rpc.Parameter
class. The name used for the parameter is obtained via the
#getSOAPParameterNamegetSOAPParameterName
method.pObjectAsXML - the XML element that will be sent
via the SOAP request.protected org.w3c.dom.Element getObjectAsXML(java.lang.Object pObjectToMarshal,
java.lang.Object pKey)
throws ProcessException
ObjectMarshallerDispatcher
to marshal the object. To see how the
ObjectMarshallerDispatcher service gets configured,
consult the initialize
method.pObjectToMarshal - the object that will be marshalled to XMLpKey - the key that will be passed to the
ObjectMarshallerDispatcher serviceProcessException