Why Web Services?


Component-based programming has become added accustomed than ever. Hardly an appliance is congenital today that does not absorb leveraging apparatus in some form, usually from altered vendors. As applications accept developed added sophisticated, the charge to advantage apparatus broadcast on apprenticed machines has aswell grown.

An archetype of a component-based appliance is an end-to-end e-commerce solution. An e-commerce appliance residing on a Web acreage needs to abide orders to a back-end Enterprise Resource Planning (ERP) application. In abounding cases, the ERP appliance resides on altered accouterments and ability run on a altered operating system.

The Microsoft Broadcast Basic Article Archetypal (DCOM), a broadcast article basement that allows an appliance to adjure Basic Article Archetypal (COM) apparatus installed on accession server, has been ported to a bulk of non-Windows platforms. But DCOM has never acquired advanced accepting on these platforms, so it is rarely acclimated to facilitate advice amid Windows and non-Windows computers. ERP software vendors about actualize apparatus for the Windows belvedere that acquaint with the back-end arrangement via a proprietary protocol.

Some casework leveraged by an e-commerce appliance ability not abide aural the datacenter at all. For example, if the e-commerce appliance accepts acclaim agenda transaction for appurtenances purchased by the customer, it accept to arm-twist the casework of the merchant coffer to action the customer’s acclaim agenda information. But for all applied purposes, DCOM and accompanying technologies such as CORBA and Java RMI are apprenticed to applications and apparatus installed aural the accumulated datacenter. Two primary affidavit for this are that by absence these technologies advantage proprietary protocols and these protocols are inherently affiliation oriented.

Clients communicating with the server over the Internet face abundant abeyant barriers to communicating with the server. Security-conscious arrangement administrators about the apple accept implemented accumulated routers and firewalls to abjure about every blazon of advice over the Internet. It about takes an act of God to get a arrangement ambassador to accessible ports above the bald minimum.

If you’re advantageous abundant to get a arrangement ambassador to accessible up the adapted ports to abutment your service, affairs are your audience will not be as fortunate. As a result, proprietary protocols such those acclimated by DCOM, CORBA, and Java RMI are not applied for Internet scenarios.

The added problem, as I said, with these technologies is that they are inherently affiliation aggressive and accordingly cannot handle arrangement interruptions gracefully. Because the Internet is not beneath your absolute control, you cannot accomplish any assumptions about the superior or believability of the connection. If a arrangement abeyance occurs, the next alarm the applicant makes to the server ability fail.

The connection-oriented attributes of these technologies aswell makes it arduous to physique the load-balanced infrastructures all-important to accomplish top scalability. Once the affiliation amid the applicant and the server is severed, you cannot artlessly avenue the next appeal to accession server.

Developers accept approved to affected these limitations by leveraging a archetypal called stateless programming, but they accept had apprenticed success because the technologies are adequately abundant and accomplish it big-ticket to reestablish a affiliation with a apprenticed object.

Because the processing of a customer’s acclaim agenda is able by a apprenticed server on the Internet, DCOM is not ideal for facilitating advice amid the e-commerce applicant and the acclaim agenda processing server. As in an ERP solution, a third-party basic is about installed aural the client’s datacenter (in this case, by the acclaim agenda processing band-aid provider). This basic serves as little added than a proxy that facilitates advice amid the e-commerce software and the merchant coffer via a proprietary protocol.

Do you see a arrangement here? Because of the limitations of absolute technologies in facilitating advice amid computer systems, software vendors accept about resorted to architecture their own infrastructure. This agency assets that could accept been acclimated to add bigger functionality to the ERP arrangement or the acclaim agenda processing arrangement accept instead been adherent to autograph proprietary arrangement protocols.

In an accomplishment to bigger abutment such Internet scenarios, Microsoft initially adopted the action of assiduity its absolute technologies, including COM Internet Casework (CIS), which allows you to authorize a DCOM affiliation amid the applicant and the apprenticed basic over anchorage 80. For assorted reasons, CIS was not broadly accepted.

It became bright that a new admission was needed. So Microsoft absitively to abode the botheration from the basal up. Let’s attending at some of the requirements the band-aid had to accommodated in adjustment to succeed.

  • Interoperability The apprenticed account accept to be able to be captivated by audience on added platforms.
  • Internet friendliness The band-aid should plan able-bodied for acknowledging audience that admission the apprenticed account from the Internet.
  • Strongly typed interfaces There should be no ambiguity about the blazon of abstracts beatific to and accustomed from a apprenticed service. Furthermore, datatypes authentic by the apprenticed account should map analytic able-bodied to datatypes authentic by a lot of procedural programming languages.
  • Ability to advantage absolute Internet standards The accomplishing of the apprenticed account should advantage absolute Internet standards as abundant as accessible and abstain reinventing solutions to problems that accept already been solved. A band-aid congenital on broadly adopted Internet standards can advantage absolute toolsets and articles created for the technology.
  • Support for any language The band-aid should not be deeply accompanying to a accurate programming language. Java RMI, for example, is deeply accompanying to the Java language. It would be difficult to adjure functionality on a apprenticed Java article from Visual Basic or Perl. A applicant should be able to apparatus a new Web account or use an absolute Web account behindhand of the programming accent in which the applicant was written.
  • Support for any broadcast basic infrastructure The band-aid should not be deeply accompanying to a accurate basic infrastructure. In fact, you shouldn’t be appropriate to purchase, install, or advance a broadcast article basement just to physique a new apprenticed account or absorb an absolute service. The basal protocols should facilitate a abject akin of advice amid absolute broadcast article infrastructures such as DCOM and CORBA.

Given the appellation of this book, it should appear as no abruptness that the band-aid Microsoft created is accepted as Web services. A Web account exposes an interface to adjure a accurate action on account of the client. A applicant can admission the Web account through the use of Internet standards.

Web Casework Architecture Blocks

The afterward clear shows the bulk architecture blocks bare to facilitate apprenticed advice amid two applications.

Let’s altercate the purpose of anniversary of these architecture blocks. Because abounding readers are accustomed with DCOM, I will aswell acknowledgment the DCOM agnate of anniversary architecture block.

  • Discovery The applicant appliance that needs admission to functionality apparent by a Web account needs a way to boldness the area of the apprenticed service. This is able through a action about termed discovery. Analysis can be facilitated via a centralized agenda as able-bodied as by added ad hoc methods. In DCOM, the Account Ascendancy Manager (SCM) provides analysis services.
  • Description Once the end point for a accurate Web account has been resolved, the applicant needs acceptable advice to appropriately collaborate with it. The description of a Web account encompasses structured metadata about the interface that is advised to be captivated by a applicant appliance as able-bodied as accounting affidavit about the Web account including examples of use. A DCOM basic exposes structured metadata about its interfaces via a blazon library (typelib). The metadata aural a component’s typelib is stored in a proprietary bifold architecture and is accessed via a proprietary appliance programming interface (API).
  • Message format In adjustment to barter data, a applicant and a server accept to accede on a accepted way to encode and architecture the messages. A accepted way of encoding abstracts ensures that abstracts encoded by the applicant will be appropriately interpreted by the server. In DCOM, letters beatific amid a applicant and a server are formatted as authentic by the DCOM Article RPC (ORPC) protocol.

Without a accepted way of formatting the messages, developing a toolset to abstruse the developer from the basal protocols is next to impossible. Creating an absorption band amid the developer and the basal protocols allows the developer to focus added on the business botheration at duke and beneath on the basement appropriate to apparatus the solution.

  • Encoding The abstracts transmitted amid the applicant and the server needs to be encoded into the physique of the message. DCOM uses a bifold encoding arrangement to serialize the abstracts independent by the ambit exchanged amid the applicant and the server.
  • Transport Once the bulletin has been formatted and the abstracts has been after into the physique of the message, the bulletin accept to be transferred amid the applicant and the server over some carriage protocol. DCOM supports a bulk of proprietary protocols apprenticed to a bulk of arrangement protocols such as TCP, SPX, NetBEUI, and NetBIOS over IPX.

Web Casework Architecture Decisions

Let’s altercate some of the architecture decisions abaft these architecture blocks for Web services.

Choosing Carriage Protocols

The aboriginal footfall was to actuate how the applicant and the server would acquaint with anniversary other. The applicant and the server can abide on the aforementioned LAN, but the applicant ability potentially acquaint with the server over the Internet. Therefore, the carriage agreement accept to be appropriately ill-fitted to LAN environments and the Internet.

As I mentioned earlier, technologies such as DCOM, CORBA, and Java RMI are ill ill-fitted for acknowledging advice amid the applicant and the server over the Internet. Protocols such as Hypertext Transfer Agreement (HTTP) and Simple Mail Transfer Agreement (SMTP) are accurate Internet protocols. HTTP defines a request/response messaging arrangement for appointment a appeal and accepting an associated response. SMTP defines a routable messaging agreement for asynchronous communication. Let’s appraise why HTTP and SMTP are able-bodied ill-fitted for the Internet.

HTTP-based Web applications are inherently stateless. They do not await on a connected affiliation amid the applicant and the server. This makes HTTP an ideal agreement for high-availability configurations such as firewalls. If the server that handled the client’s aboriginal appeal becomes unavailable, consecutive requests can be automatically baffled to accession server after the applicant alive or caring.

Almost all companies accept an basement in abode that supports SMTP. SMTP is able-bodied ill-fitted for asynchronous communication. If account is disrupted, the e-mail basement automatically handles retries. Unlike with HTTP, you can canyon SMTP letters to a bounded mail server that will attack to bear the mail bulletin on your behalf.

The added cogent advantage of both HTTP and SMTP is their pervasiveness. Employees accept appear to await on both e-mail and their Web browsers, and arrangement administrators accept a top abundance akin acknowledging these services. Technologies such as arrangement abode adaptation (NAT) and proxy servers accommodate a way to admission the Internet via HTTP from aural contrarily abandoned accumulated LANs. Administrators will about betrayal an SMTP server that resides central the firewall. Letters acquaint to this server will again be baffled to their final destination via the Internet.

In the case of acclaim agenda processing software, an actual acknowledgment is bare from the merchant coffer to actuate whether the adjustment should be submitted to the ERP system. HTTP, with its request/response bulletin pattern, is able-bodied ill-fitted to this task.

Most ERP software bales are not able of administration ample volumes of orders that can potentially be apprenticed from the e-commerce application. In addition, it is not acute that the orders be submitted to the ERP arrangement in absolute time. Therefore, SMTP can be leveraged to chain orders so that they can be candy serially by the ERP system.

If the ERP arrangement supports broadcast transactions, accession advantage is to advantage Microsoft Bulletin Chain Server (MSMQ). As continued as the e-commerce appliance and the ERP arrangement abide aural the aforementioned LAN, connectivity via non-Internet protocols is beneath of an issue. The advantage MSMQ has over SMTP is that letters can be placed and removed from the chain aural the ambit of a transaction. If an attack to action a bulletin that was pulled off the chain fails, the bulletin will automatically be placed aback in the chain if the transaction aborts.

Choosing an Encoding Scheme

HTTP and SMTP accommodate a agency of sending abstracts amid the applicant and the server. However, neither specifies how the abstracts aural the physique of the bulletin should be encoded. Microsoft bare a standard, platform-neutral way to encode abstracts exchanged amid the applicant and the server.

Because the ambition was to advantage Internet-based protocols, Adaptable Markup Accent (XML) was the accustomed choice. XML offers abounding advantages, including cross-platform support, a accepted blazon system, and abutment for industry -standard appearance sets.

Binary encoding schemes such as those acclimated by DCOM, CORBA, and Java RMI accept to abode affinity issues amid altered accouterments platforms. For example, altered accouterments platforms accept altered centralized bifold representation of multi-byte numbers. Intel platforms adjustment the bytes of a multi-byte bulk application the little endian convention; abounding RISC processors adjustment the bytes of a multi-byte bulk application the big endian convention.

XML avoids bifold encoding issues because it uses a text-based encoding arrangement that leverages accepted appearance sets. Also, some carriage protocols, such as SMTP, can accommodate abandoned text-based messages.

Binary methods of encoding, such as those acclimated by DCOM and CORBA, are bulky and crave a acknowledging basement to abstruse the developer from the details. XML is abundant lighter weight and easier to handle because it can be created and captivated application accepted text-parsing techniques.

In addition, a array of XML parsers are accessible to added abridge the conception and burning of XML abstracts on about every avant-garde platform. XML is failing and has accomplished apparatus support, so XML encoding allows absurd ability because about any applicant on any belvedere can acquaint with your Web service.

Choosing a Formatting Convention

It is about all-important to cover added metadata with the physique of the message. For example, you ability wish to cover advice about the blazon of casework that a Web account needs to accommodate in adjustment to accomplish your request, such as enlisting in a transaction or acquisition information. XML provides no apparatus for appropriate the physique of the bulletin from its associated data.

Transport protocols such as HTTP accommodate an adaptable apparatus for attack data, but some abstracts associated with the bulletin ability not be specific to the carriage protocol. For example, the applicant ability forward a bulletin that needs to be baffled to assorted destinations, potentially over altered carriage protocols. If the acquisition advice were placed into an HTTP header, it would accept to be translated afore accepting beatific to the next agent over accession carriage protocol, such as SMTP. Because the acquisition advice is specific to the bulletin and not the carriage protocol, it should be a allotment of the message.

Simple Article Admission Agreement (SOAP) provides a protocol-agnostic agency of advertence attack advice with the physique of the message. Every SOAP bulletin accept to ascertain an envelope. The envelope has a physique that contains the burden of the bulletin and a attack that can accommodate metadata associated with the message.

SOAP imposes no restrictions on how the bulletin physique can be formatted. This is a abeyant affair because after a constant way of encoding the data, it is difficult to advance a toolset that abstracts you from the basal protocols. You ability accept to absorb a fair bulk of time accepting up to acceleration on the Web service’s interface instead of analytic the business botheration at hand.

What was bare was a accepted way of formatting a apprenticed action alarm (RPC) bulletin and encoding its account of parameters. This is absolutely what Section 7 of the SOAP blueprint provides. It describes a accepted allotment assemblage and encoding appearance for procedure-oriented messages.

Because SOAP provides a accepted architecture for serializing abstracts into an XML message, platforms such as ASP.NET and Remoting can abstruse abroad the abstracts for you.

Choosing Description Mechanisms

SOAP provides a accepted way of formatting letters exchanged amid the Web account and the client. However, the applicant needs added advice in adjustment to appropriately serialize the appeal and adapt the response. XML Action provides a agency of creating schemas that can be acclimated to call the capacity of a message.

XML Action provides a bulk set of congenital datatypes that can be acclimated to call the capacity of a message. You can aswell actualize your own datatypes. For example, the merchant coffer can actualize a circuitous datatype to call the agreeable and anatomy of the physique of a bulletin acclimated to abide a acclaim agenda transaction request.

A action contains a set of datatype and aspect definitions. A Web account uses the action not abandoned to acquaint the blazon of abstracts that is accepted to be aural a bulletin but aswell to validate admission and approachable messages.

A action abandoned does not accommodate abundant advice to finer call a Web service, however. The action does not call the bulletin patterns amid the applicant and the server. For example, a applicant needs to apperceive whether to apprehend a acknowledgment if an adjustment is acquaint to the ERP system. A applicant aswell needs to apperceive over what carriage agreement the Web account expects to accept requests. Finally, the applicant needs to apperceive the abode area the Web account can be reached.

This advice is provided by a Web Casework Description Accent (WSDL) document. WSDL is an XML certificate that absolutely describes a accurate Web service. Tools such as ASP.NET WSDL.exe and Remoting SOAPSUDS.exe can absorb WSDL and automatically physique proxies for the developer.

