Calling a WCF service from a client without having the contract interface

Friday, February 10, 2012

I was asked yesterday in the Hebrew C#/.NET Framework MSDN forums a tough question – is it possible to dynamically call a WCF service using only the contract name, operation name, and metadata address? At first I agreed with the answer given in the forum – move from SOAP bindings to WebHttpBinding (“REST”). This of course makes things a lot easier, only requiring you to create a WebHttpRequest and parse the response. However the question remains - is it possible to do this in the case of a SOAP-based service endpoint? The short answer is – YES! The full answer...

WSDL vs MEX, knockout or tie?

Wednesday, August 10, 2011

When teaching WCF I am always asked about the difference between getting the service’s metadata by using the WSDL’s http get url, and getting the metadata by calling the MEX endpoint. To answer that question we first need to understand the different parts of the configuration that affect metadata creation. The ServiceMetadata behavior This behavior controls whether metadata is created for the service. When this behavior is used, the service is scanned, and metadata is created for the service’s contracts (a list of operations and types exposed by the service). If the behavior is...