Microsoft 9GD00001 ユーザーズマニュアル

ページ / 449
 
Chapter 11:  Deploying Web Services with WCF 
301
call into XML and send the XML data via HTTP to the WCF service. The WCF service 
understands the XML because it was the WCF service that told the Java application what 
format to put the XML into. If you’re curious about the format, it’s called Web Service 
Description Language (WSDL), which is a contract (or interface) that tells callers how 
to package the XML and what operations (such as GetWeather) can be called on the Web 
service. There’s more that the WSDL does behind the scenes, but the primary point to 
make is that clients, such as the Java app, use the WSDL to package their XML and send 
it to the WCF service. The service translates the XML into a call to a method, runs the 
method, packages the results back into XML (as defined by the WSDL), and sends the 
results back to the Java application. Essentially, a WCF service uses open standards so that 
any other system can use those same open standards to communicate.
This chapter will show you how VS helps you create WCF services, how to create 
a client that communicates with a WCF service, and how to deploy WCF services. The 
deployment information in this chapter is also useful to know for other types of Web 
applications, such as ASP.NET MVC and Silverlight. Let’s start off with creating a WCF 
project.
Starting a WCF Project
To create a new WCF project, press 
CTRL
-
SHIFT
-
N
 to start a new project, and then select 
WCF Service Library, name the project WcfDemo, and set the location to anywhere 
you want the project to reside in the file system. This will produce a project similar to 
Figure 11-1.
Figure 11-1
  A WCF Service Library project