Friday, 27 January 2012

Metadata Exchange

WCF provides rich infrastructure for Exporting, Publishing, retrieving and Importing the metadata. WCF uses the Metadata to describe how to interact with the service endpoint. Using the metadata, client will create the proxy class for the service using SvcUtil.exe

Exporting Service Metadata

It is the process of describing the service endpoint so that client can understand how to use the service.

Publishing Service Metadata

It is the process publishing metadata. It involves converting CLR type and binding information into WSDL or some other low level representation.

Retrieving Service Metadata

It is the process of retrieving the metadata. It uses WS-MetadataExcahge or HTTP protocol for retrieving the metadata. Importing Service Metadata - It is the process of generating the abstract representation of the service using metadata.
Now we are going to focus mainly on publishing metadata. There are two way to publish metadata, either we can use HTTP-GET or through message exchange endpoint. By default service metadata is turn-off due to security reason. WCF metadata infrastructure resides in System.ServiceModel.Description namespace. Service metadata can be used for following purpose
  • Automatically generating the client for consuming service
  • Implementing the service description
  • Updating the binding for a client
Now let us understand the publishing the metadata using HTTP-GET method.

No comments:

Post a Comment