Back to index

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

This interface is a convenience extension of the basic SOAP message, which handles common patterns of calling, such as providing an action URI in the HTTP header, locating and invoking the appropriate transport based upon the protocol of the transportURI, and automatically recieving the result in a new nsISOAPResponse object which recieves an XML message. More...

import "nsISOAPCall.idl";

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

List of all members.

Public Member Functions

nsISOAPResponse invoke ()
 Synchronously invoke the call.
nsISOAPCallCompletion asyncInvoke (in nsISOAPResponseListener aListener)
 Asynchronously invoke the call.
void encode (in unsigned short aVersion, in AString aMethodName, in AString aTargetObjectURI, in unsigned long aHeaderBlockCount,[array, size_is(aHeaderBlockCount)] in nsISOAPHeaderBlock aHeaderBlocks, in unsigned long aParameterCount,[array, size_is(aParameterCount)] in nsISOAPParameter aParameters)
 Encodes the specified parameters into this message, if this message type supports it.
void getHeaderBlocks (out unsigned long aCount,[array, size_is(aCount), retval] out nsISOAPHeaderBlock aHeaderBlocks)
 Gathers the header blocks of a message so that they can be accessed by a recipient.
void getParameters (in boolean aDocumentStyle, out unsigned long aCount,[array, size_is(aCount), retval] out nsISOAPParameter aParameters)
 Gathers the parameters of a message so that they can be accessed by a recipient.

Public Attributes

attribute AString transportURI
 The URI to which the message will be sent, identifying the transport and transport-specific information about the destination.
attribute boolean verifySourceHeader
 Enables alternative security model which may be available from participating services.
const unsigned short VERSION_1_1 = 0
const unsigned short VERSION_1_2 = 1
const unsigned short VERSION_UNKNOWN = 0xFFFF
attribute nsIDOMDocument message
 The document which captures the message, if any.
readonly attribute nsIDOMElement envelope
 A convenience attribute to obtain the DOM element representing the SOAP envelope from the document.
readonly attribute unsigned short version
 A convenience attribute to obtain the SOAP version number, if it is known, from the envelope.
readonly attribute nsIDOMElement header
 A convenience attribute to obtain the DOM element representing the SOAP header from the envelope.
readonly attribute nsIDOMElement body
 A convenience attribute to obtain the DOM element representing the SOAP body from the envelope.
readonly attribute AString methodName
 The name of the method being invoked.
readonly attribute AString targetObjectURI
 The target object on which the method is being invoked.
attribute nsISOAPEncoding encoding
 The primary encoding of the message, which is established at the envelope and used unless overridden.
attribute AString actionURI
 An optional URI that can be used to add a SOAPAction HTTP header field.

Detailed Description

This interface is a convenience extension of the basic SOAP message, which handles common patterns of calling, such as providing an action URI in the HTTP header, locating and invoking the appropriate transport based upon the protocol of the transportURI, and automatically recieving the result in a new nsISOAPResponse object which recieves an XML message.

Definition at line 55 of file nsISOAPCall.idl.


Member Function Documentation

Asynchronously invoke the call.

At this point, the document rooted by the Envelope element is encoded to form the body of the SOAP message. The method returns immediately, and the listener is invoked when we eventually receive a response (or error or successful completion). The transportURI must have been set, the parameter list (even if empty) must have been encoded, and the transportURI must use some known protocol.

If not, an error is returned in the status of the response.

Parameters:
aListenerHandler to be invoked asynchronously after the response is recieved. Should be null if no response is expected.
void nsISOAPMessage::encode ( in unsigned short  aVersion,
in AString  aMethodName,
in AString  aTargetObjectURI,
in unsigned long  aHeaderBlockCount,
[array, size_is(aHeaderBlockCount)] in nsISOAPHeaderBlock  aHeaderBlocks,
in unsigned long  aParameterCount,
[array, size_is(aParameterCount)] in nsISOAPParameter  aParameters 
) [inherited]

Encodes the specified parameters into this message, if this message type supports it.

Parameters:
aMethodNameThe name of the method being invoked for rpc-style messages. For document-style messages, this must be null.
aTargetObjectURIThe name of the target object for rpc-style messages. For document-style messages, this must be null.
aHeaderBlockCountNumber of header blocks in array to be encoded. Must be 0 if header block array is null.
aHeaderBlocksArray of header blocks to be encoded, which may be null if there are no header blocks.
aParameterCountNumber of parameters in array to be encoded. Must be 0 if parameter array is null.
aParametersAn array of parameters to be encoded, which may null if there are no parameters.
void nsISOAPMessage::getHeaderBlocks ( out unsigned long  aCount,
[array, size_is(aCount), retval] out nsISOAPHeaderBlock  aHeaderBlocks 
) [inherited]

Gathers the header blocks of a message so that they can be accessed by a recipient.

Parameters:
aCountInteger to receive the length of the list of header blocks.
Returns:
Array of header blocks found in the message.
void nsISOAPMessage::getParameters ( in boolean  aDocumentStyle,
out unsigned long  aCount,
[array, size_is(aCount), retval] out nsISOAPParameter  aParameters 
) [inherited]

Gathers the parameters of a message so that they can be accessed by a recipient.

