ISerializerFactoryConfig::PrimarySchema Property

[propget] HRESULT PrimarySchema([out, retval] BSTR * uri);
[propput] HRESULT PrimarySchema([in] BSTR uri);

get/sets the primary schema that the serializer factory will try and generate serializations in. This defaults to the XSD recommendation version. [http://www.w3.org/2001/XMLSchema]. Some older SOAP servers only support the earlier 1999 schema version [as that was the draft at the time the SOAP spec was written], to switch to using the 1999 schema instead, set this property to http://www.w3.org/1999/XMLSchema

 

Return Values

The current Namespace URI associated with the active schema version, this defaults to http://www.w3.org/2001/XMLSchema

 

Sample Code

dim e
set e = CreateObject("pocketSOAP.Envelope.2")

' we are talking to an old endpoint, and have to use the old 1999 schema version
e.SerializerFactory.PrimarySchema = "http://www.w3.org/1999/XMLSchema"

e.setMethod "echoInt", "http://soapinterop.org/"
e.Parameters.create "inputInt", 42
wscript.echo e.serialize

' this generates the following SOAP message
<S:Envelope
        S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
        xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'
        xmlns:E='http://schemas.xmlsoap.org/soap/encoding/'
        xmlns:a='http://soapinterop.org/'
        xmlns:b='http://www.w3.org/1999/XMLSchema-instance'
        xmlns:c='http://www.w3.org/1999/XMLSchema'>
<S:Body><a:echoInt><inputInt b:type='c:short'>42</inputInt>
</a:echoInt>
</S:Body></S:Envelope>

 

See Also

The ISerializerFactoryConfig Interface | 

 

 

Copyright

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