ISOAPEnvelope::Parse Method

HRESULT Parse([in] VARIANT Envelope, [in, defaultvalue(L"")] BSTR characterEncoding);

This takes a SOAP Envelope and parses it back into the COM object model. If ThrowFaults is set to VARIANT_TRUE, then following successful completion of the parsing step, the message is checked to see if its a SOAP Fault, and if so, the fault is mapped to a COM error and returned.



VARIANT, [in]: The SOAP Envelope to parse, this can either be a string [VT_BSTR], an array of bytes [VT_UI1|VT_ARRAY] or an object that implements ISOAPTransport, ISOAPTransport2 or ISwATransport [in which case Receive will be called]
BSTR, [in, defaultvalue(L"")]: The character encoding of the envelope, leave this as an empty string to have the parser work it out from the XML, or set it to a specific value for the cases where the transport can override the XML character encoding [such as HTTP]


Return Values


Sample Code

dim e , t
set e = CreateObject("pocketSOAP.Envelope.2")
e.setMethod "echoString", ""
e.Parameters.Create "inputString", "Hello World"
set t = CreateObject("pocketSOAP.HTTPTransport.2")
t.send "", e.serialize

e.parse t
wscript.echo e.parameters.item(0).value


See Also

The ISOAPEnvelope Interface | 




Copyright © Simon Fell, 2000-2004. All rights reserved.