Web Service Getting Started
N What is web service?
The web service is the basic part of building an internet distributed system. Web Services is a valid platform for enterprise application integration (Enterprise Application Integration). You can use the web service to build applications in the Internet without having to consider how these Web services run.
N Web Service three basic technologies
2 Web Service passes a standard communication protocol, publishing a useful program module (in service) on the Internet, and most of them use SOAP to communicate protocols.
2 Web Service provides a detailed interface manual to help users build applications, which is called WSDL (Web Service Description Language).
2 The usually published Web Service To register to the management server, so that users are easy to query and use. This is done by UDDI (Universal Discovery Description and Integration).
n Why use the web service?
The main advantage of Web Servcie is that using different programs and procedures developed on different system platforms can communicate with each other. Many people are now asking: "Isn't Corba and DCEs also have those advantages? What is the difference between them?" The first difference is that SOAP acts as a basic communication protocol of Web Service, which is simpler than they, so the cost of investment and use is also small. Not only there are many big companies released Web Service, but also personal release. Another difference is that the Web Service uses standard Internet protocols-xml, HTTP, and TCP / IP. Many companies have accumulated rich experience in these agreements in practice, so much less than Corba and DCE.
If an existing application is published as a Web Service component, you can help other companies (people) components powerful applications. For example, you have to develop a procurement system that automatically obtains the supplier's offer, and you can track the delivery process in real time. If the supplier has released the quotation and delivery of these two web services, then you can use them directly without having to develop these features yourself.
In the future, more interesting Web services will be made to help us build an application.
2 SOAP
SOAP is the basic communication protocol of Web Service. Because SOAP is conceptually identical to DCOM and CORBA, many people are asking: "How does SOAP activate objects?" Or "Naming Service" is using? ". Perhaps these will be used when performing SOAP, but these are not within the scope of SOAP specifications. SOAP just defines the XML format (XML Format) of the SOAP message. If you enclose the XML document with a pair of SOAP tags, then this is a SOAP message, is this not very simple?
The SOAP specification also defines how to use XML to describe program data (how to perform RPC (Remote Procedure Call). These optional specifications are to build an RPC-Style application (the client SOAP message contains the result of the function name and the parameters used in the function, and the server-side SOAP message contains the result after the function is executed. Most SOAP solutions support RPC-Style applications because many programmers have been familiar with DCOM or CORBA. SOAP also supports the Document-Style application (SOAP message only contains XML text information). The Document-Style application has good flexibility, so many of the web services that use RPC is difficult to build in this way. Finally, the SOAP specification also defines how HTTP messages are transmitted for SOAP messages. This does not mean that SOAP can only use HTTP as a transport protocol, MSMQ, SMTP, TCP / IP can do SOAP transport protocols.
Many large companies have developed their own SOAP solutions based on SOAP specifications. These solutions are relative to a language. For example, Microsoft SOAP Toolkit 2.0 converts the COM function into a SOAP message, and Apache Toolkit converts the Java function into a SOAP message. This is inevitable to bring some compatibility issues.
Many of SOAP now have a reality (SOAP has run in different hardware and software platforms) and has more than 70 solutions. The reason why SOAP is loved by people because SOAP is easy to use than other similar technologies (Corba, DCE).
Security is important for applications. So what is the security of SOAP? There is no problem with SOAP as a transport protocol, as the HTTP protocol has a good security architecture. So do you have security issues with other transport protocols? No, you don't have to worry, because there is already a normative in this area (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security.asp ).
N wsdl
WSDL is an XML document that defines how the SOAP message is exchanged. Idl (Interface Description Language) is used for COM and CORBA, WSDL is for SOAP. WSDL is an XML document, so we can read and edit, but many times to create, read by the program.
For example, you have to build an application using a vendor's Web Service. You can ask the vendor to use the Web Service example, and then build an application in accordance with examples. This may have unexpected errors, for example, the data type of customer code you used in the program is Integer, and the data type used by the supplier is String .. WSDL details the format of the client message, what kind of parameters need to avoid unnecessary errors.
n uddi
UDDI can be comparable to phone book, and the phone is recorded by phone information, and UDDI is recorded by Web Service information. You can register the Web Service to UDDI. But if you want to let people around the world know your Web Service, it is best to register to UDDI.
The UDDI directory instruction file is also an XML document that includes three parts. "White paper" describes companies (people) information for Web Service, such as name, address, and contact details. "Yellow Pages" illustrates the classification of the UDDI directory, such as finance, service and printing, etc. "Green Paper" description interface (web service provided) details. UDDI provides a variety of query methods to help you find the web service you need. If you query about Web services related to financial, UDDI provides detailed information.
N-reference
※ This article translated the following article
XML Web Service Basics, Roger Wolter, Microsoft Corporation, December 2001
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/webservbasics.asp
Original: http://www.trueObject.net/board/zboard.php? Id = web_service_lecture & no = 2