Parameters:
aDocumentStyleIf true, then the parameters are looked for treating the message as a document style message, otherwise it treated as an RPC-style message.
aCountInteger to receive the length of the list of parameters.
Returns:
Array of parameters found in the message.

Synchronously invoke the call.

The method returns only when we receive a response (or an error occurs). The transportURI must have been set, the parameter list (even if empty) must have been encoded, and the transportURI must use some known protocol. A synchronous call assumes that there will be exactly one response per call.

If not, an error is returned in the status of the response.

Returns:
The SOAP response

Member Data Documentation

attribute AString nsISOAPMessage::actionURI [inherited]

An optional URI that can be used to add a SOAPAction HTTP header field.

If this attribute is NULL (the default case), no SOAPAction header will be added.

Definition at line 229 of file nsISOAPMessage.idl.

A convenience attribute to obtain the DOM element representing the SOAP body from the envelope.

DOM methods may be used to access, add, or modify attributes or elements of the body.

If the envelope attribute is null or does not contain a SOAP body element type, then this will be null.

Definition at line 118 of file nsISOAPMessage.idl.

The primary encoding of the message, which is established at the envelope and used unless overridden.

By default, this is the SOAP encoding, which may be locally modified or used to obtain alternative encodings, which may be locally modified, but it may be set to an encoding that is shared, or it may be set to null, in which case all non-literal header blocks and parameters must specify an encoding.

Definition at line 222 of file nsISOAPMessage.idl.

A convenience attribute to obtain the DOM element representing the SOAP envelope from the document.

DOM methods may be used to access, add, or modify attributes of the envelope.

If the message attribute is null or is not a document containing a root soap envelope element, then this will be null.

Definition at line 89 of file nsISOAPMessage.idl.

A convenience attribute to obtain the DOM element representing the SOAP header from the envelope.

DOM methods may be used to access, add, or modify attributes or elements of the header.

If the envelope attribute is null or does not contain a SOAP header element type, then this will be null.

Definition at line 108 of file nsISOAPMessage.idl.

The document which captures the message, if any.

A simple sending application passes parameters to the method encodeSOAPParameters, which calls SOAP encoders to construct this document along with all contained elements.

But an application may create and set the message directly instead of invoking encodeSOAPParameters to use encoders or access and manipulate the message after it has been constructed by encodeSOAPParameters. If the message has not been set, invoking a call will fail. A message reciever may also use this accessor to get the document to avoid using decoders.

Definition at line 79 of file nsISOAPMessage.idl.

readonly attribute AString nsISOAPMessage::methodName [inherited]

The name of the method being invoked.

The methodName is set during encoding as the tagname of the single child of body of RPC-style messages. When there is no encoded message this will be null. The value of this attribute for document-style messages may be non-null but should be ignored. It is up to the application to know whether the message is RPC-style or document style because the SOAP specification makes it difficult to tell which way a message was encoded.

Definition at line 131 of file nsISOAPMessage.idl.

readonly attribute AString nsISOAPMessage::targetObjectURI [inherited]

The target object on which the method is being invoked.

This URI is set during encoding as the namespace to qualify the tagname of the single child of body of RPC-style messages. When there is no encoded message, this will be null. The value of this attribute for document-style messages may be non-null but should be ignored. It is up to the application to know whether the message is RPC-style or document style because the SOAP specification makes it difficult to tell which way a message was encoded.

Definition at line 144 of file nsISOAPMessage.idl.

The URI to which the message will be sent, identifying the transport and transport-specific information about the destination.

This does not have to match the targetObjectURI.

Definition at line 63 of file nsISOAPCall.idl.

Enables alternative security model which may be available from participating services.

Securely adds a "verifySource" header to the outgoing message with "mustUnderstand" enabled, which permits the server to decide whether the call should be honored from that particular source. i

When this verification header is enabled, the calling script is released from the draconion security checks of unverified SOAP calls. But the service being invoked must not reject the message, which is the prescribed action if a SOAP server receives a header of type "mustUnderstand" that it does not understand.

Servers which accept "verified" messages containing this header relieve the user of having to configure and trust the domain of the web page never to exploit behind his firewall, because the responsibility is assumed by the service. If the service is not behind a firewall, then merely ignoring the packet is enough to free all users of this facility to call the server whatever their security configurations for unverified calls may be. But it only works with services that accept these verifySource headers.

It is possible for a user to disable even verified SOAP calls, but this is not the default setting.

Definition at line 93 of file nsISOAPCall.idl.

readonly attribute unsigned short nsISOAPMessage::version [inherited]

A convenience attribute to obtain the SOAP version number, if it is known, from the envelope.

If the message attribute is null or is not a document containing a root soap envelope element, then this will be VERSION_UNKNOWN.

Definition at line 98 of file nsISOAPMessage.idl.

const unsigned short nsISOAPMessage::VERSION_1_1 = 0 [inherited]

Definition at line 61 of file nsISOAPMessage.idl.

const unsigned short nsISOAPMessage::VERSION_1_2 = 1 [inherited]

Definition at line 62 of file nsISOAPMessage.idl.

const unsigned short nsISOAPMessage::VERSION_UNKNOWN = 0xFFFF [inherited]

Definition at line 63 of file nsISOAPMessage.idl.


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