[propget] HRESULT EncodingStyle([out, retval] BSTR * encStyle);
[propput] HRESULT EncodingStyle([in] BSTR encStyle);
This is the EncodingStyle URI for this node. If the Node is created via CoCreateInstance [or new in VB] then the EncodingStyle default to the standard SOAP section 5 encodingStyle of http://schemas.xmlsoap.org/soap/encoding/. If the node is created via the Create method on the Nodes collection object, then it inherits the encodingStyle of its parent node (at creation time). Setting the encodingStyle to anything other than http://schemas.xmlsoap.org/soap/encoding/ will disable the section 5 encoding support during serialization, making it easier to generate SOAP messages based on schemas without having to write a custom serializer.
The current value of the EncodingStyle URI property.
dim e, n set e = CreateObject("pocketSOAP.Envelope.2") e.SetMethod "doFoo", "http://www.foo.org/" e.EncodingStyle = "" set n = e.Parameters.Create("one", empty) n.Nodes.Create "two", "some string" wscript.echo e.serialize ' generates this, note how the sub nodes inherit their encoding Style ' from the envelope. <S:Envelope S:encodingStyle='' xmlns:E='http://schemas.xmlsoap.org/soap/encoding/' xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:a='http://www.foo.org/' xmlns:c='http://www.w3.org/2001/XMLSchema' xmlns:b='http://www.w3.org/2001/XMLSchema-instance'> <S:Body><a:doFoo><one><two b:type='c:string'>some string</two> </one> </a:doFoo> </S:Body></S:Envelope>
Copyright © Simon Fell, 2000-2004. All rights reserved.