Generating a Service and Client Proxy
In the previous lab, you created a service and client from scratch without leveraging the tools available to WCF developers. Although this helps you to understand the raw requirements for sending messages between clients and services, in reality, developers need tools to be productive. This time around, I’ll show you how to use several such tools that help you to generate services, access metadata, create configuration settings, and generate proxies. Specifically, you’ll use the following:
Visual Studio service templates
Service Configuration Editor
ServiceModel Metadata Utility (SvcUtil)
The primary goal of the lab in this section will be to improve your productivity for building clients and services, but several other concepts will be discussed in the process. To begin with, you’ll use declarative configuration settings instead of code to configure the service host and client. To enable proxy generation, you’ll access service metadata, which involves enabling a service behavior. In addition, you’ll learn more about service configuration settings for base addresses, endpoints, bindings and behaviors.
After you complete the lab, I’ll spend some time discussing these concepts.
Lab: Using Tools to Generate Clients and Services
In this lab, you will generate service code using two approaches: by adding a service to an existing host and by generating a new service library, both using Visual Studio templates. To configure service endpoint for the host, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access