Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All about WSDL vs MEX?

Tags:

wsdl

wcf

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?
like image 559
Aakash Avatar asked May 04 '10 06:05

Aakash


3 Answers

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.

like image 177
Dave White Avatar answered Nov 15 '22 18:11

Dave White


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

like image 34
Keith Robertson Avatar answered Nov 15 '22 18:11

Keith Robertson


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.

like image 28
John Saunders Avatar answered Nov 15 '22 18:11

John Saunders