1. Technical Field
The present invention relates to communication with handheld computing devices. Specifically, the present invention is directed to a system and method for invoking web services on a handheld device.
2. Background Art
Since the introduction of the World Wide Web and the subsequent commercialization of the Internet, the world has become a considerably more connected place. No longer bound to the primitive communications interfaces of the past, the Internet is now host to a variety of powerful communications media, including interactive hypertext browsing (the World Wide Web), instant messaging, streaming video and audio, and multimedia electronic mail.
The largest and best-known repository of information on the Internet is the World Wide Web, a loosely bound collection of publicly accessible hypertext documents stored on computers the world over. The World Wide Web has become the preferred Internet medium for publishable information as well as for providing such interactive features as online shopping-to the extent that the terms Internet and World Wide Web are virtually synonymous to some. Resources on the World Wide Web are addressed by URL (Uniform Resource Locator).
Browsers can download hypertext documents from a server with the HyperText Transfer Protocol (HTTP) HTTP allows a browser to request documents or files from a server, in accordance with the documents' or files' URLs, and receive a response. In addition, when browser users enter information into a form embedded into a hypertext page, the browser transmits the information to a server using HTTP. Form information can then be passed along to applications residing on the server by way of the Common Gateway Interface (CGI) or through other mechanisms, such as server-side script languages like PHP. Those applications can then return a result, which may be written in HTML. The interactive nature of the World Wide Web has made it increasingly commonplace to conduct business and legal transactions over the Internet.
The popularity of conducting transactions over the Web has led to an increasing demand for businesses to integrate their Internet applications with Internet applications of other businesses. However, these Internet applications are often implemented using proprietary software written in differing programming languages and having proprietary formats for representing data.
Standardized “web services” represent one significant solution to this problem. Strictly speaking, a web service is a URL-accessible resource that returns information in response to client requests. As the term is most commonly used, however, a web service is an application that accepts remote procedure calls (RPCs) through a protocol in which information is encoded in an XML-based format. XML stands for extensible Markup Language. XML is a standard for representing data in a hierarchical format based on markup tags. One popular XML-based web services protocol is the Simple Object Access Protocol (SOAP).
SOAP is a protocol for exchange of information in a decentralized, distributed environment and consists of three parts: (i) an envelope that defines a framework for describing what is in a message and how to process it; (ii) a set of encoding rules for expressing instances of application-defined data types; and (iii) a convention for representing remote procedure calls and responses. To access our web service, a client transmits a SOAP envelope in an HTTP request. The web service sends a SOAP reply over the same HTTP connection.
Since web services protocols such as SOAP are intended to operate on top of HTTP, web services typically must rely on an HTTP server (generally a web server or application server) to handle the transport of SOAP requests and replies. While this is generally not a problem for larger-scale computer systems, such as a dedicated web server, the computing resources (memory, disk space, etc.) required to support a typical HTTP server far exceed the capabilities of smaller mobile and handheld devices. Nonetheless, it would be advantageous to allow a small-scale computing device to support web services, since it would allow advanced business systems to adopt a “push” model of information transmission. The present invention provides a solution to this and other problems, and offers other advantages over previous solutions.
A preferred embodiment of the present invention provides a method, computer program product, and data processing system for invoking web services on handheld or mobile devices. Because handheld devices have a limited amount of computing resources, they are not suitable for hosting the large HTTP (HyperText Transfer Protocol) servers usually utilized for providing web services. Preferred embodiments of the present invention utilize various strategies to allow web services to be invoked on a handheld device using SOAP (Simple Object Access Protocol) in the absence of an HTTP server. In one embodiment, Mobile Data Service (used by handheld computing devices manufactured by Research In Motion, Inc., or “RIM”) is used to push a SOAP envelope to a handheld device in the form of an MDS (Mobile Data Service) message. In another embodiment, a requesting application server generates a key in addition to the SOAP envelope for the request. The mobile device is sent a message via Short Message Service (SMS) containing the key, and the mobile device uses the key to retrieve or “pull” the SOAP envelope for the request. In yet another embodiment, SOAP envelopes are transmitted as raw data to a handheld device on a particular designated TCP (Transmission Control Protocol) port. In this case, the handheld device recognizes that it has received a SOAP envelope by virtue of the fact that the data was received on the designated port.
These and various other features and advantages that characterize the present invention will be apparent upon reading of the following detailed description and review of the associated drawings.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
The following is intended to provide a detailed description of an example of the invention and should not be taken to be limiting of the invention itself. Rather, any number of variations may fall within the scope of the invention which is defined in the claims following the description.
In
When one of web services 108, 110, and 112 needs to invoke a remote web service (such as web service 100) on handheld device 104, the invoking web service generates a request in a web services protocol to execute the remote web service. Some common web services protocol standards that may be employed for this purpose include SOAP (Simple Object Access Protocol) and XML-RPC (extensible Markup Language-Remote Procedure Call). Both of these protocols allow remote procedure calls to be requested (and the results returned) using an XML-based data format.
Device gateway 118 relays the web services request (typically in the form of a SOAP envelope) to Blackberry Enterprise Server (BES) 120, which transmits the request via MDS, through firewall 121, to one or more of a variety of possible wireless data carriers 122, 124, and 126 (such as a mobile telephone company). Carriers 122, 124, and 126 link the wired Internet, to which application server 106 is connected, with wireless network 128, which may be supported by any of a number of wireless data transmission protocols, standards, or encodings such as CDMA (Code Division Multiplexing), GSM (Global System for Mobile Communications), GPRS (General Packet Radio Service), or other wireless data communications standards. Blackberry-compatible devices are identified by a PIN (personal identification number) number, which, in the context of an embodiment of the present invention, is used to route web service requests to the appropriate user's handheld device.
Since MDS is commonly used to transmit electronic mail, in one embodiment of the invention, a SOAP envelope is transmitted as if it were electronic mail. Once the SOAP envelope is received by handheld device 104, however, handheld device 104 parses the received envelope, which indicates to handheld device 104 that the received MDS transmission is, in fact, a SOAP envelope. The SOAP envelope is then decoded, and one of web services 100 or 102 is then executed by handheld device 104. The result of the execution is then returned as a SOAP reply, through wireless network 128 and one or more of carriers 122, 124, and 126, to BES 120 which, in turn, relays the response to web application server process 114.
When one of web services 208, 210, and 212 needs to invoke a remote web service (such as web service 200) on handheld device 204, the invoking web service generates a request in a web services protocol (typically a SOAP envelope) to execute the remote web service. Web application server process 214 also generates a key that uniquely identifies the generated request. Since SMS only allows messages of up to 160 bytes to be pushed to a wireless device, SMS is impractical for directly pushing SOAP envelopes, which can easily exceed 160 bytes. Rather than sending the SOAP envelope in an SMS message, then, device gateway 218 sends, via SMS, a notification message that contains the key associated with the generated SOAP envelope. This SMS message is relayed through or more of GSM carriers 222, 224, and 226 over wireless network 228 to handheld device 204.
Handheld device 204, once it receives the SMS message, parses the received message and determines that the SMS message refers to a SOAP envelope on application server 206. Handheld device 204 then pulls the SOAP envelope from application server 206 by using the key to request the SOAP envelope from web application server process 214. Once the SOAP envelope is pulled from web application server process 214, the SOAP envelope is decoded, and one of web services 200 or 202 is then executed by handheld device 204. The result of the execution is then returned as a SOAP reply, through wireless network 228 and one or more of GSM carriers 222, 224, and 226, to web application server process 214.
When one of web services 308, 310, and 312 needs to invoke a remote web'service (such as web service 300) on handheld device 304, the invoking web service generates a request in a web services protocol (typically a SOAP envelope) to execute the remote web service. Device gateway 318 transmits the SOAP envelope over a TCP/IP connection over wireless LAN 328 to handheld device 304 on a designated TCP port.
Handheld device 304, having received the SOAP envelope on the designated TCP port, recognizes that what was received on that port was a SOAP envelope. Although in the ideal case, the fact that data is received on the designated port would in and of itself imply that the received data is a SOAP envelope, a preferred embodiment of the present invention further verifies that the received data is indeed a SOAP envelope; this prevents against spurious or invalid data being erroneously identified as a SOAP envelope. Having verified that what was received was a SOAP envelope, handheld device 304 decodes the SOAP and executes one of web services 300 or 302. The result of the execution is then returned as a SOAP reply over TCP/IP, through wireless LAN 328 to web application server process 314.
Turning now to
The operating system may be, for example, a commercially available operating system such as Windows CE™, which is available from Microsoft Corporation. Instructions for the operating system and applications or programs located on storage devices, such as storage 714, may be loaded into main memory 706 for execution by processor 704.
PCI bus 814 provides an interface for a variety of devices that are shared by host processor(s) 800 and Service Processor 816 including, for example, flash memory 818. PCI-to-ISA bridge 835 provides bus control to handle transfers between PCI bus 814 and ISA bus 840, universal serial bus (USB) functionality 845, power management functionality 855, and can include other functional elements not shown, such as a real-time clock (RTC), DMA control, interrupt support, and system management bus support. Nonvolatile RAM 820 is attached to ISA Bus 840. Service Processor 816 includes JTAG and I2C buses 822 for communication with processor(s) 800 during initialization steps. JTAG/I2C buses 822 are also coupled to L2 cache 804, Host-to-PCI bridge 806, and main memory 808 providing a communications path between the processor, the Service Processor, the L2 cache, the Host-to-PCI bridge, and the main memory. Service Processor 816 also has access to system power resources for powering down information handling device 801.
Peripheral devices and input/output (I/O) devices can be attached to various interfaces (e.g., parallel interface 862, serial interface 864, keyboard interface 868, and mouse interface 870 coupled to ISA bus 840. Alternatively, many I/O devices can be accommodated by a super I/O controller (not shown) attached to ISA bus 840.
In order to attach computer system 801 to another computer system to copy files over a network, LAN card 830 is coupled to PCI bus 810. Similarly, to connect computer system 801 to an ISP to connect to the Internet using a telephone line connection, modem 875 is connected to serial port 864 and PCI-to-ISA Bridge 835.
While the computer system described in
One of the preferred implementations of the invention is a software application, namely, a set of instructions (program code) or other functional descriptive material in a code module that may, for example, be resident in the random access memory of a computer. Until required by the computer, the functional descriptive material may be stored in another computer memory, for example, in a hard disk drive, or in a removable memory such as an optical disk (for eventual use in a CD ROM) or floppy disk (for eventual use in a floppy disk drive), or downloaded via the Internet or other computer network. Thus, the present invention may be implemented as a computer program product for use in a computer. In addition, although the various methods described are conveniently implemented in a general purpose computer selectively activated or reconfigured by software, one of ordinary skill in the art would also recognize that such methods may be carried out in hardware, in firmware, or in more specialized apparatus constructed to perform the required method steps. Functional descriptive material is information that imparts functionality to a machine. Functional descriptive material includes, but is not limited to, computer programs, instructions, rules, facts, definitions of computable functions, objects, and data structures.
While particular embodiments of the present invention have been shown and described, it will be obvious to those skilled in the art that, based upon the teachings herein, changes and modifications may be made without departing from this invention and its broader aspects. Therefore, the appended claims are to encompass within their scope all such changes and modifications as are within the true spirit and scope of this invention. Furthermore, it is to be understood that the invention is solely defined by the appended claims. It will be understood by those with skill in the art that if a specific number of an introduced claim element is intended, such intent will be explicitly recited in the claim, and in the absence of such recitation no such limitation is present. For non-limiting examples, as an aid to understanding, the following appended claims contain usage of the introductory phrases “at least one” and “one or more” to introduce claim elements. However, the use of such phrases should not be construed to imply that the introduction of a claim element by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim element to inventions containing only one such element, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an”; the same holds true for the use in the claims of definite articles.