@mozilla.org/xmlextras/soap/call;1

This component implements the following interfaces:

Constants

PRUint16 nsISOAPMessage.VERSION_1_1 = 0
PRUint16 nsISOAPMessage.VERSION_1_2 = 1
PRUint16 nsISOAPMessage.VERSION_UNKNOWN = 65535

Properties

AString nsISOAPMessage.actionURI

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.

readonly nsIDOMElement nsISOAPMessage.body

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.

nsISOAPEncoding nsISOAPMessage.encoding

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.

readonly nsIDOMElement nsISOAPMessage.envelope

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.

readonly nsIDOMElement nsISOAPMessage.header

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.

nsIDOMDocument nsISOAPMessage.message

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.

readonly AString nsISOAPMessage.methodName

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.

readonly AString nsISOAPMessage.targetObjectURI

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.

AString nsISOAPCall.transportURI

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.

PRBool nsISOAPCall.verifySourceHeader

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.

readonly PRUint16 nsISOAPMessage.version

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.

Methods

InterfaceMethod
nsISOAPCall nsISOAPCallCompletion asyncInvoke ( nsISOAPResponseListener listener )
nsIFactory void createInstance ( nsISupports outer , nsIIDRef iid , retval nsQIResult* result )
nsISOAPMessage void encode ( PRUint16 version , AString methodName , AString targetObjectURI , PRUint32 headerBlockCount , nsISOAPHeaderBlock headerBlocks , PRUint32 parameterCount , nsISOAPParameter parameters )
nsISOAPMessage void getHeaderBlocks ( out PRUint32 count , retval nsISOAPHeaderBlock headerBlocks )
nsISOAPMessage void getParameters ( PRBool documentStyle , out PRUint32 count , retval nsISOAPParameter parameters )
nsISOAPCall nsISOAPResponse invoke ( )
nsIFactory void lockFactory ( PRBool lock )

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com