Routing of service requests across multiple target services and ports within a service
Original Publication Date: 2002-Sep-16
Included in the Prior Art Database: 2003-Jun-21
Through a WSDL (Web Services Description Language) document, it is possible to describe a service interface (portType) and multiple implementations (ports) that can be used to connect to that service, using possibly different bindings to transport protocols. By using the Web services Gateway (WSGW) it is possible to define a mapping between a virtual ("gateway") service provided by the WSGW, and multiple target services, each implementing the same portType, but providing different ports to access the service, on potentially different transport bindings. If a gateway service is fronting multiple target services(n), and each target service provides multiple ports(m), then a 1-n-m choice of paths is possible for routing a request to the virtual service. This invention describes a means by which a service request might be routed to a particular port instance dynamically at runtime. The advantage of this approach is that it does not require a comprehensive set of statically defined routing rules, and can be determined programmatically. The invention uses the notion of Filters, that are pluggable programs that can be invoked between the gateway service receiving a request and it then invoking a particular port instance to service the request. When the WSGW receives the request through one of its channels, it translates the request into a normalized form including the body of the request and any associated context that went with the request, such as sender/receiver identity, transport headers, transaction ids, correlation ids etc.. This information is available to the filters on invocation. The filters can be selectively chosen to be invoked in a serial order for the request, and a potentially different list of filters to handle the response. The invention defines a specific class of filter designed to specifically determine routing information (routing filter). Any given service request may pass through one or more routing filters. The job of the routing filter is to determine (or aid in ultimately determining) a target port to service the request. The routing filter has access to the WSGWs mapping table of gateway services to target services, access to the WSDL for each of those target services to be able to determine the possible ports available at each of those services, and access to identification information for the target service (each target service instance for each gateway service has a configurable identification attribute which may contain information such as the identity of the partner that owns the target service). By looking at the context, content, and identify information, or combination of these, it is possible for the routing filter to decide which target service/port instance to route the request to, using whatever criteria for selection the routing filter developer has chosen.