I believe what you are looking for: svcutil.exe /r your-dtos.dll
/ reference: - The types of links in the specified assembly. When creating clients, use this option to specify nodes that may contain types that represent imported metadata. (Short: / g)
In my opinion, the tight connection of the WCF proxy server, the endpoint channel, service operations and data with useful data in the same client proxy server created is the main design flaw.
This is what prompted me to decide in my open web services infrastructure , where I separate the endpoint and the payload, which allows:
- The same web services client (i.e. Soap11, Soap12, XML, JSON) to be able to call any web service.
- It allows me to also use the same instance of the DataContract dto in any of the web service clients.
- This has many advantages, including the ability to expose the same web service to several different endpoints without any additional configuration. This ensures that the endpoints of the web service are optimized for each user of my service. For example.
- XML for interoperability and strict type of clients,
- JSON for Ajax clients,
- WSDL for environments that prefer generated code (i.e. Flex Builder, VS.NET 'Add Service Reference', etc.)
In my company, we have developed hundreds of web services called several different clients, that is, Ajax, Flash / ActionScript, C ++, Silverlight, ASP.NET and the ability to call the same web service through different endpoints, including
mythz
source share