ISerializerFactoryConfig::SetConfig Method

HRESULT SetConfig([in] VARIANT config);

This selects a preset serializerFactory configuration. Currently the two supported configurations are sfcNormal and sfcScripting. In Scripting mode all arrays are de-serialized into arrays of variants, rather than the more strong typed arrays that you get in normal mode. A future version will allow you to load a serializerFactory configuration from an external configuration file.

 

Parameters

config
VARIANT, [in]: the configuration to select, currently only sfcNormal (0) and sfcScripting (1) are supported

 

Return Values

Returns E_INVALIDARG if the config parameter is not SfcNormal [0] or sfcScripting [1]

 

Sample Code

dim e, t
set e = CreateObject("pocketSOAP.Envelope.2")
e.SerializerFactory.SetConfig 1
e.setMethod "echoStringArray", "http://soapinterop.org/"
e.Parameters.Create "inputStringArray", array("one", "two", "three")

set t = CreateObject("pocketSOAP.HTTPTransport.2")
t.send "http://soap.4s4c.com/ilab/soap.asp", e.serialize
e.parse t
wscript.echo "response type = " & typename(e.parameters.item(0).value)

' even though the 4s4c server returns the array as arrayType="xsd:string[3]", this prints
response type = Variant()

 

See Also

The ISerializerFactoryConfig Interface | 

 

 

Copyright

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