public class MessageBasedWebService extends TypedAtomicActor
WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure- oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). WSDL is extensible to allow description of endpoints and their messages regardless of what message formats or network protocols are used to communicate. More information on WSDL and realted standard can be found at: http://www.w3.org/TR/wsdl
The user can instantiate the generic web service actor by providing the WSDL URL and choosing the desired web service operation. The actor then a utomatically specializes itself and adds ports with the inputs and outputs as described by the WSDL. The so instantiated actor acts as a proxy for the web service being executed and links to the other actors through its ports.
The WSDL is parsed to get the input, output and binding information. It dynamically generates ports for each input and output of the operation. This customization happens at the configuration time of a model. When the actor is fired at run time, it gets the binding information and creates a call object to run the model. Using this call object, it invokes the web service and broadcasts the response to the output ports. The above MessageBasedWebService actor expects XMLTokens as input and broadcasts XMLTokens as well.
Notices to users:
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
TypedIOPort |
clientExecErrors
Deprecated.
It outputs the errors if any occured when actor is executing.
|
Parameter |
hasTrigger
Deprecated.
This is an parameter to activate the optional startTrigger port.
|
SingletonParameter |
hide
Deprecated.
|
StringParameter |
methodName
Deprecated.
The parameter for the method name.
|
StringParameter |
password
Deprecated.
The password to invoke the web service if necessary.
|
TypedIOPort |
startTrigger
Deprecated.
This is an optional input port that can be used to help the scheduling of
the actor.
|
StringParameter |
userName
Deprecated.
The userName to invoke the web service if necessary.
|
StringParameter |
wsdlUrl
Deprecated.
The parameter for the URL of the web service WSDL.
|
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
MessageBasedWebService(CompositeEntity container,
java.lang.String name)
Deprecated.
Construct a WebService actor with the given container and name.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute at)
Deprecated.
Callback for changes in attribute values Get the WSDL from the given URL.
|
void |
configureActor()
Deprecated.
Configure the actor for the entered operation of the given web service.
|
void |
configureOperationNames()
Deprecated.
Configure the actor for the entered operation of the given web service.
|
void |
createPorts(org.apache.axis.wsdl.symbolTable.Parameters params)
Deprecated.
Creates ports for the web service operation
|
void |
deletePorts()
Deprecated.
Deletes all the ports of this actor.
|
void |
fire()
Deprecated.
Get the URL address of the the location of the web service defined by the
given WSDL.
|
void |
getServiceBinding()
Deprecated.
Configure the service, port and binding info.
|
boolean |
prefire()
Deprecated.
Pre fire the actor.
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, stop, stopFire, terminate
addInitializable, initialize, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public StringParameter wsdlUrl
public StringParameter methodName
public StringParameter userName
public StringParameter password
public Parameter hasTrigger
public TypedIOPort startTrigger
This port is activated by the hasTrigger parameter. Double-click on the actor to enable. Please enable it ONLY when the actor has no input and it is required for scheduling of the actor.
public TypedIOPort clientExecErrors
public SingletonParameter hide
public MessageBasedWebService(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container
- The container.name
- The name of this actor.IllegalActionException
- If the actor cannot be contained by the proposed
container.NameDuplicationException
- If the container already has actor with this name.public void attributeChanged(Attribute at) throws IllegalActionException
attributeChanged
in class NamedObj
at
- The attribute that changed.IllegalActionException
public void configureOperationNames()
public void configureActor()
public void createPorts(org.apache.axis.wsdl.symbolTable.Parameters params)
public void deletePorts()
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- If there is no director.public void getServiceBinding()
public boolean prefire() throws IllegalActionException
prefire
in interface Executable
prefire
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.