|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.BTTOperation
com.ibm.btt.base.BTTServerOperation
com.ibm.btt.base.ws.WSAccessOp
@ATTR(value={"wsConnectorAlias#String#REQUIRED","wsOperationName#String#REQUIRED","wsSuccessEvent#String#IMPLIED","wsFaultEvent#String#IMPLIED"}) public class WSAccessOp
This class provides access to a WebService from a Branch Transformation Toolkit application.
The module enables an application to invoke a specified WebService directly. To do this, the WSAccessOp obtains the alias of the service that will connect with the WebService, the input and output Formats, and the name of the WebService operation to be invoked.
Field Summary | |
---|---|
static java.lang.String |
EXIT_EVENT_NAME
|
protected java.lang.String |
wsConnectorAlias
The WSConnector alias retrieved from the externalized definition |
protected java.lang.String |
wsFaultEvent
The WS operation fault event retrieved from the externalized definition |
protected java.lang.String |
wsOperationName
The WS operation name retrieved from the externalized definition |
protected java.lang.String |
wsSuccessEvent
The WS operation success event retrieved from the externalized definition |
Fields inherited from class com.ibm.btt.base.BTTOperation |
---|
aOperationRepliedListener, COMPID, externalizer |
Constructor Summary | |
---|---|
WSAccessOp()
|
Method Summary | |
---|---|
void |
execute()
Executes the WebService operation associated with the operation using the protocol provided by the WSConnector service. |
protected java.lang.Class |
getClassObject(java.lang.Object dataElement)
Returns the primitive type of the boxed class like Boolean, Float |
protected java.lang.String |
getExitEventName()
Returns a String representing the exitEventName that will be sent to the automaton. |
java.lang.String |
getWsConnectorAlias()
Returns the wsConnectorAlias property. |
java.lang.String |
getWsFaultEvent()
|
java.util.List<WSMapperConverter> |
getWsInputMapFormats()
Returns all the input mapper format instances specified in the XML file with wsInputMapFmt name. |
java.lang.String |
getWsOperationName()
Returns the wsOperationName property. |
WSMapperConverter |
getWsOutputMapFormat()
Returns an instance of the mapper specified in the XML file with wsOutputMapFmt name. |
java.lang.String |
getWsSuccessEvent()
|
protected void |
handleWsAccessOpException(java.lang.Throwable e)
Handle all Exceptions occurred during web services invocation. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes an WSAccessOp object with the aTag attributes. |
protected void |
postExecution(WSMapperConverter outputMapper,
java.lang.Object ret)
Copy the return data of web service operation to context. |
protected void |
prepareExecution(java.util.List<WSMapperConverter> inputMappers,
java.lang.Class[] parameterClasses,
java.lang.Object[] parameters)
Prepare the parameters for the web services operation. |
void |
setWsConnectorAlias(java.lang.String newWsConnectorAlias)
Sets the wsConnectorAlias property. |
void |
setWsFaultEvent(java.lang.String wsFaultEvent)
|
void |
setWsOperationName(java.lang.String newWsOperationName)
Sets the wsOperationName property. |
void |
setWsSuccessEvent(java.lang.String wsSuccessEvent)
|
protected void |
signalReplyEvent(java.lang.String name,
java.lang.String value)
|
Vector |
toStrings()
Returns a Vector with the String representation of the object. |
Methods inherited from class com.ibm.btt.base.BTTServerOperation |
---|
createOperation, fireExitEvent, getCSReplyFormat, getCSRequestFormat, getOriginWorkstation, runInSession, setCSReplyFormat, setCSRequestFormat, setOriginWorkstation, updateContext, updateContext, validate, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.btt.base.Operation |
---|
addElement, addOperationRepliedListener, chainTo, close, getApplicationId, getContext, getContextName, getElementAt, getFormat, getFormats, getKeyedCollection, getName, getParent, getService, getType, getValueAt, isChained, prune, removeAt, removeOperationRepliedListener, setApplicationId, setContext, setContextName, setKeyedCollection, setName, setType, setValueAt, unchain, xValidate |
Methods inherited from interface com.ibm.btt.base.Cacheable |
---|
isCacheable, reinitialize |
Field Detail |
---|
protected java.lang.String wsConnectorAlias
protected java.lang.String wsOperationName
protected java.lang.String wsSuccessEvent
protected java.lang.String wsFaultEvent
public static final java.lang.String EXIT_EVENT_NAME
Constructor Detail |
---|
public WSAccessOp()
Method Detail |
---|
public void execute() throws java.lang.Exception
To perform this, this method obtains the input and output WSMapperConverters instances from the operation formats' Hashtable, the wsOperationName from the operation tag attributes, and the WSConnector instance service, searching by the alias name, in the operation context hierarchy. Once it obtains all of these, it passes the required parameters (input and output instances mappers, the name of the WebService operation to execute, and the operation context) to the WSConnector service instance. If an error occurs during this process, this method throws an exception.
execute
in interface Operation
execute
in class BTTServerOperation
java.lang.Exception
- An error occurs.protected void handleWsAccessOpException(java.lang.Throwable e) throws java.lang.Exception
java.lang.Exception
protected void prepareExecution(java.util.List<WSMapperConverter> inputMappers, java.lang.Class[] parameterClasses, java.lang.Object[] parameters) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException
DSEInvalidClassException
protected void postExecution(WSMapperConverter outputMapper, java.lang.Object ret) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInvalidClassException
java.lang.Exception
- An error occurs.
DSEInvalidRequestException
DSEInvalidArgumentException
DSEInvalidClassException
protected void signalReplyEvent(java.lang.String name, java.lang.String value)
protected java.lang.Class getClassObject(java.lang.Object dataElement) throws DSEInvalidArgumentException
DSEInvalidArgumentException
protected java.lang.String getExitEventName()
This method is called from the execute method before signaling the event of finalization of the operation. Applications that want to customize which event goes to be sent to the processor must overwrite this method. If this method is NOT overwritten, it will always return "ok".
Through the getContext() method, this method has access to the processor context and its hierarchy, which is updated at this stage with the results of the WebService operation execution.
public java.lang.String getWsConnectorAlias()
public java.util.List<WSMapperConverter> getWsInputMapFormats() throws DSEInvalidRequestException
DSEInvalidRequestException
public java.lang.String getWsOperationName()
public java.lang.String getWsSuccessEvent()
public void setWsSuccessEvent(java.lang.String wsSuccessEvent)
public java.lang.String getWsFaultEvent()
public void setWsFaultEvent(java.lang.String wsFaultEvent)
public WSMapperConverter getWsOutputMapFormat() throws DSEInvalidRequestException
DSEInvalidRequestException
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
initializeFrom
in class BTTOperation
aTag
- A Tag that contains the name and attributes of the object to
be created
java.io.IOException
DSEException
public void setWsConnectorAlias(java.lang.String newWsConnectorAlias)
newWsConnectorAlias
- java.lang.Stringpublic void setWsOperationName(java.lang.String newWsOperationName)
newWsOperationName
- java.lang.Stringpublic Vector toStrings()
toStrings
in class BTTOperation
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |