|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.process.action.ActionImpl
atg.projects.b2bstore.soap.SendObjectAsXML
public class SendObjectAsXML
This action is used to send objects out via a SOAP RPC call.
In order to do this, two thing must happen. First, a supplied Object
parameter must be marshalled to XML. This marshalling is done by
a configured ObjectMarshallerDispatcher service. After the object
has been converted to an XML document, the document must be sent
out via a SOAP request. This is done by a SimpleSOAPClient. To
understand how these various methods are invoked, consult the
#executeAction(ProcessExecutionContext)
method.
This action requires a single parameter: marshalObject.
executeAction()
atg.xml.service.ObjectMarshallerDispatcher,
ActionImpl,
SimpleSOAPClient| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
|
| Constructor Summary | |
|---|---|
SendObjectAsXML()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class atg.process.action.ActionImpl |
|---|
execute, execute, getActionName, getParameterExpression, getParameterValue, storeOptionalParameter, storeRequiredMutableParameter, storeRequiredParameter, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String CLASS_VERSION
| Constructor Detail |
|---|
public SendObjectAsXML()
| Method Detail |
|---|
public 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 messages
public 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 configuration
public 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 scenario
ProcessException - if an error occursExpression
protected 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 value
ProcessException - if an error occursprotected java.lang.String getSOAPParameterName()
SOAPConstants.SOAP_PARAMETER_NAME
This defaults to xmlDocument
protected 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 service
ProcessException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||