How Do I ... : Web Services Tips, Hints and FAQs : How can I supply custom deserializers to provide custom logic for mapping XML into objects?
How can I supply custom deserializers to provide custom logic for mapping XML into objects?
Mapping parsed XML into Smalltalk model objects is performed by objects called 'deserializers'. Developers can supply custom deserializers to enhance default mapping behavior. Custom deserializers can be created and set in deserialization configurations.
| container config |
container := SstWSContainer containerNamed: 'MyContainer'.
config := container serializationManager
deserializationConfigurationNamed: SstSoapConstants::SstSoapDefaultEnvelopeNamespace.
config deserializer: AbtXmlSchemaInputDeserializer current.
 
Alternatively, the default SOAP deserialization configuration can be replaced as shown below.
| container config |
container := SstWSContainer containerNamed: 'MyContainer'.
config := AbtXmlDeserializationConfiguration newSoapConfiguration.
config deserializer: AbtXmlSchemaInputDeserializer current.
container serializationManager
addDeserializationConfiguration: config
named: SstSoapConstants::SstSoapDefaultEnvelopeNamespace.
-------------------------------
Last modified date: 04/08/2023