Retrieving Metadata Programmatically from SAP
The Microsoft BizTalk Adapter 3.0 for mySAP Business Suite is a custom WCF binding that exposes an SAP system as a WCF service. The adapter exposes the SAP system as a self-describing service; that is, a service that is capable of publishing metadata about the operations that it supports. Metadata describes the logical interface to a WCF service; that is, the service contract, messages, and message schemas that must be used to interact with the service.
This metadata is used by tools such as:
The Add Adapter Service Reference Visual Studio Plug-in to generate managed code representations of the service contract, and
The Consume Adapter Service BizTalk Project Add-in to generate message schemas.
However, you can also retrieve metadata programmatically from the adapter. For example, you might want to do this to create a custom metadata retrieval tool to use in an existing application.
The adapter publishes metadata through two endpoints:
A WS-Metadata Exchange (MEX) endpoint. WCF automatically provides a MEX endpoint for all WCF bindings. You can use metadata exchange to retrieve metadata for operations supported by the adapter on the underlying SAP system.
An IMetadataRetrievalContract endpoint. The IMetadataRetrievalContract interface is implemented by the Microsoft Windows Communication Foundation (WCF) Line of Business (LOB) Adapter SDK. It categorizes SAP system artifacts at multiple logical levels and presents them as a tree of metadata nodes. You can use methods exposed by the IMetadataRetrievalContract interface to browse and search the nodes of this tree and to return metadata for operations in which you are interested.
The topics in this section describe how to use MEX and IMetadataRetrievalContract endpoints to retrieve metadata programmatically from the adapter.