开发者

All about WSDL vs MEX?

I am not able to open the meta data url http://localhost:8082/Tasks开发者_开发知识库/mex, even though I've added the mexHttpBinding in the config file. Can I view this MEX endpoint in a browser?

The config files look like:

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

Questions:

  • Is MEX is different from WSDL? If not, then why do we require a MEX endpoint over WSDL?
  • In the WSDL, I see the WSDL type information is missing. Is it by default? Can I look at the type information in WSDL?


Check out serviceMetadata for more information regarding the WCF configuration file.

To answer your questions though, MEX is a newer W3C standard for the presentation of Service description information; WSDL was the previous method. If you need to allow older clients to access your service description information, you may have to expose that information via WSDL.

The information for exposing your service description information as WSDL (httpGetEnabled) is also in the link provided above.

Also, try using the wcftestclient.exe to access your WCF service. It provides more functionality and information than a browser.


Aakash, Did you add a service behavior with a <serviceMetadata> element? It can be empty, i.e. <serviceMetadata />, but it must be present. The service definition needs to reference the service behaviorConfiguration. Check out the following for examples:

http://www.request-response.com/blog/PermaLink,guid,c9513d28-f580-4a33-b4e8-c15476799a9d.aspx


If you look at that endpoint, you'll see it looks like every other endpoint. There's even a service contract (IMetadataExchange). You can look at System.ServiceModel.Description.IMetadataExchange and see what that contract is all about.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