Using Mapping Components

Mapping describes the process by which an object’s data is converted from one format to another. For example, in a Transmit pipeline, mapping involves translating an object’s data into a format suitable for transmission. In a Receive pipeline, mapping generally involves reconstituting the object from the transmitted data.

The map stage can include converting Electronic Data Interchange (EDI) communications into a form suitable for transmission. These components are available from third-party providers. For a partial listing of some of these companies and more information on how their applications enhance Site Server Commerce, please refer to http://www.microsoft.com/commercezone.

In the Transmit pipeline, the Map stage can contain the MapToXML component, which reads the data from the object referenced by the business data object’s Object name/value pair, converts the data to an XML-enclosed binary or a pure XML stream, and writes the results into the Transport Dictionary as a new name/value pair called working_data.

If MapToXML is used in the Transmit pipeline, then the MapFromXML component can be used in the Receive pipeline. MapFromXML converts an XML stream and returns a data object of the same type that was originally converted by the transmit pipeline component. The resulting business data object can then be used by the receiving application.

The MapToXML and MapFromXML components can map data to or from any object that implements the IPersistStreamInit or IPersistXML interfaces. Such objects include the Commerce Server Dictionary, SimpleList, OrderForm, and the Active Data Objects (ADO) Recordset.

The Map stage does not necessarily require the use of XML, however. The MakePO component can be used in the Transmit pipeline. This component reads specified data from the business data object and merges it with a text-based template to produce a text stream that can be human-readable. For example, this component can be used to format a purchase order as text. This text can then be transmitted by the SendSMTP component in the Transport stage.

Related Topic


© 1997-1998 Microsoft Corporation. All rights reserved.