Search code examples
wcf

WCF - using objects from a third dll via webservices


I have the following project structure:
Project B has DataContract objects.
Project A has a web service endpoint and a project references to Project B.

WS Client:
Has a web service reference to Project A. However, it doesn't see any objects defined in Project B.
I am wondering how can I make the objects defined in Project B visible to web service client. Do I need to create a WSDL by hand?


Solution

  • If project B's DLL contains the classes, and if you want the clients to use the classes, then they will have to be given the DLL.

    If, instead, you want the clients to have access to proxy classes that correspond to the actual classes, then you must reference them in the Web Service contracts. Proxy types will not be generated for anything that is not part of the contract.