سؤال

This article suggests it was possible, or in the works, with some code that suggests it can be done, but I can't figure out what code needs to happen or the WcfTestClient's uri needs to be.

Here's the code from the article that makes me think I can do it:

// Metadata routes to support $metadata and code generation in the WCF Data Service client. 
configuration.Routes.MapHttpRoute( 
    ODataRouteNames.Metadata, 
    "$metadata", 
    new { Controller = "ODataMetadata", Action = "GetMetadata" } 
); 

Is this feature implemented?

هل كانت مفيدة؟

المحلول

No, it does not work as you intend. WCF Test Client supports talking to SOAP-based services. OData is not supported in the current version.

Granted, as @Snixtor mentioned, you could create a SOAP service using ASP.NET Web API, including support for metadata (WSDL). But I really don't know of any good reason why anyone would want to do that.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top