I have WCF bassicHttpBiding service .
My web functions are returning some custom defined types.
[DataContract]
public class PcbInfoEntry
{
[DataMember]
public int ReflowPcbId { get; set; }
[DataMember]
public string PcbId { get; set; }
}
But how actually the client knows the definition of the class ?
What is happening in the proxy that is generated?
The server exposes a WSDL (Web Services Description Language). Simply point your browser to
http://example.com/myservice/service.svc?wsdland you will see the full definition of your service. All the types and methods that it exposes. When generating a client side proxy,svcutil.exeuses this information to generate the corresponding client side proxy classes.WSDL is a SOAP standard. No matter what language your service is written to, if it exposes a WSDL, you could generate client proxy easily.
WCF can also publish its metadata through a MEX endpoint which implements the WS-Metadata Exchange standard allowing for clients to discover its types.