This document generally relates to web services, and more particularly, to methods for locating web services.
Today, many applications are web accessible and web enabled. These types of applications are commonly referred to as web services. Web services reside on the Internet and allow client applications to access them and obtain information. Web services utilize several standards, such as Simple Object Access Protocol (SOAP), eXtensible Mark-up Language (XML), Web Services Description Language (WSDL), Universal Description Discovery and Integration (UDDI), and the like. These standards provide the mechanisms for tagging data, transferring the data, and identifying the web services. They also allow web services to operate independent of any specific operating system or protocol.
Typically, web services do not provide a graphical user interface (GUI) to the user. Rather, web services provide a programmatic interface over a network, such as the Internet, that allows organizations to share business logic, data, and processes. Thus, organizations can use web services to communicate data to clients without requiring the organizations to understand each client's information technology system.
Client applications that access a web service need to invoke the web service. The web service is invoked by inserting (also commonly referred to as hard coding) a Universal Resource Locator (URL) into the code for the client application. When the client application executes, this hard coded URL is used to invoke the web service over the Internet.
Unfortunately, over time, the location (i.e., URL) of a web service may change. When this occurs, the client application will be unable to access the web service and will, therefore, not operate properly. In addition, this hard coding makes it difficult to scale up (add servers) to support increased demands on the web service. Thus, until now, there has not been a satisfactory solution that allows a web service to re-locate without impacting the code of the client application that accesses the web service.
The techniques and mechanisms described herein are directed at locating web services. The techniques and mechanisms allow web services to re-locate without impacting the code of the client applications that access the web services. The client application sends a message that includes an identifier to a referral service. The referral service re-directs the message to a locater service based on the identifier. The locater service determines a set of locations associated with web services based on attributes associated with the client application. The attributes may include a client type, a client version, or a locale. The set of locations are transmitted to the client application for use in accessing the web services. Upon failing to access one of the web services identified within the set, the client application re-sends the message to obtain an updated set of locations.
Non-limiting and non-exhaustive embodiments are described with reference to the following figures, wherein like reference numerals refer to like parts throughout the various views unless otherwise specified.
Briefly, the present web service locater method allows web services to re-locate without impacting the code of client applications that access the web services. The web service locater method includes a referral service and a locater service. The referral service accepts an identifier from the client application. Based on the identifier, the referral service redirects the client application to a corresponding locater service. The locater service returns a list of locations for web services based on attributes associated with the client application. Different client applications may have different web services in their list. The client application then utilizes the list of locations when subsequently accessing one of the web services. If the client application experiences failures when invoking a web service, the client application may repeat the process in order to obtain an updated list of locations. As will be described in detail below, the web service locater method allows web services to re-locate without impacting the code for the client application. In addition, the locater method provides an easy mechanism for transitioning client applications from old web services to new web services. These and other advantages will become clear after reading the following detailed description.
Computing device 100 may have additional features or functionality. For example, computing device 100 may also include additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in
Computing device 100 may also contain communication connections 116 that allow the device to communicate with other computing devices 118, such as over a network. Communication connection(s) 116 is one example of communication media. Communication media may typically be embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Computer readable media can be any available media that can be accessed by a computer. By way of example, and not limitation, computer readable media may comprise “computer storage media” and “communications media.”
Various modules and techniques may be described herein in the general context of computer-executable instructions, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc. for performing particular tasks or implement particular abstract data types. These program modules and the like may be executed as native code or may be downloaded and executed, such as in a virtual machine or other just-in-time compilation execution environment. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments. An implementation of these modules and techniques may be stored on or transmitted across some form of computer readable media.
The web service locater method includes the client application 202, a referral service 204, and a locater service 206. These components communicate over a network 210, such as the Internet. The goal of the web service locater method is to identify one or more web services (e.g., web services 212-216) that the client application may access for information. However, as explained above, the location of these web services 212-216 may change over time. Therefore, the present web service locater method provides techniques and mechanisms for making these changes transparent to the client application.
The present web service locater method may also include storage 208 that is accessible by the locater service 206. The storage 208 maintains a current location for each web service 212-216. Using storage 208, the locater service 206 creates a locater service response document 218 that is sent back to the client application 202 when the client application invokes the locater service 206. The client application may then use information obtained from the locater service response document 218 to directly invoke any of the web services identified within the locater service response document 218.
There are two dash lined boxes 310 and 340. The first box 310 represents a process for invoking the locater service. The second box 340 represents a process for accessing web services. Both of these processes will know be explained in greater detail.
The process for invoking a locater service begins with arrow 312. At arrow 312, the client sends a message. The message includes an identifier associated with the client application. The message is sent to a referral service 304. In general, the referral service 304 is configured to translate the identifier and redirect the sender to another location associated with the locater service.
In one embodiment, the referral service may implement a FWLINK service provided by the Microsoft Corporation in Redmond, Wash. The FWLINK service is a re-direction service that is well-known to those skilled in the art. In order to provide continual support for FWLINK, the Microsoft Corporation plans to provide continual support for each URL associated with each id. However, for the present locater method, instead of providing continual support for each URL, the present method plans to provide continual supports for each id. For example, in this embodiment, the client application obtains a link identifier that it has stored. When the client application desires to invoke the locater service 306 (i.e., arrow 312), the client application performs an HTTP GET on the URL, such as in the following statement:
http:=//go.microsoft.com/fwlink/?linkid=XXXX&clcid=YYYY,
where XXXX represents an identifier that determines a location for the locater service.
Different server environments (e.g., Production, Preview, and Test) may each have different identifiers. In addition, each developer may have a personal identifier that allows personal installations. The identifier supplied by the client application may be “hard-coded”, overwritten via a registry key setting, or populated by some other means. YYYY represents the locale id. The locale id allows the referral service to provide internationalizations or localizations when re-directing the client application. In one embodiment, in which FWLINK is utilized as the referral service, the locale id may be removed so that the locale id is not sent to the locater service. If the locale id is unknown, a default value may be used.
At arrow 314, a re-direct message (e.g., an HTTP redirect) is sent to the client application. The re-direct message includes a location (e.g., a URL) for the locater service. The location for the locater service is based on the identifier provided by the client application. When the client receives the re-direct message, the client handles the redirection. When the location is specified via a URL, the client may handle the redirection via the HTTP stack. In the past, the referral service (e.g., FWLINK) would have provided a URL which would have re-directed the client application directly to the web service. However, in accordance with the present locater service method, the location provided by the referral service redirects the client application to a locater service. Processing continues at arrow 316.
At arrow 316, the client sends a message that invokes the location provided in the re-direct message. The message may include several attributes, such as the identifier initially sent in the original message, a locale, a client type and/or a client version. The locale may be a string version of the locale id included in the original message. The client version represents a build number of the client application and allows the locater service 306 to return different lists based on different client versions. In summary, arrows 312-316 represent the mechanism that allows the client to send one message via the client application which will ultimately invoke the locater service 306. Processing continues as arrow 318.
At arrow 318, the locater service utilizes the information obtained from the message in arrow 316 to create a locater service response document. Briefly, described in detail below in conjunction with
At 320, the client persists the information provided in the locater service response document in some manner. The creation and transmission of message 316 may take the form of a serialized version of a response object that resides in the locater service 306. In this case, client 302 deserializes the response message 318 to re-create the response object in its memory. This response object may then be persisted. For example, in one embodiment, the serialization and deserialization may be performed using the SOAP protocol with the intermediatry message 318 being an XML-based SOAP document.
As described, process 310 allows the client application to send one message with an identifier to obtain a list of locations that are available to it. Thus, the client application does not have to incur the expense of performing redirection to obtain a location for each web service that it may need. Instead, the client application may invoke the location service once and then access the web services multiple times, such as shown in process 340 and described below.
Process 340 is a process for accessing the web services identified within the locater service response document. At arrow 342, the client invokes a web service using a local copy of a URL or URLs obtained form within the locater service response document. The web service 308 responds at arrow 344 with the desired information.
Although process 340 only illustrates one access of a web service, one will appreciate that multiple accesses to the same or different web services may occur. However, when one of the locations for one of the web services is changed, the client application will experience an error, such as an HTTP 404 response. When this occurs, logic within the client application may perform process 310 again in order to get an updated location for each of the web services. The updated information is then persisted at 320 and used for subsequent accesses to the web services. The client application may include logic that only attempts to perform process 310 once within some interval of time. Otherwise, the client application may potentially get in a continuous loop.
Those skilled in the art will appreciate that the locater service response document may take various formats other than the one illustrated in
These and other variations for the locater service response document are envisioned.
Thus, as described, the present locater service method allows web services to re-locate without impacting the code of the client application. In addition, an added benefit is the ability to easily change the set of web service locations by changing the location associated with the identifier sent by the client application. This ability to change the set of web services is useful when transitioning client applications from old services to new services.
As mentioned above, in one exemplary embodiment, the referral service may implement a re-direction technique provided by the FWLINK service. For this embodiment, the locater service may be a standard Microsoft® .NET Web Service that operates on a sever running Microsoft® IIS 6.0 and the Microsoft® .NET Framework. However, those skilled in the art will appreciate that the teachings of the present web service locater method may be integrated into other environments without departing from the claimed invention.
Reference has been made throughout this specification to “one embodiment,” “an embodiment,” or “an example embodiment” meaning that a particular described feature, structure, or characteristic is included in at least one embodiment of the present invention. Thus, usage of such phrases may refer to more than just one embodiment. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
One skilled in the relevant art may recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, resources, materials, etc. In other instances, well known structures, resources, or operations have not been shown or described in detail merely to avoid obscuring aspects of the invention.
While example embodiments and applications have been illustrated and described, it is to be understood that the invention is not limited to the precise configuration and resources described above. Various modifications, changes, and variations apparent to those skilled in the art may be made in the arrangement, operation, and details of the methods and systems of the present invention disclosed herein without departing from the scope of the claimed invention.
Number | Name | Date | Kind |
---|---|---|---|
6014090 | Rosen et al. | Jan 2000 | A |
6183159 | Hashimoto et al. | Feb 2001 | B1 |
6185598 | Farber et al. | Feb 2001 | B1 |
6360262 | Guenthner et al. | Mar 2002 | B1 |
6389462 | Cohen et al. | May 2002 | B1 |
6477567 | Ohara | Nov 2002 | B1 |
6477576 | Angwin et al. | Nov 2002 | B2 |
6604140 | Beck et al. | Aug 2003 | B1 |
6741188 | Miller et al. | May 2004 | B1 |
6799214 | Li | Sep 2004 | B1 |
6883068 | Tsirigotis et al. | Apr 2005 | B2 |
6968179 | De Vries | Nov 2005 | B1 |
7069310 | Bartholomew | Jun 2006 | B1 |
7076558 | Dunn | Jul 2006 | B1 |
20030097425 | Chen | May 2003 | A1 |
20040030921 | Aldridge et al. | Feb 2004 | A1 |
20040139170 | Shen et al. | Jul 2004 | A1 |
20040163088 | Frender et al. | Aug 2004 | A1 |
20050015491 | Koeppel | Jan 2005 | A1 |
Number | Date | Country | |
---|---|---|---|
20060020692 A1 | Jan 2006 | US |