nsISOAPEncoding

IID:9ae49600-1dd1-11b2-877f-e62f620c5e92
Inherits From:nsISupports

This interface is implemented by the following components:


Properties

nsISOAPDecoder defaultDecoder

The default decoder invoked by all encoding calls. Appropriate calls to more-specific decoders, if any, must be dispatched by this default decoder. The default decoder typically looks up encoders by known information such as explicit or implicit types.

nsISOAPEncoder defaultEncoder

The default encoder invoked by all encoding calls. Appropriate calls to more-specific encoders, if any, must be dispatched by this default encoder. The default encoder typically looks up encoders by known information such as explicit or implicit types.

nsISchemaCollection schemaCollection

The schema collection used by this and all associated encodings.

readonly AString styleURI

The name of the encoding as it is known to SOAP.


Methods

nsIVariant decode ( nsIDOMElement source , nsISchemaType schemaType , nsISOAPAttachments attachments ) nsIDOMElement encode ( nsIVariant source , AString namespaceURI , AString name , nsISchemaType schemaType , nsISOAPAttachments attachments , nsIDOMElement destination ) nsISOAPEncoding getAssociatedEncoding ( AString styleURI , PRBool createIf ) nsISOAPDecoder getDecoder ( AString key ) nsISOAPEncoder getEncoder ( AString key ) AString getExternalSchemaURI ( AString internalURI ) AString getInternalSchemaURI ( AString externalURI ) PRBool mapSchemaURI ( AString externalURI , AString internalURI , PRBool output ) void setDecoder ( AString key , nsISOAPDecoder decoder ) void setEncoder ( AString key , nsISOAPEncoder encoder ) PRBool unmapSchemaURI ( AString externalURI )

nsIVariant decode ( nsIDOMElement source , nsISchemaType schemaType , nsISOAPAttachments attachments )

Decode the source DOM node

Arguments:
source: The DOM node to be decoded.
schemaType: The schema type of the source DOM node
attachments: Dispenses any attachments.
Returns:
The decoded variant, soon to become a variant, which is null if the operation failed or did not return a result.

nsIDOMElement encode ( nsIVariant source , AString namespaceURI , AString name , nsISchemaType schemaType , nsISOAPAttachments attachments , nsIDOMElement destination )

Encode the source variant

Arguments:
source: The variant to be encoded, soon to become a variant
namespaceURI: The namespace of the thing being coded
name: The name of the thing being coded
schemaType: The schema type of the thing being encoded
attachments: Accumulates any attachments.
destination: The node scope where the result will live.
Returns:
The element which was inserted and encoded.

nsISOAPEncoding getAssociatedEncoding ( AString styleURI , PRBool createIf )

Get an associated encoding for a different encoding style. If there is no default associated encoding available for the specified encoding style, then if createIf is specified, one is created, otherwise a null is returned. Associated encodings are the set of encodings that may be used and modified together as a set.

Arguments:
styleURI: The style URI of the associated encoding.
createIf: If true, then create the associated encoding if it does not already exist, otherwise return the existing encoding.
Returns:
The associated encoding which corresponds to the specified styleURI, or null if the spefied alternative encoding does not exist and it was not requested that it be created.

nsISOAPDecoder getDecoder ( AString key )

Get a decoder from the encoding.

Arguments:
key: The key to be used to look up the decoder.
Returns:
The decoder.

nsISOAPEncoder getEncoder ( AString key )

Get an encoder from the encoding.

Arguments:
key: The key to be used to look up the encoder.
Returns:
The encoder.

AString getExternalSchemaURI ( AString internalURI )

Get an external schema URI from an internal one.

Arguments:
internalURI
Returns:
The corresponding internal URI (the original is returned if it has not been mapped).

AString getInternalSchemaURI ( AString externalURI )

Get an internal schema URI from an external one.

Arguments:
externalURI: the external URI which may have been mapped.
Returns:
The corresponding internal URI (the original is returned if it has not been mapped).

PRBool mapSchemaURI ( AString externalURI , AString internalURI , PRBool output )

Map an external schema URI to an internal one. In an ideal world, we don't need this, but schemas change URIs, and we wind up with inconsistencies between WSDL and exchanged documents. The external URI must not be currently mapped and if output mapping is true, then the internal URI must be unique for output mapping.

Arguments:
externalURI: the external URI to be mapped.
internalURI: the internal URI to be mapped.
output: If true, then re-map to the output URI when outputting.
Returns:
boolean true if succeeded, false if the mapping was not unique as required.

void setDecoder ( AString key , nsISOAPDecoder decoder )

Set a decoder in the encoding.

Arguments:
key: The key to be associated with the decoder.
decoder: The decoder to be specified or null to eliminate the decoder.

void setEncoder ( AString key , nsISOAPEncoder encoder )

Set an encoder in the encoding.

Arguments:
key: The key to be associated with the encoder.
encoder: The encoder to be specified or null to eliminate the encoder.

PRBool unmapSchemaURI ( AString externalURI )

Unmap an external schema URI as mapped by mapSchemaURI.

Arguments:
externalURI: the external URI to be mapped.
Returns:
boolean true if succeeded, false if the mapping did not exist.

References

This interface is the type of the following properties:

nsISOAPBlock.encoding, nsISOAPMessage.encoding

This interface is passed as an argument to the following methods:

nsISOAPDecoder.decode, nsISOAPEncoder.encode

This interface is returned from the following methods:

nsISOAPEncoding.getAssociatedEncoding, nsISOAPEncodingRegistry.getAssociatedEncoding

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com