Client and Service

Client and Service

DOI: 10.4018/978-1-5225-1997-3.ch007
OnDemand PDF Download:
$37.50

Chapter Preview

Top

Client

A client is a piece of code which initiates communication with the service. It communicates with the service through the endpoint. There are certain underlying objects which are generated while consuming the service using the proxy class object. A programmer must know about these objects. The communication between client and service id illustrated in Figure 1. As illustrated in Figure 1, a proxy object is available at client side which communicates with the service using endpoints generated on both sides. Proxy generation is done in two ways.

  • One way is to use Add Service Reference option of visual studio which calls the svcutil.exe program in the background. This option is already discussed in the preceding chapters, but readers are not aware about that the proxy class generation is done by the utility called svcutil.exe

  • Another way is to create object of ChannelFactory class which is available in System.ServiceModel. This option is tailor made for the .NET client, but it will not work for interoperability with other languages.

Figure 1.

Client and service communication

These two methods are explained in great details in the following sections.

Complete Chapter List

Search this Book:
Reset