Thursday, November 23, 2006

* WCF : Metadata Endpoints

Metadata endpoints are like any other endpoints and are used by service providers to publish metadata of their services in a more standard way.

Metadata of a service can be retrieved either by using a WS-Transfer GET request or a HTTP/GET request using the ?wsdl query string.

In the below example adding <serviceMetadata> element in behaviour and adding endpoint to publish it will enable WS-Transfer GET request.

To enable HTTP/GET request httpGetEnabled should be set as true.


<?xml version="1.0" encoding="utf-8" ?>
<service name="VikasGoyal.WCF.BankService" behaviorConfiguration="BankServiceBehaviors" >
<endpoint contract="VikasGoyal.WCF.IBank" binding="wsHttpBinding"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
<behavior name="BankServiceBehaviors" >
<serviceMetadata httpGetEnabled="true" />

</configuration> tags: , , ,

Technorati tags: , , ,

No comments:

Post a Comment