nsISOAPBlock

IID:843afaa8-1dd2-11b2-8b0d-9b5d16fe64ea
Inherits From:nsISupports

This interface encapsulates an arbitrary block to be used by the soap serialization or protocol. It presents the namespaceURI, name, encoding, schemaType, and value of the block. There are two different ways this may be used:

1. When created by a user for serialization, a value is set which is then used to encode the message. In this case, the user sets the value (or element in the case of a literal block) which is then encoded (unless it is the element) and incorporated into the document as it is encoded.

2. When requested by the user from a message that is to be decoded. In this case, an element is set on the block which is automatically decoded whenever the value attribute is accessed (possibly after the user sets the encoding or schemaType, or for literal blocks, the user just accesses the element and no decoding is performed. For SOAP which attachments, hidden attachments may also be associated from the message to the block so that later decoding which relies on the attachments is possible.

This interface is implemented by the following components:


Properties

nsIDOMElement element

The element which is the encoded value of this block. If this is set, value, namespaceURI, and name becomes a computed attributes which are produced by decoding this element.

nsISOAPEncoding encoding

The encoding that was / will be applied to the block. If this is blank and element is non-null, it becomes impossible to decode the block when the value is requested.

AString name

The name of the block. If the block is left unnamed, it will be encoded using the element types defined in the SOAP-ENC schema. For example, <SOAP-ENC:int>45</SOAP-ENC:int> . If this is modified, element is set to null and all attributes computed from element revert to previous uncomputed values. If element is set, this becomes computed.

AString namespaceURI

The namespace URI of the block. Ignored if name is null. If this is modified, element is set to null and all attributes computed from element revert to previous uncomputed values. If element is set, this becomes computed.

nsISchemaType schemaType

The schema type used to encode or decode the block. If this is null, then the default encoder or decoder may

nsIVariant value

The native value which is the decoded value of this block. If this is modified, element is set to null and all attributes computed from element revert to previous uncomputed values. If element is set, this becomes computed, relying on the value of encoding and schemaType each time it is computed.


Methods

void init ( nsISOAPAttachments attachments , PRUint16 version )

void init ( nsISOAPAttachments attachments , PRUint16 version )

Initialize the block for additional decoding information.

Arguments:
attachments: Attachments in case this refers to them.
version: SOAP version for decoding special header attributes.

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com