ISOAPEnvelope::Serialize Method

HRESULT Serialize([out, retval] BSTR * soapMsg);

This takes the current state of the Envelope object model, and serializes it as an XML/SOAP message. The transport object can choose to transcode from the supplied UTF-16 supplied data to an encoding more suitable for transport [typically UTF-8]

 

Parameters

soapMsg
BSTR *, [out, retval]: The resulting XML, as this is a BSTR and is therefore Unicode, so this is always UTF-16 encoded

 

Return Values

The serialized envelope as a string

 

Sample Code

dim e , t
set e = CreateObject("pocketSOAP.Envelope.2")
e.setMethod "echoString", "http://soapinterop.org/"
e.Parameters.Create "inputString", "Hello World"
set t = CreateObject("pocketSOAP.HTTPTransport.2")

wscript.echo "Request XML" + vbCRLF + e.serialize
t.send "http://soap.4s4c.com/ilab/soap.asp", e.serialize
e.parse t
wscript.echo e.parameters.item(0).value

 

See Also

The ISOAPEnvelope Interface | 

 

 

Copyright

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