ISerializerFactoryConfig::Serializer Method

HRESULT Serializer([in] VARIANT ComType, [in] BSTR Type, [in] BSTR TypeNamespace, [in] BSTR ProgID);

This registers a new serializer for a particular COM type. The serializer [in conjunction with the serializer engine] is responsible for converting the COM type into its SOAP/XML representation. You can register a new serializer for an existing COM type, so that you can override any of the standard serializers if you need to.

 

Parameters

ComType
VARIANT, [in]: The COM type that this serializer will serialize
Type
BSTR, [in]: The resulting Xml Type after serialization
TypeNamespace
BSTR, [in]: The namespace of the Xml Type
ProgID
BSTR, [in]: The ProgID of the serializer

 

Return Values

///todo: discuss the possible return values

 

Sample Code

dim e, a, af
set af = CreateObject("AddressBook.Locator")
set a = af.GetAddressFor("Simon Fell")

set e = CreateObject("pocketSOAP.Envelope.2")
e.setMethod "updateAddress", "urn:xml-soap-address-demo"

e.Parameters.Create "address", a
' to specify a serializer for a COM object, you enter an interface IID for the object as the COM Type
' use the AddressBook.AddressSerializer to serialize any objects that implement the {407ECB10-29A0-43cd-A89E-8EBFD662211F} interface
e.SerializerFactory.Serializer "{407ECB10-29A0-43cd-A89E-8EBFD662211F}", "address","urn:xml-soap-address-demo", "AddressBook.AddressSerializer"
...

 

See Also

The ISerializerFactoryConfig Interface | 

 

 

Copyright

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