Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsISOAPEncoding Interface Reference

This interface keeps track of the current encoding style and how objects should be encoded or decoded, as well as all associated encodings. More...

import "nsISOAPEncoding.idl";

Inheritance diagram for nsISOAPEncoding:
Inheritance graph
[legend]
Collaboration diagram for nsISOAPEncoding:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsISOAPEncoding getAssociatedEncoding (in AString aStyleURI, in boolean aCreateIf)
 Get an associated encoding for a different encoding style.
void setEncoder (in AString aKey, in nsISOAPEncoder aEncoder)
 Set an encoder in the encoding.
nsISOAPEncoder getEncoder (in AString aKey)
 Get an encoder from the encoding.
void setDecoder (in AString aKey, in nsISOAPDecoder aDecoder)
 Set a decoder in the encoding.
nsISOAPDecoder getDecoder (in AString aKey)
 Get a decoder from the encoding.
nsIDOMElement encode (in nsIVariant aSource, in AString aNamespaceURI, in AString aName, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments, in nsIDOMElement aDestination)
 Encode the source variant.
nsIVariant decode (in nsIDOMElement aSource, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments)
 Decode the source DOM node.
boolean mapSchemaURI (in AString aExternalURI, in AString aInternalURI, in boolean aOutput)
 Map an external schema URI to an internal one.
boolean unmapSchemaURI (in AString aExternalURI)
 Unmap an external schema URI as mapped by mapSchemaURI.
AString getInternalSchemaURI (in AString aExternalURI)
 Get an internal schema URI from an external one.
AString getExternalSchemaURI (in AString aInternalURI)
 Get an external schema URI from an internal one.

Public Attributes

readonly attribute AString styleURI
 The name of the encoding as it is known to SOAP.
attribute nsISOAPEncoder defaultEncoder
 The default encoder invoked by all encoding calls.
attribute nsISOAPDecoder defaultDecoder
 The default decoder invoked by all encoding calls.
attribute nsISchemaCollection schemaCollection
 The schema collection used by this and all associated encodings.

Detailed Description

This interface keeps track of the current encoding style and how objects should be encoded or decoded, as well as all associated encodings.

While two different nsSOAPCalls may have an encoding for the same styleURI, by default the encoding object and all associated encoding objects are local do not affect other calls because the encodings are local and not associated, unless the same or associated encodings are explicitly set on multiple calls. When a call is invoked, the same encoding object is automatically set on the response message so that decoders registered on the call encoding are automatically applied to the response.

Definition at line 100 of file nsISOAPEncoding.idl.


Member Function Documentation

nsIVariant nsISOAPEncoding::decode ( in nsIDOMElement  aSource,
in nsISchemaType  aSchemaType,
in nsISOAPAttachments  aAttachments 
)

Decode the source DOM node.

Parameters:
aEncodingsThe encodings used to decode
aEncodingStyleURIThe encoding style
aSourceThe DOM node to be decoded.
aSchemaTypeThe schema type of the source DOM node
aAttachmentsDispenses 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 nsISOAPEncoding::encode ( in nsIVariant  aSource,
in AString  aNamespaceURI,
in AString  aName,
in nsISchemaType  aSchemaType,
in nsISOAPAttachments  aAttachments,
in nsIDOMElement  aDestination 
)

Encode the source variant.

Parameters:
aEncodingsThe encodings to be used.
aEncodingStyleURIThe encoding style
aSourceThe variant to be encoded, soon to become a variant
aNamespaceURIThe namespace of the thing being coded
aNameThe name of the thing being coded
aSchemaTypeThe schema type of the thing being encoded
aDestinationThe node scope where the result will live.
aAttachmentsAccumulates any attachments.
Returns:
The element which was inserted and encoded.
nsISOAPEncoding nsISOAPEncoding::getAssociatedEncoding ( in AString  aStyleURI,
in boolean  aCreateIf 
)

Get an associated encoding for a different encoding style.

If there is no default associated encoding available for the specified encoding style, then if aCreateIf 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.

Parameters:
aStyleURIThe style URI of the associated encoding.
aCreateIfIf 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.

Get a decoder from the encoding.

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

Get an encoder from the encoding.

Parameters:
aKeyThe key to be used to look up the encoder.
Returns:
The encoder.
AString nsISOAPEncoding::getExternalSchemaURI ( in AString  aInternalURI)

Get an external schema URI from an internal one.

Parameters:
aExternalURIthe external URI which may have been mapped.
Returns:
The corresponding internal URI (the original is returned if it has not been mapped).
AString nsISOAPEncoding::getInternalSchemaURI ( in AString  aExternalURI)

Get an internal schema URI from an external one.

Parameters:
aExternalURIthe external URI which may have been mapped.
Returns:
The corresponding internal URI (the original is returned if it has not been mapped).
boolean nsISOAPEncoding::mapSchemaURI ( in AString  aExternalURI,
in AString  aInternalURI,
in boolean  aOutput 
)

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.

Parameters:
aExternalURIthe external URI to be mapped.
aInternalURIthe internal URI to be mapped.
aOutputIf 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 nsISOAPEncoding::setDecoder ( in AString  aKey,
in nsISOAPDecoder  aDecoder 
)

Set a decoder in the encoding.

Parameters:
aKeyThe key to be associated with the decoder.
aDecoderThe decoder to be specified or null to eliminate the decoder.
void nsISOAPEncoding::setEncoder ( in AString  aKey,
in nsISOAPEncoder  aEncoder 
)

Set an encoder in the encoding.

Parameters:
aKeyThe key to be associated with the encoder.
aEncoderThe encoder to be specified or null to eliminate the encoder.
boolean nsISOAPEncoding::unmapSchemaURI ( in AString  aExternalURI)

Unmap an external schema URI as mapped by mapSchemaURI.

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

Member Data Documentation

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.

Definition at line 179 of file nsISOAPEncoding.idl.

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.

Definition at line 171 of file nsISOAPEncoding.idl.

The schema collection used by this and all associated encodings.

Definition at line 184 of file nsISOAPEncoding.idl.

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

Definition at line 105 of file nsISOAPEncoding.idl.


The documentation for this interface was generated from the following file: