1. Field of the Invention
The field of the invention is data processing, or, more specifically, methods, systems, and products for port type agnostic proxy support for web services intermediaries.
2. Description of Related Art
The term “web services” refers to a standardized way of integrating web-based applications. Web services typically provide business services upon request though data communications in standardized formats called bindings. A binding is a specification of a data encoding method and a data communications protocol. The most common binding in use for web services is data encoding in XML according to the SOAP protocol and data communications with HTTP.
Unlike traditional client/server models, such as an HTTP server that provides HTML documents in response to requests from browser clients, web services are not concerned with display. Web services instead share business logic, data, and processes through a programmatic interface across a network. Web services applications interface with one another, not with users. Because all data communications among web services are carried out according to standardized bindings, Web services are not tied to any one operating system or programming language. A Java client running in a Windows™ platform can call web service operations written in Perl and running under Unix. A Windows application written in C++ can call operations in a web service implemented as a Java servlet.
Today web services are growing across many industries. As web services grow in importance, web services intermediaries are increasingly recognized as means to provide many value-added services. A web services intermediary, generally referred to in this specification as an “intermediary,” is a web services component that lies between a web services client and a web services provider. Intermediaries operate generally by intercepting a request from a client, providing intermediary services, and then forwarding the client request to a web services provider. Similarly, responses from the web services provider are intercepted, operated upon, and then returned to the client. Examples of commercially available products with which web services intermediaries may be implemented include IBM's Web Services Gateway™ and IBM's Web Services BUS™.
Services provided by intermediaries include authentication of sources of requests for target services, message validation for content and for form, and message logging for auditing purposes. Intermediaries may provide management reporting services, number of web service hits, quantity and timing of services used by individual clients, and so on. Intermediaries can be used as caches in support of improved performance by storing frequently changing but frequently requested data such as news stories, for example. Intermediaries can be used for performance improvement in the sense of load balancing, storing requests for services from several clients and forwarding them to a target service during off-peak service hours. Intermediaries may aggregate services, as, for example, an accounting intermediary that accepts requests for account postings that are then forwarded to separate target services for accounts payable, accounts receivable, and general ledger services.
It is common in prior art to implement web services intermediaries so that they are tightly coupled to their target services. That is, a particular intermediary provides intermediary services only to particular target web services. The need for this is clear when, for example, the intermediary provides message validation and must therefore have precise knowledge of proper message content and form. In the terminology of web services, a group of operations is referred to as a “port type.” In this terminology, the restriction of tight coupling means that commonly in prior art, an intermediary service and all target services served by the intermediary service would have the same port type. There are situations, however, where it is useful for an intermediary service to function across port types, such as, for example, a client identity authentication function intended to provide exactly the same authentication function on messages directed to any target service, regardless of port type. Prior art forces additional configuration complexity in such cases, and there is an ongoing need for improvement in web services intermediaries.
Methods, systems, and products are disclosed in which port type agnostic proxy support for web services intermediaries is provided generally by receiving in a web services intermediary a request for execution of a web services operation, wherein the request includes parametric information from which an endpoint for a target service that supports the operation can be identified; identifying, in dependence upon the parametric data, the endpoint for a target service that supports the operation; creating a target service request for execution of the operation on the target service; and issuing the target service request to the target service. In many embodiments the target service request as created and issued to the target service bears unexamined and unmodified message contents of the request received in the web services intermediary. Exemplary embodiments typically also include the return path of request-response processing: receiving in the intermediary a response from the target service; creating in the intermediary, in dependence upon the response from the target service, a response from the intermediary; and returning the response from the intermediary to the requesting client.
Typical embodiments of the present invention also include identifying to a requester an endpoint of the web services intermediary as an endpoint that supports the operation. In such embodiments, parametric information often includes a port type for the operation. In addition, identifying an endpoint for a target service that supports an operation often also includes identifying, in dependence upon the parametric information, a multiplicity of endpoints of target services that support the operation and selecting one endpoint from the multiplicity of endpoints in accordance with selection rules. Identifying a multiplicity of endpoints of target services that support an operation may be carried out by identifying from a registry, in dependence upon a port type, a multiplicity of target services for the port type. Selecting one endpoint from the multiplicity of endpoints may include selecting one endpoint from the multiplicity of endpoints in accordance with selection rules for load balancing among target services.
Creating a target service request for execution of the operation on the target service may be carried out by composing the request in a data structure useful in a binding-neutral interface and calling the binding-neutral interface, passing the request as a call parameter. Issuing the target service request to the target service may include calling one or more member methods in a binding-neutral interface.
The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular descriptions of exemplary embodiments of the invention as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts of exemplary embodiments of the invention.
The present invention is described to a large extent in this specification in terms of methods for port type agnostic proxy support for web services intermediaries. Persons skilled in the art, however, will recognize that any computer system that includes suitable programming means for operating in accordance with the disclosed methods also falls well within the scope of the present invention. Suitable programming means include any means for directing a computer system to execute the steps of the method of the invention, including for example, systems comprised of processing units and arithmetic-logic circuits coupled to computer memory, which systems have the capability of storing in computer memory, which computer memory includes electronic circuits configured to store data and program instructions, programmed steps of the method of the invention for execution by a processing unit.
The invention also may be embodied in a computer program product, such as a diskette or other recording medium, for use with any suitable data processing system. Embodiments of a computer program product may be implemented by use of any recording medium for machine-readable information, including magnetic media, optical media, or other suitable media. Persons skilled in the art will immediately recognize that any computer system having suitable programming means will be capable of executing the steps of the method of the invention as embodied in a program product. Persons skilled in the art will recognize immediately that, although most of the exemplary embodiments described in this specification are oriented to software installed and executing on computer hardware, nevertheless, alternative embodiments implemented as firmware or as hardware are well within the scope of the present invention.
A “business registry,” as the term is used in this specification, is an Internet directory of web services containing listings of businesses and the web services offered by the businesses. The listings of the web services include supported operations, port types, endpoints, bindings, and so on. Some business registries are based on open standards such as ebXML, and some are based on industry consortium-led specifications such as UDDI. Businesses can register themselves with a registry. Businesses can submit material to be shared through a registry, and registry clients can search for material that others have submitted. Business registries may be accessed and searched manually through browsers or programmatically through APIs which themselves may be web services. Registries are becoming an increasingly important component of Web services because they allow businesses to collaborate with one another dynamically in a loosely coupled way.
HTTP means “HyperText Transfer Protocol, the most common data communications protocol on the web. In this specification, the term “web,” however, is not limited to HTTP communications, but also may include communications with other protocols that support similar modes of communication such as HDTP, the Handheld Device Transfer Protocol, or WAP, the Wireless Access Protocol, and others as will occur to those of skill in the art.
“SOAP” means “Simple Object Access Protocol,” a lightweight XML-based messaging protocol used to encode the information in Web service request and response messages before sending them over a network. SOAP messages are independent of any operating system or protocol and may be transported using a variety of Internet protocols, including SMTP, MIME, and HTTP.
“UDDI” means “Universal Description, Discovery and Integration,” a web-based distributed directory that enables businesses to list themselves on the Internet and discover each other, similar to a traditional phone book's yellow and white pages.
“WSDL” means “Web Services Description Language.” WSDL is an XML-formatted language that was developed jointly by Microsoft and IBM and is used to describe a Web service's capabilities as collections of communication endpoints capable of exchanging messages. WSDL is an integral part of UDDI in that UDDI uses WSDL to describe web services' capabilities.
“ebXML” means “electronic business Extensible Markup Language,” a modular suite of specifications for standardizing descriptions of web services in XML to facilitate trade electronic commerce. Like UDDI, the ebXML specification gives businesses a standard method to define and register web services.
This specification generally describes components of web services with a terminology similar to that of WSDL. Web services are described as collections of network endpoints, endpoints of data communications, capable of exchanging messages. Endpoints are sometimes referred to as “ports.” In this specification generally, however, the term “endpoint” is preferred to “port,” to reduce the risk of confusion with the term “port type.” A port type is not a type of port or a type of endpoint. A port type is a collection of “operations,” that is, software actions or functions, supported by a service.
A particular communications protocol and a data format specification for a port type constitute a “binding.” An example of a binding is SOAP/HTTP, with message data encoded according to SOAP and messages communicated among endpoints according to HTTP. Another example of a binding is GET/POST/HTTP, with message data encoded in GET or POST messages and data communications carried out according to HTTP.
Each port type may have more than one binding. An endpoint is defined by associating a network address with a binding, and, as mentioned, a collection of endpoints define a service. Communication of data and requests for operations in web services is carried out through data structures called “messages,” which in turn are composed of “parts.” The terms “request” and “response” are generally indications of the direction of message flow. Request messages and response messages for a particular binding may have the same structure.
With reference to the accompanying drawings, methods, systems, and products are described for port type agnostic proxy support for web services intermediaries, beginning with
The client/server distinction must be used carefully in the context of web services. In the architecture of
In order for intermediary (202) to provide intermediary services on behalf of target service (118), intermediary (202) must know an endpoint on target service (118). As mentioned above, in prior art, a service, called a “proxy,” running on intermediary (202) would support the same port type as the target service (118) and would have in its configuration data an endpoint for target service (118). In the architecture of
Intermediary (202) includes an inbound engine (208) capable of receiving from a requester (102) a request (106), including parametric information (107), for execution of a web services operation. Here is an example of such a request for the SOAP-HTTP binding:
This exemplary POST message includes a SOAP envelope requesting the ‘myOp’ operation from the intermediary. That is, the name of the operation to be executed on a target service (118) is identified internally within the soap message. The myOp operation, its port type, and it endpoint are all unknown to the intermediary before the request is received. In this example, the parametric information (107) from which an endpoint for a target service (118) that supports the operation can be identified is set forth in a name-value pair in the URI-encoded query string in the first line of the POST: “portType=A.”
In addition to receiving from a requester (102) a request (106), including parametric information (107), for web services, inbound engine (208) also has a capability of providing the request, including its parametric data, to port type agnostic proxy (212). Consider as an example of inbound engine operation, the exemplary request set forth just above. That exemplary request is bound as SOAP-HTTP. For this exemplary request, therefore, inbound engine may be a SOAP-enabled HTTP server that hands off an incoming request to a proxy (212) implemented as any kind of server-type application, including for example, a Java Bean, a Java servlet or a CGI (Common Gateway Interface) script written in Perl. Java servlets and CGI scripts are mentioned only for explanation, not for limitation. Within the scope of the present invention, any kind of server-side functionality as will occur to those of skill in the art may be used to implement port type agnostic proxy functions for web services intermediaries.
Port type agnostic proxy (212) may be hard coded to operate exclusively as a port type agnostic proxy, or, alternatively, port type agnostic proxy (212) may operate modally in dependence upon configuration parameters (223). A configuration parameter may be provided to indicate whether port type agnostic proxy (212) is to operate as a traditional intermediary service or in port type agnostic mode. Such a configuration parameter advantageously promotes efficient program coding including particularly reuse of code segments that might be utilized in both modes. Another configuration parameter supporting efficient use of program code is a parameter identifying a binding or ‘channel type’ for a proxy. As explained in more detail below, port type agnostic proxies may operate with any binding supported by web services, SOAP, MIME, GET/POST/HTTP, and so on. Port type agnostic proxy may be coded to operate with any binding or channel type and then configured with a parameter advising the proxy of its binding or channel type for run time operations. In addition, a configuration parameter may be provided to turn on or off any intermediary services in the proxy that would require parsing the contents of a request or response message. Such a parameter advantageously may be used to optimize performance because parsing message contents has a tendency to slow intermediary performance. Many port type agnostic proxies as well as other intermediary services may operate simultaneously in intermediary (202), and names for each may be assigned as configuration parameters. Messages handlers and filters may be assigned to proxies in configuration parameters. This paragraph describes several configuration parameters for port type agnostic proxies by way of explanation, not limitation. The use of any configuration parameters as will occur to those of skill in the art is well within the scope of the present invention.
Alternatively, an incoming request may be bound with GET/HTTP rather than SOAP. In such an example, proxy (212 on
In SOAP based web services, the SOAP message itself contains the name of the operation and the parameters for the operation; they are not in the endpoint URL. It is useful for the intermediary to receive parametric information such as the portType parameter. That parameter may be something as simply as the name of the portType. If such a case, then some ‘business logic’ that runs in the server (in a handler, for example, or even in the proxy function itself) must choose the actual endpoint URL for the target service (118) based on the port type or other parametric information. The parametric information may even include an actual endpoint URL. In that case, the ‘business logic’ could ultimately send the request to that URL. Both port type and endpoint URL could be present in the parametric information, and the ‘business logic’ may then attempt to determine an endpoint URL and use the one in the request as a default if nothing better is found. The invention allows all three scenarios as well as any variants that can be controlled by the business logic. Always there may be other parameters that help control the ‘business logic.’
Although this specification tends to discuss exemplary bindings in terms of the SOAP/HTTP binding and sometimes in terms of the GET/POST/HTTP binding, the discussion of these exemplary bindings is for convenience of explanation and not as a limitation of the invention. Alternative exemplary bindings useful according to various embodiments of the invention include MIME/SMTP (Multipart Internet Mail Extensions over the Small Message Transport Protocol) and RMI/IIOP (Java's Remote Method Invocation over the Common Object Request Broker Architecture's Internet Inter-ORB Protocol). In fact, within the scope of the present invention, an arbitrary Java class may be treated as a Web service, with native Java invocations as the access protocol, and the use in port type agnostic proxies of any other binding as will occur to those of skill in the art is well within the scope of the present invention.
In the exemplary intermediary (202) of
In the exemplary intermediary (202) of
In order to provide its intermediary services, the intermediary advantageously is capable of identifying an endpoint for a request. A method for doing so is discussed with reference to
Here again is an example of such a request for the SOAP-HTTP binding:
This exemplary POST message includes a SOAP envelope requesting the ‘myOp’ operation from the intermediary. The myOp operation, its port type, and its endpoint are all unknown to the intermediary before the request is received. In this example, the message is taken as the SOAP envelope, and the parametric information (107) from which an endpoint for a target service that supports the operation can be identified is the HTTP parameter “portType=A.” In this example, because the name of the operation on the target service is already encoded in the SOAP envelope, the only parametric data to be added is the port type “A,” a port type that includes the operation on the target service.
The method of
The illustrated method includes creating (112) a target service request (114) for execution of the operation on the target service. In this example, the intermediary is programmed to create a target service request as an HTTP POST message using the endpoint on the target service. The parametric data for identifying an endpoint is deleted, and the request is directed to a script for handing SOAP messages that will itself identify the operation from the operation name in the SOAP envelope. The resulting target service request is the following:
The method of
It is useful to note, that in at least some embodiments of the present invention, in methods of port type agnostic proxy support such as the one illustrated in
By way of further explanation, an exemplary request is presented for the GET/HTTP binding, directed to an endpoint at http://www.myIntermediary/channelApps/GET-TTP/servlets/proxy. The exemplary incoming request message has this form:
And in URI space, the exemplary request may be shown as:
In this example, the message is taken as the URI-encoded query data “message=messageContentString” encoded as a name-value pair. The message content is a URI-encoded string. In this example, the parametric information (107) from which an endpoint for a target service that supports the operation can be identified is all the query data following the message content string. In this example, the query data includes both port type of “A” and the name of an operation on a target service.
In this example, identifying (108) the endpoint (110) of a target service that supports the operation is carried out by retrieving an endpoint description from a business registry such as a UDDI registry or a ebXML registry. In this example, the intermediary retrieves from a registry an endpoint of port type A described as bound by GET/HTTP at network address http://www.myTarget.com.
The method of
The method of
Readers of skill in the art are wondering how the requester knows to send to the intermediary a request for an operation on the target service. The answer is that the intermediary or a developer of the intermediary identifies to the requester an endpoint of the web services intermediary as an endpoint that supports the operation on the target service. An identification of an endpoint of the intermediary as an endpoint that supports the operation on the target service can be implemented in a WSDL document that is registered in a business directory for discovery by the requester. Alternatively, such an identification can be downloaded from the intermediary to the requester—or even simply emailed to the requester, or to the requester's administrator, for installation by an administrator in the requester's web services configuration data.
Consider an example in which a target service is described by the following segment of WSDL pseudocode:
An intermediary for that target service may identify to a requester an endpoint of the web services intermediary as an endpoint that supports the operation on the target service by replacing the location attribute of the address extension element in the target service description follows:
thereby creating a WSDL document exemplified by the following segment:
which identifies an endpoint of a web services intermediary as an endpoint that supports the “getQuote” operation on the target service. Providing WSDL of the kind exemplified by this latter segment to a requester, through a registry, a download, email, or by other means as will occur to those of skill in the art, identifies to the requester an endpoint of the web services intermediary as an endpoint that supports the operation on the target service.
In the method of
When two or more endpoints are so identified, methods for port type agnostic proxy support for web services intermediaries according to embodiments of the present invention typically include selecting one of the endpoints in accordance with selection rules. In a trivial case, a selection rule may be to select the first of the endpoints so identified and disregard the others. Selection rules may be more complex, including, for example, selection rules for load balancing. Rules for load balancing may be implemented by use of a data structure similar to that shown in Table 1.
Each row in Table 1 represents a latency measurement for a request-response round trip in web services data communications between an intermediary and a target service. Table 1 provides columns for the port type and the endpoint URI for each round of request and response. The Send Time column records the time when a request message is issued from the intermediary to an endpoint on a target service for an operation of a port type. The Receive Time column records the time when a corresponding response message is received from the target service. Trip Latency is the difference between the Receive Time and the Send Time. Cumulative Latency is a running sum of Trip Latencies for each endpoint represented in the table. With a structure similar to Table 1, selection rules for use when more than one endpoint for a request is identified may be implemented as the following exemplary rules:
The exemplary data in Table 1 shows cumulative latency for requests recently sent for port type A to two endpoints, a first endpoint at URI http://www.ibm.com/aTargetService and a second endpoint at URI http://www.ibm.com/anotherTargetService. The first has a cumulative request latency of 250 milliseconds, and the second has a cumulative request latency of 100 milliseconds. Using the exemplary selection rules set forth above, a current request for an operation on port type A would be routed to the second endpoint, the one at URI http://www.ibm.com/anotherTargetService.
In the method of
A binding-neutral interface is one in which the use of the interface does not depend upon request or message binding. That is, the data structures and calling methods used to implement the interface and to carry out data communications through it, do not depend upon type of data encoding used in a message nor do they depend upon the data communications protocol used for a message. Developers of port type agnostic proxies for intermediaries according to embodiments of the present invention will often build their own binding-neutral interfaces. There is an open standard for a binding-neutral interface, however, known as “WSIF,” the Web Service Invocation Framework. WSIF is now supported as part of the Apache Software Foundation's Web Services Project.
The use of a binding-neutral interface provides advantages for embodiments of the present invention. The SOAP-HTTP binding is so common in current art that users and developers sometimes forget that any other bindings exist. This results in development of systems that are very difficult if not impossible to use with other bindings or to adapt for use with other bindings. As web services grow, however, other bindings will become more useful and more common. Using a binding-neutral interface for the back end of embodiments of the present invention, moreover, also means that available bindings can be determined at run time, thereby providing a flexible, powerful, and more generally useful web services intermediary.
One way to implement a binding-neutral interface is to provide endpoint objects that are capable of invoking services in target services given a port type and an endpoint. One way to provide such endpoint objects is by use of an endpoint factory similar to the one illustrated in the following pseudocode segment:
The endpoint classes Endpoint1, Endpoint2, Endpoint3, and so on, are concrete classes that inherit an abstract endpoint class (or implement it as an interface) that provides member methods for creating message objects to contain message parts. Such an endpoint factor and other elements in such a binding-neutral interface may be used to carry out the steps of creating (112) a target service request (114) and issuing (116) the target service request (114) to the target service as illustrated in the following pseudocode segment:
This exemplary pseudocode segment, given a port type and a network address for an endpoint, calls an endpoint factory to create an endpoint object. The segment then creates a target service request by loading messages parts into the endpoint object, and issues the target service request to the target service by calling the member method executeRequestResponseOperation( ). The method of
The example pseudocode segments above illustrate the use of a binding-neutral interface with ports referred to as endpoints. WSIF interface syntax, however, uses the term “port” when referring to endpoints. By way of further explanation regarding use of binding-neutral interfaces, therefore, a further exemplary pseudocode segment is presented, more closely adhering to the WSIF standard. In this example, “port” is used to mean “endpoint,” and for consistency of explanation, the name of the factory is changed to “portFactory.”
Although this specification discusses exemplary methods of port type agnostic proxy support in web services intermediaries primarily in terms of processing a request on its way from a requester to a target service, it is useful to note that intermediaries according to embodiments of the present invention also typically are capable of processing response messages making their way back from a target service through the intermediary to the original requester. The method of
It will be understood from the foregoing description that modifications and changes may be made in various embodiments of the present invention without departing from its true spirit. The descriptions in this specification are for purposes of illustration only and are not to be construed in a limiting sense. The scope of the present invention is limited only by the language of the following claims.
This application is a continuation application of and claims priority from U.S. patent application Ser. No. 10/734,773 filed on Dec. 12, 2003.
Number | Name | Date | Kind |
---|---|---|---|
6360262 | Guenthner et al. | Mar 2002 | B1 |
7139811 | Lev Ran et al. | Nov 2006 | B2 |
20020178214 | Brittenham et al. | Nov 2002 | A1 |
20030061404 | Atwal et al. | Mar 2003 | A1 |
20030135628 | Fletcher et al. | Jul 2003 | A1 |
20030204645 | Sharma et al. | Oct 2003 | A1 |
20040172555 | Beringer et al. | Sep 2004 | A1 |
20040205765 | Beringer et al. | Oct 2004 | A1 |
Number | Date | Country | |
---|---|---|---|
20090024701 A1 | Jan 2009 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 10734773 | Dec 2003 | US |
Child | 12206369 | US |