Appendix A: Implementing IPersistXML, IPersistStreamInit, or IPersistStream

If you are using the Commerce Interchange Pipeline (CIP) MapToXML and MapFromXML components, then the OBJECT name/value pair in the Transport Dictionary must reference an object that implements IPersistXML, IPersistStream, or IPersistStreamInit interface. The Commerce Server SimpleList, Dictionary, and OrderForm objects implement these interfaces.

If you map a business data object as binary data, the CIP mapping components check to see if the business data object implements IPersistStream or IPersistStreamInit. Although there is no limit on how deeply objects referenced within the business data object may be nested, both the root object and all nested object must implement one of these interfaces, or an error is raised.

If you map a business data object as XML, the CIP mapping components first attempt to get the business data object’s implementation of IPersistXML. If the object does not support IPersistXML, the mapping components attempt to get the business data object’s IPersistStreamInit or IPersistStream implementation (in that order). If the object (or nested object) implements one of these interfaces, the mapping component uses that implementation to save/load the object and its direct links to other objects. In this case also, there is no limit on how deeply objects referenced in the business data object can be nested.

If you use a SimpleList, OrderForm, or Dictionary, be aware that these object’s implementations of IPersistXML/IPersistStreamInit do not persist the following types of data:


© 1997-1998 Microsoft Corporation. All rights reserved.