public class WSWithComplexTypes extends TypedAtomicActor
This actor executes SOAP web services defined by WSDLs. Given a web service's URL of a WSDL and an operation name, this actor specializes its input and output ports to reflect the input and output parameters of the operation. For simple web service types, e.g. string, int, or double, this actor's ports are configured to the matching ptolemy type. Otherwise, the ports are set to XMLTOKEN. When this actor fires, it reads each input port, invokes the web service operation and sends the input data, and outputs the response to the output ports.
The inputMechanism and outputMechanism parameters control the creation of helper actors for complex/nested web service types. (These parameters have no effect for simple web service types). By setting either to 'composite', a composite actor is created for each parameter that is complex/nested. Each composite actor is populated with necessary XML Assembler or XML Disassembler actors needed to build the nested web service type, and the composite actor ports are all simple ptolemy types. Changing the mechanism back to 'simple' deletes the connected helper actors. If you have made changes to the composite actors and don't want them lost, disconnect them from this actor before changing the mechanism to 'simple'.
Limitations:
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
TypedIOPort |
hadError
Outputs true if error was ignored invoking method.
|
Parameter |
ignoreInvokeErrors
If true, will not throw exception if error occurs invoking method.
|
StringParameter |
inputMechanism
Setting to composite creates XML assembler and disassembler actors for
complex (nested) parameters.
|
StringParameter |
method
The web service method name to run.
|
StringParameter |
outputMechanism
Setting to composite creates XML assembler and disassembler actors for
complex (nested) parameters.
|
Parameter |
outputNil
If true, then each output port whose name is not a child element of the
incoming XML document outputs a nil token.
|
StringParameter |
password
The password for authentication.
|
StringParameter |
timeout
The timeout in milliseconds used by transport sender.
|
StringParameter |
username
The user name for authentication.
|
PortParameter |
wsdl
The web service WSDL address.
|
_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 |
---|
WSWithComplexTypes(CompositeEntity container,
java.lang.String name)
Construct a WSWithComplexTypes source with the given container and name.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
void |
fire()
Create and send the request, and send the response to the appropriate
output ports.
|
boolean |
postfire()
Returns false unless there are connected input ports.
|
void |
preinitialize()
Initialize the actor by getting the input and output parameters from the
soap service.
|
_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, prefire, 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, prefire, stop, stopFire, terminate
addInitializable, initialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public PortParameter wsdl
public StringParameter method
public StringParameter inputMechanism
public StringParameter outputMechanism
public Parameter outputNil
public StringParameter username
public StringParameter password
public StringParameter timeout
public Parameter ignoreInvokeErrors
public TypedIOPort hadError
public WSWithComplexTypes(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
name
- The name of this actor.IllegalActionException
- If the entity cannot be contained by the proposed
container.NameDuplicationException
- If the container already has an actor with this name.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The changed parameter.IllegalActionException
- If the parameter set is not valid.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.