Introduction to Web Services

zhaozj2021-02-16  64

Web Services Introduction 1, Introduction In this column we embark on a new series on Web services. Web services are expected to revolutionize our life in much the same way as the Internet has during the past decade or so. Web services provide a common protocol that Web applications can use to connect to each other over the Internet. The main advantage of Web services is that they are based on industry standards. The services are described in XML and are communicated over the existing HTTP infrastructure. The union of XML and HTTP forms one of the new industry buzz words: Simple Object Access Protocol (SOAP) Publicizing Web services is done via two standards:.. Universal Description, Discovery, and Integration (UDDI), and DISCO (abbreviation of Discovery) The big computer companies are betting . on this new technology They are developing platforms, tools, and kits to help build Web services You can write and call Web services in almost any language:.. VC , C #, VB, Java, and JavaScript in upcoming columns, we will show you how to use our favorite language, JavaScript. In this column, we will describe Web services in general. We will show you what problems Web services are trying to solve, what the benefits are of using Web services, what's behind SOAP and UDDI, and what development tools Microsoft, IBM, and Sun are promoting. We will show you where to find Web services on the Internet, and how to check their quality, before you try calling them. We'll end this column By Explaining The Structure and Various Elements of The Web Service Description File, Written in The Standard Web Service Description Language. We '

ll demonstrate WSDL with the Temperature-Weather Web service. This Web service accepts a message with your zip code, and returns the weather in your area. 2, Motivation behind Web ServicesBill Gates, in his leaflet to Developers & IT Professionals from June 14, 2001, covers the motivation for Web services, and the XML's role in this technology. We point out some of his arguments in this column. Revolutions are a way of life in the computer industry. Only 20 years ago, the world was still in the .. mainframe era Few people had access or used computers, and when they did, it was only through the nearest computer center Three innovations changed all that: the PC, the GUI, and the Internet Since then, standards such as HTML and HTTP. have exponentially increased people's use of the Internet. This base protocol for viewing content on the Web (and the associated software for browsing this content) grew Web usage to what you are familiar with today. The Web became a key activity in the daily li ves of businesses, employees, and consumers. "Many of us envision an online world where constellations of PCs, servers, smart devices, and Internet-based services can collaborate seamlessly. Businesses will be able to share data, integrate their processes, and join forces to offer customized, comprehensive solutions to their customers. The information you or your business need will be available wherever you are, and whatever computing device, platform, or application you are using. "" That vision has yet to be achieved. In many Respects, Today's Internet Still Mirrors The Old Mainframe World. IT '

sa server-centric computing model, with the browser playing the role of dumb terminal. Much of the information you or your business needs is locked up in centralized databases, served up a page at a time to individual users. Web pages are simply a " picture "of the data, not the data itself, forcing many developers back to" screen scraping "to acquire information. Integrating that underlying data with your business's existing systems is a costly and frustrating challenge." "Today's standalone applications and Web sites create islands of functionality and data. you have to navigate manually between Web sites, devices, and applications, logging in each time, and rarely being able to carry data with you. Tasks that ought to be simple, such as arranging a meeting with colleagues from partner Companies and Automatic or Updating Every Attendee's Calendar, Are A Nightmare In The Best Case, And Impossible In The Common Case. This INEFFICIENCY IS A MAJOR SOURCE for Productivity Loss. "As a res ult of the changes in how businesses and consumers use the Web, the industry is converging on a new computing model that enables a standard way of building applications and processes to connect and exchange information over the Web. This new Internet-based integration methodology, called "XML Web services," enables applications, machines, and business processes to work together in a revolutionary way. The widespread support around XML assures that businesses will cooperate in the Internet-based economy with this XML Web services model. "

At the heart of the solution is XML (eXtensible Markup Language). XML is an open industry standard managed by the World Wide Web Consortium. It enables developers to describe data being exchanged between PCs, smart devices, applications, and Web sites. Since the data is separate from the format and style definitions, it can be easily organized, programmed, edited, and exchanged between any Web sites, applications, and devices. Just as the Web revolutionized how users talk to applications, XML transforms how applications talk to each other. "Microsoft would like to convince us that Web services is the next revolution after the Web and HTTP. Judging from the Sun-Microsoft war on which Web services environment is better, Microsoft may be able to prove it. 3, Benefits of Web ServicesExperts and visionaries Believe That The Benefits of XML Web Services Will Be Instrumental In Propelling Explosure Business Growth over the next few years. One of the major benefits is web services'

ease of integration. You will easily integrate your software with other pieces of software. You can run on all kinds of machines, from the desktop to the mainframe, either within your enterprise or at external sites. This ease of integration will enable tighter business relationships and more efficient business processes. With Web services readily available, and as the pool of XML Web services grows, you will be able to find software modules that can be integrated into your own application, by finding it and integrating it through XML Web services. Integrate with existing Web services instead of reinventing them. The bottom line is that you will be able to develop applications much faster than before. An integral part of the XML Web services programming model, is the ease of integration with external data sources. No longer DOES Each Application NEED TO COPY AND MAINTAIN EXTERNAL DATA SOURCES. You CAN Request and Get Information In Real Time, And Transform It To your particular format. This will allow you to deliver individualized software and services, while your maintenance burden is reduced. Consumers will enjoy ease of use when using XML Web services-based applications. XML Web services link applications, services, and devices together. Using Web services will be an integrated experience that excels in its simplicity. XML Web services give users the ability to act on information any time, any place, and from any smart device. Businesses will love Web services because it will force them to streamline their processes. All suppliers will Use The Same Language To Describe Their Offerings. An XML Web Service IS A Simple, Reliable Way to Blend Existing Systems with New Applications and Services.

