| java.lang.Object de.danet.an.workflow.clients.wfxml.AbstractResponseGenerator
All known Subclasses: de.danet.an.workflow.clients.wfxml.InstanceResponseGenerator, de.danet.an.workflow.clients.wfxml.ServiceRegistryResponseGenerator, de.danet.an.workflow.clients.wfxml.FactoryResponseGenerator, de.danet.an.workflow.clients.wfxml.ActivityResponseGenerator,
AbstractResponseGenerator | abstract class AbstractResponseGenerator (Code) | | This class provides the basic functionality of a SOAP based interface between
the workflow engine (i.e. its processes) and any SOAP based client.
author: Dirk Schnelle |
Method Summary | |
protected SOAPBodyElement | createAsapResponseNode(SOAPMessage respMsg, String nodeName) Convenience method to create response node for WfXML requests.
Parameters: respMsg - the repsonse message. Parameters: nodeName - name of the response node. | protected SOAPBodyElement | createWfxmlResponseNode(SOAPMessage respMsg, String nodeName) Convenience method to create response node for WfXML requests.
Parameters: respMsg - the response message. Parameters: nodeName - name of the response node. | abstract public void | evaluate(SOAPMessage reqMsg, SOAPMessage respMsg) Handles the given request. | void | fillResponseHeader(SOAPMessage reqMsg, SOAPMessage respMsg) Fills the response header. | protected SOAPElement | findChildNode(SOAPElement element, String key) Tries to find a child node with the given name. | protected SOAPBodyElement | getActionElement(SOAPMessage request) Retrieves the first element of the given request body that contains the
requested action to perform. | protected String | getChildTextContent(SOAPMessage message, SOAPElement element, String prefix, String name) Retrieves the text content of the child node with the specified name.
Parameters: message - the message to inspect. Parameters: element - the parent node. Parameters: prefix - prefix of the searched child node. Parameters: name - name of the searched child node. | protected String | getChildsTextContent(SOAPElement element, String key) Retrieves the contents of the child node with the given name as text.
Parameters: element - the parent node. | protected String | getHeaderValue(SOAPMessage message, String key) Retrieves the ASAP key from the header of the message.
Parameters: message - the message to inspect. Parameters: key - the key to find. | protected ObserverRegistry | getObserverRegistry() Retrieves the observer registry. | abstract protected String | getResourceName() Retrieves the name of this resource. | public ResourceReference | getResourceReference() | public WorkflowService | getWorkflowService() | protected SOAPElement | importAsChild(SOAPElement parent, SOAPElement imported) Imports a SOAP node as a child of another node in another document.
Note that this might be not namespace aware. | protected static void | importSAXAsChild(SOAPMessage message, SOAPElement parent, SAXEventBuffer sax) Append the given SAX event buffer as a child to the parent SOAP element.
Parameters: message - the message containing the parent Parameters: parent - the parent SOAP element Parameters: sax - the sax buffer to import. | protected static SOAPElement | importW3CNodeAsChild(SOAPElement parent, org.w3c.dom.Node imported) Imports a SOAP node as a child of another node in another document.
Note that this might be not namespace aware. | protected void | maybeAddTextNode(SOAPElement element, String text) Adds the text as a child node, if it is neither null nor
empty. | protected byte[] | nodeToBytes(SOAPElement node) Creates a byte array representation for the given SOAP element. |
RESOURCE_ACTIVITY | final public static String RESOURCE_ACTIVITY(Code) | | |
RESOURCE_FACTORY | final public static String RESOURCE_FACTORY(Code) | | |
RESOURCE_INSTANCE | final public static String RESOURCE_INSTANCE(Code) | | |
RESOURCE_SERVICE_REGISTRY | final public static String RESOURCE_SERVICE_REGISTRY(Code) | | |
AbstractResponseGenerator | public AbstractResponseGenerator(ObserverRegistry observerRegistry, WorkflowService wfs, ResourceReference resRef)(Code) | | Constructs a new object.
Parameters: observerRegistry - the observer registry Parameters: wfs - Reference to the workflow engine. Parameters: resRef - the resource reference. |
createAsapResponseNode | protected SOAPBodyElement createAsapResponseNode(SOAPMessage respMsg, String nodeName) throws SOAPException(Code) | | Convenience method to create response node for WfXML requests.
Parameters: respMsg - the repsonse message. Parameters: nodeName - name of the response node. created response node. throws: SOAPException - error creating the SOAP nodes. |
createWfxmlResponseNode | protected SOAPBodyElement createWfxmlResponseNode(SOAPMessage respMsg, String nodeName) throws SOAPException(Code) | | Convenience method to create response node for WfXML requests.
Parameters: respMsg - the response message. Parameters: nodeName - name of the response node. created response node. throws: SOAPException - error creating the SOAP nodes. |
fillResponseHeader | void fillResponseHeader(SOAPMessage reqMsg, SOAPMessage respMsg) throws SOAPException(Code) | | Fills the response header.
Parameters: reqMsg - the request message. Parameters: respMsg - the response message. exception: SOAPException - Error in the SOAP message. |
findChildNode | protected SOAPElement findChildNode(SOAPElement element, String key)(Code) | | Tries to find a child node with the given name. If there is such a child
node, the first child is returned.
Parameters: element - the parent element Parameters: key - the name of the tag to find first child, if the tag could be found, null else. |
getActionElement | protected SOAPBodyElement getActionElement(SOAPMessage request) throws SOAPException(Code) | | Retrieves the first element of the given request body that contains the
requested action to perform. It is guaranteed that the element has the
correct namespace.
Parameters: request - the current request. action element throws: SOAPException - error evaluating the request. |
getChildTextContent | protected String getChildTextContent(SOAPMessage message, SOAPElement element, String prefix, String name) throws SOAPException(Code) | | Retrieves the text content of the child node with the specified name.
Parameters: message - the message to inspect. Parameters: element - the parent node. Parameters: prefix - prefix of the searched child node. Parameters: name - name of the searched child node. text content, or null if there is no such child node. throws: SOAPException - error inspecting the SOAP message. |
getChildsTextContent | protected String getChildsTextContent(SOAPElement element, String key)(Code) | | Retrieves the contents of the child node with the given name as text.
Parameters: element - the parent node. Parameters: key - name of the child node. Contents of the child node, or null , if thekey is no child of element. |
getHeaderValue | protected String getHeaderValue(SOAPMessage message, String key) throws SOAPException(Code) | | Retrieves the ASAP key from the header of the message.
Parameters: message - the message to inspect. Parameters: key - the key to find. value for the key , null if the keycould not be found. throws: SOAPException - error inspecting the SOAP message. |
getObserverRegistry | protected ObserverRegistry getObserverRegistry()(Code) | | Retrieves the observer registry.
the observer registry. |
getResourceName | abstract protected String getResourceName()(Code) | | Retrieves the name of this resource.
Name of the sender instance. |
importAsChild | protected SOAPElement importAsChild(SOAPElement parent, SOAPElement imported) throws SOAPException(Code) | | Imports a SOAP node as a child of another node in another document.
Note that this might be not namespace aware. make sure to have all
namespaces resolved before calling this method.
Parameters: parent - the parent node Parameters: imported - the node to import the imported node throws: SOAPException - error navigating through the SOAP stack. |
importSAXAsChild | protected static void importSAXAsChild(SOAPMessage message, SOAPElement parent, SAXEventBuffer sax) throws SOAPException(Code) | | Append the given SAX event buffer as a child to the parent SOAP element.
Parameters: message - the message containing the parent Parameters: parent - the parent SOAP element Parameters: sax - the sax buffer to import. throws: TransformerException - throws: SOAPException - Error in the SOAP message. |
importW3CNodeAsChild | protected static SOAPElement importW3CNodeAsChild(SOAPElement parent, org.w3c.dom.Node imported) throws SOAPException(Code) | | Imports a SOAP node as a child of another node in another document.
Note that this might be not namespace aware. make sure to have all
namespaces resolved before calling this method.
Parameters: parent - the parent node Parameters: imported - the node to import the imported node throws: SOAPException - error navigating through the SOAP stack. |
maybeAddTextNode | protected void maybeAddTextNode(SOAPElement element, String text) throws SOAPException(Code) | | Adds the text as a child node, if it is neither null nor
empty.
Parameters: element - the parent node. Parameters: text - the text to add. throws: SOAPException - error appending the text node. |
nodeToBytes | protected byte[] nodeToBytes(SOAPElement node) throws TransformerException(Code) | | Creates a byte array representation for the given SOAP element.
Parameters: node - the node to transform bytes for the given SOAP element. throws: TransformerException - error transforming the node into a string. |
|
|