As with any basic acclimated to physique software, a Web account should aswell be accompanied by accounting affidavit for developers who affairs adjoin the Web service. The affidavit should call what the Web account does, the interfaces it exposes, and some examples of how to use it. Good affidavit is abnormally important if the Web account is apparent to audience over the Internet.

Choosing Analysis Mechanisms

Once you’ve developed and accurate a Web service, how can abeyant audience locate it? If the Web account is advised to be captivated by a affiliate of your development team, your admission can be appealing informal, such as administration the URL of the WSDL certificate with your associate a brace of cubicles down. But if abeyant audience are on the Internet, commercial your Web account finer is an absolutely altered story.

What’s bare is a accepted way to acquaint Web services. Universal Description, Discovery, and Integration (UDDI) provides just such a mechanism. UDDI is an industry-standard centralized agenda account that can be acclimated to acquaint and locate Web services. UDDI allows users to seek for Web casework application a host of seek criteria, including aggregation name, category, and blazon of Web service.

Web casework can aswell be advertised via DISCO, a proprietary XML certificate architecture authentic by Microsoft that allows Web sites to acquaint the casework they expose. DISCO defines a simple agreement for facilitating a hyperlink appearance for analysis resources. The primary customer of DISCO is Microsoft Visual Studio.NET. A developer can ambition a accurate Web server and cross through the assorted Web casework apparent by the server.

What’s Missing from Web Services?

You ability accept noticed that some key items begin aural a broadcast basic basement are not authentic by Web services. Two of the added apparent omissions are a categorical API for creating and arresting Web casework and a set of basic services, such as abutment for broadcast transactions. Let’s altercate anniversary of these missing pieces.

  • Web account -specific API A lot of broadcast basic infrastructures ascertain an API to accomplish such tasks as initializing the runtime, creating an instance of a component, and absorption the metadata acclimated to call the component. Because a lot of high-level programming languages accommodate some amount of interoperability with C, the API is usually apparent as a collapsed set of C adjustment signatures. RMI goes so far as to deeply brace its API with a alone high-level language, Java.

In an accomplishment to ensure that Web casework are programming language-agnostic, Microsoft has larboard it up to alone software vendors to bind abutment for Web casework to a accurate platform. I will altercate two Web account implementations for the.NET platform, ASP.NET and Remoting, after in the book.

  • Component services The Web casework belvedere does not accommodate abounding of the casework frequently begin in broadcast basic infrastructures, such as apprenticed article lifetime management, article pooling, and abutment for broadcast transactions. These casework are larboard up to the broadcast basic basement to implement.

Some services, such as abutment for broadcast transactions, can be alien after as the technology matures. Others, such as article pooling and possibly article lifetime management, can be advised an accomplishing detail of the platform. For example, Remoting defines extensions to accommodate abutment for article lifetime management, and Microsoft Basic Casework provides abutment for article pooling.


Component-based programming has accurate to be a benefaction to developer productivity, but some casework cannot be encapsulated by a basic that resides aural the client’s datacenter. Legacy technologies such as DCOM, CORBA, and Java RMI are ill-fitted to acceptance audience to admission casework over the Internet, so Microsoft begin it all-important to alpha from the basal and physique an industry-standard way of accessing apprenticed services.

Web services is an awning appellation that describes a accumulating of industry- accepted protocols and casework acclimated to facilitate a base-line akin of interoperability amid applications. The industry abutment that Web casework has accustomed is unprecedented. Never afore accept so abounding arch technology companies stepped up to abutment a accepted that facilitates interoperability amid applications, behindhand of the belvedere on which they are run.

One of the accidental factors to the success of Web casework is that they’re congenital on absolute Internet standards such as XML and HTTP. As a result, any arrangement able of parsing argument and communicating via a accepted Internet carriage agreement can acquaint with a Web service. Companies can aswell advantage the investment they accept already fabricated in these technologies.