Microsoft is already sporting several commercial applications that were written in a record speed, thanks to the use of XML Web services. The first one is from Dollar Rent-A-Car. In two weeks, programmers built, tested, and deployed a Web Services -based solution that translates reservation requests and data between the company's mainframe-based reservation system and an airline partner's UNIX servers. Dollar can now reuse the same integration model to link their reservation system with other airline or hotel partners. The second case is expedia. com. This is a site that will find you the lowest price itinerary. They are now in the process of transforming itineraries into communication centers. These centers are Web services that users can access to get relevant and timely information at their convenience. With this new Service, Expedia Hopes To Attract New Customers and Further Strenn the Loyals. 4, SOAP AND UDDIYOU CALL Web Services with Messages Tha t are written in the SOAP format. SOAP is a specification that defines the XML format for messages. A well-formed XML fragment enclosed in a couple of SOAP elements is a SOAP message. SOAP stands for Simple Object Access Protocol. You could print out a SOAP message, fax it to a remote location, and type it into the remote machine without violating the SOAP standard. More likely, you would send a SOAP message inside an HTTP message. There's no standard for how a SOAP message is carried, and Soap Doesn't Care What An Http Message Containing A Soap Message Must Look Like. The Soap Specification Includes Three Major Parts.

The required part defines the structure of an XML document that can be used to exchange data between applications. Section 5 defines a way to encode programming language data types in XML. Such a message is called a section-5 encoded SOAP message. A regular message that contains an XML document is called a literal SOAP message. Section 7 of the SOAP definition is also optional. It deals with RPC (remote procedure calls), where the message is sent synchronously. You call a Web service's function and wait to check the return code. The default specification is for asynchronous call. One of the critical principles of XML Web services is that systems connect through the Internet, which is a safe assumption. Internet connectivity is readily available and is provided with a very low cost to users of The Only Problem Is How To Find these Resources on the Internet. Will The BE SEARCH ENGINES? DIRECTORIES? Some of the Big Computer Company Such As Microsoft, Ariba, Compaq, Dell, HP, IBM, SAP, and others, are participating in a broad industry effort to define UDDI (Universal Description, Discovery, and Integration). UDDI provides a way to locate and understand services provided by other companies. It's a kind of " yellow pages "on the Internet for the industry. 5, Development ToolsWith the momentum behind XML Web services growing among developers, computer companies are building platforms to help them write, deploy, use, and manage these services. Sun is promoting its Sun Open Net Environment (Sun ONE) For these purposes. Microsoft Has ITS OWN Platform, The .NET (Pronounced Dotnet) Platform. It Contains Both Products and Services Developers Need To Build and Run XML Web Services.

It also enables integration of XML Web services with other computers, smart devices, and other Web-based services. Because XML is an open standard, Microsft assures us that the products and services within Microsft .NET will interoperate with a broad set of XML- and XML Web services-enabled infrastructure and developer tools from other vendors Under the umbrella of the .NET environment, Microsoft is promoting two major tools:.. Visual Studio.NET and .NET Framework Visual Studio.NET is Microsoft's next generation multi-language . development tool helps developers quickly build XML Web services and applications that scale easily, using the language of their choice The supported languages ​​are:. Visual Basic, which includes new object-oriented programming features, Visual C , which advances Windows-based development And Enables you to build .NET Applications, And C #, Which Brings Rad (Rapid Application Developments) To C and C Developers. Other Languages ​​Will Be Supported by Third Part ies:. Perl, Python, COBOL, and Eiffel The .NET Framework is a high-productivity, standards-based, multi-language application execution environment that handles essential plumbing chores and eases deployment The .NET Framework improves the reliability, scalability,. and security of your application It includes several parts:. the Common Language Runtime, a rich set of class libraries for building XML Web services, and ASP.NET, the next generation Active Server Pages 6, Writing WSDLWhen planning to use a new Web. . --2. ''

It describes the messages that the Web service understands, the format of its responses to those messages, the protocols that the service support, and so on The WSDL document is easy to browse Just click the lines beginning with the.. ( "-") and plus ( " ") signs, to contract or expand the code.The WSDL document can be divided into two groups: the abstract Definitions Group and the Concrete Descriptions Group The abstract sections define SOAP messages in a platform- and language-independent. manner;.. they do not contain any machine- or language-specific elements The concrete sections are site-specific, machine-specific, or language-specific The abstract elements are types, message, and portType The concrete elements are binding and. . service The root of any service description file is the element The elements includes the namespace definitions In the Weather - Temperature Web service, it looks like this:.. The Types Element Contains DataType Definitions. USUALLY, this Element Includes a schema element That defines various datapes.

Here is a complexType element definition from the interopTest Web service's types element: < attribute ref = "SOAP-ENC: arrayType" wsdl: arrayType = "string []" /> The message element describes the data being exchanged between . the Web service providers and consumers Each Web method has two messages: input and output The input describes the parameters for the Web method; the output describes the return data from the Web method Each message contains zero or more parameters,.. One for Each Parameter of The Web Method. Each Parameter Associates with a concrete type defined in The TEMPERATURE - Weather Web service, the input parameter is a string-typed zip code Here is how the element is defined: The porttype element incrudes a supported set of operations. Each Operation Includes The Input and The Output Messages of The Operation.

Here is the getTemp operation from the Temperature - Weather Web service: each binding element describes a supported protocol Similar to the portType element, the binding element includes supported operations, as well as the input and output for each operation Here is the binding element from the Temperature.. - Weather Web service: The service element is a collection of ports. Each port supports a diffreent protocol.

转载请注明原文地址:https://www.9cbs.com/read-13057.html

New Post(0)