command is used to facilitate networked communication by means of
message objects are also useful to parse other styles of
-formatted messages which are not really
, for example
SOAP objects are created like other Cactvs objects, and have internal state, so it is possible to communicate with multiple sources simultaneously by creating a SOAP object for every channel.
SOAP objects share many characteristics with JSON objects, and many commands are identical or at least very similar.
These are the currently supported
This is a variant of the
command. The difference is that the supplied data is appended to the current attribute value instead of replacing it. In case appending is not a possible operation, the result is the same as using
Create a new
object. The return value is the new object handle or reference. If no extra attributes are specified, an empty object with default settings is created. Processing of specified optional attribute/value pairs is performed in as an identical fashion to the
Send a properly formatted
error message over a
channel to a client, or at least prepare it. If any of the optional arguments behind the channel argument are provided, they are processed like equivalent
commands and change the internal attributes of the object.
In the generated message, the message, code and factor values are wrapped into XML tags of type faultstring , faultcode and faultfactor , respectively. Usually, the factor value should be set to the URI of the service, which could be stored in the uri attribute of the SOAP object. This core information is then embedded into a standard SOAP fault envelope. If no channel argument or an empty string is specified, and the internal channel of the SOAP object is undefined, no data is transmitted over the channel, but the message is still formatted. If a valid channel was specified, or the SOAP object has a valid internal channel, the message is immediately transmitted.
The return value of the command is the complete SOAP error message, with header and body. The internal header and body fields of the SOAP object are also updated and allow subsequent individual retrieval of these components.
Find the contents and/or attributes of specific
tags in a message. The generation of a parse tree (see
command) is a prerequisite for this function. If a parse tree does not yet exist, but the
object has body data, an attempt is automatically made to execute a parse of the full message body data.
The default output selection is just chardata . If multiple content flags are selected, the order of the elements in an item output list is tag , attributes , chardata and finally children . If a query fails to yield any results, an empty string is returned. In reporting mode all , the item output lists are themselves list elements of the overall result list.
message stored in the
attribute of the object and create the parse tree which is the prerequisite for retrieval of message content via the
command. If a data argument is supplied, it replaces the
data of the object.
By default, or when the start tag argument is set to an empty string (or
), the complete message is parsed. Optionally, processing can be limited to a subsection of the full data that starts with the specified tag. In that case, only the content between the selected opening and closing tags matching the supplied start tag is analyzed, and the argument replaces the
attribute of the
object. By default the first start tag match is used, but this can be changed with the next optional argument.
In case of multiple tags with the same name in the parsed data, an additional class attribute can be specified as a second element. If this optional filtering argument is used, the first tag block matching both the tag name and having a matching class attribute is extracted and parsed. If the class argument is omitted, or empty, no class filtering is performed. Instead of a class name, it is also possible to specify an integer instance index in the same argument position. By default, the first occurrence of the start tag (index 0) is parsed, but by specifying a different start tag index, a different tag instance may be selected.
Read a message with a HTTP header from a channel. If the channel argument is not supplied, the internally configured SOAP object channel is used. The internal header and body attributes of the object are updated when the read succeeds. Note that this command works with any communication which uses a HTTP header and body data. It is not limited to reading SOAP messages, or even plain XML data.
Pretty-print an XML blob, with properly indented nested tags for easy visual inspection. If no explicit string is specified, the current body attribute value of the soap object is used. The return value of the command is the reformatted content. The original data is not changed.
handler on a remote server, or at least prepare the message content to do that. If any of the optional arguments with the exception of the
argument are provided, they are processed like
commands and change the internal attributes of the object. If the
argument is not supplied, and the
object has no configured
attribute, a default
to be used as part of the
instruction in the header is constructed from the
is not directly used to open a communication channel, though - the
transmission channel can have been opened by any suitable means.
If the channel argument is not supplied, or written as an empty string, and the object has no valid internal handle, the message is just assembled. Otherwise, it is transmitted directly. Using an explicit channel argument does not update the internal channel attribute of the object.
The return value of the command is the assembled SOAP request message, with header and body. The internal header and body fields of the SOAP object are also updated and allow subsequent individual retrievals of these components.
Send a properly formatted
response message over a
channel to a client, usually as a response after receiving a
request message from that client. If any of the optional arguments behind
are provided, they are processed like
commands and change the internal attributes of the object
In the generated message, the responsedata value is wrapped into an XML tag of type < methodResponse >, where method is replaced by the name of the configured SOAP method. This core information is then embedded into a standard SOAP envelope and transmitted over the channel. If no channel argument is given, and the internal channel of the SOAP object is undefined, the message is just formatted, but not transmitted.
The return value of the command is the complete SOAP message, with header and body. The internal header and body fields of the SOAP object are also updated and allow subsequent individual retrievals of these components.
Set one or more attributes of a
object. Since this paragraph is also referenced from the
subcommand, the attribute set listed here includes attributes which cannot be set, or for which setting them to any scripted value does not usually make sense.
Nonein Python ), which indicates that no channel is set.
soap parsecommand. This is a read-only attribute, and primarily useful for debugging.