The invention generally relates to a system and method for computer systems and, more particularly, to a system and method for reconstructing complex objects across different platforms.
Developers use collections and classes, like list, that are derived from collections to store, retrieve and manipulate data, and to transmit data from one method to another. The ability to iterate through collections and to generalize objects for reuse makes collections an excellent choice in many JAVA applications. However, current WSDL wizards cannot determine what types of objects are placed into the collection. So, once compiled, the wizard is unable to determine what the base object was in the collection. For this reason, the collection cannot be reconstructed by the wizard.
Rapid application development (RAD), JBOSS® and other development environments have not solved the problem of determining what was placed in the collection. (JBOSS is a registered trademark of Red Hat Inc. in the United States and/or worldwide.) For example, in many cases, the developer is placing the same object multiple times into the collection, which means that the collection contains objects derived from the same class. However, even in this case, the development environments cannot determine what was placed in the collection. In fact, known development environments can only reconstruct primitives.
RAD involves iterative development, and the construction of prototypes. Traditionally the rapid application development approach involves compromises in usability, features, and/or execution speed. It is described as a process through which the development cycle of an application is expedited. RAD thus enables quality products to be developed faster, saving valuable resources. JBOSS is cross-platform, usable on any operating system that Java supports.
Accordingly, there exists a need in the art to overcome the deficiencies and limitations described hereinabove.
In a first aspect of the invention, a method comprises reconstructing a collection using one or more annotations that document a base object of the collection.
In another aspect of the invention, a method for reconstructing a collection comprises providing a computer infrastructure being operable to: check if an object of a collection is annotated; retrieve a base class documented by the annotation; retrieve a template; and wrap the base class as an element in the template.
In another aspect of the invention, a computer program product for reconstructing a collection includes a computer readable media and first, second and third program instructions. The first program instructions identifies an annotation documenting a base object. The second program instructions retrieves the base object of the annotation, and the third program instructions reconstructs the collection using the annotation that documented the base object of the collection. The first, second and third program instructions are stored on the computer readable media.
The present invention is described in the detailed description which follows, in reference to the noted plurality of drawings by way of non-limiting examples of exemplary embodiments of the present invention.
The invention generally relates to a system and method for reconstructing one or more collections of objects across platforms. More particularly, the present invention uses Java Annotations to assist a Web Services Description Language (WSDL) wizard in reconstructing a collection of objects. In implementation, the system and method parses the object types such that a wizard can recreate or reconstruct the collection of objects for use by a receiving service. In comparison, known systems and services cannot support the collection of complex objects.
As should be understood by those of skill in the art, WSDL is an XML-based language that provides a model for describing web services over the Internet. A client program connecting to a web service can read the primitives associated with the WSDL to determine what functions are available on the server. Also, a collection (sometimes called a container) is a complex object that groups multiple elements into a single unit. Collections are used to store, retrieve and manipulate data, and to transmit data from one method to another. Collections typically represent data items that form a natural group, like an order (a collection of order lines), a mail folder (a collection of messages), or a telephone directory (a collection of name/phone-number pairs). But, as the collection includes complex objects it is impossible for a wizard to reconstruct the collection in WSDL file. However, by using the present invention, the collection is now defined (annotated) so that a wizard can reconstruct the WSDL file.
In particular, the collection is annotated to define one or more base objects or classes thereby allowing the collection to be compatible with non-java based web service consumers, in addition to the above noted features. More fundamentally, the collection is provided with annotations or labels that define the contents (e.g., base classes or base objects) of the collection. This allows the collection to be readable outside the language, making it compatible with web service implementations. For example, in implementation, the annotations or labels are used by the wizard 30 to reconstruct the collection. This can be done by retrieving the base class of the annotation, retrieving a template for the collection and wrapping the base class into the template. In this way, the invention allows for the definitions of complex, custom objects (e.g., a collection) to be transferable across multiple platforms and automatically reconstructed by the wizard 30.
The computing device 14 includes a processor 20, a memory 22A, an input/output (I/O) interface 24, and a bus 26. The memory 22A can include local memory employed during actual execution of program code (Program Control Logic), bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution. Further, the computing device 14 is in communication with an external I/O device/resource 28 and a storage system 22B. The I/O device 28 can comprise any device that enables an individual to interact with the computing device 14 or any device that enables the computing device 14 to communicate with one or more other computing devices using any type of communications link. For example, the external I/O device/resource 28 may be keyboards, displays, pointing devices, etc. In accordance with the present invention, a programmer or designer can annotate the collection using the external I/O device/resource 28. A storage “S” may also be provided internally to the computing device 14.
In general, the processor 20 executes the Program Control Logic, which can be stored in memory 22A and/or storage system 22B or the wizard 30. While executing the Program Control Logic, the processor 20 can read and/or write data to/from memory 22A, storage system 22B, the wizard 30, and/or I/O interface 24. The bus 26 provides a communications link between each of the components in the computing device 14.
The computing device 14 can comprise any general purpose computing article of manufacture capable of executing computer program code installed thereon (e.g., a personal computer, server, etc.). However, it is understood that the computing device 14 is only representative of various possible equivalent-computing devices that may perform the processes described herein. To this extent, in embodiments, the functionality provided by computing device 14 can be implemented by a computing article of manufacture that includes any combination of general and/or specific purpose hardware and/or computer program code, as discussed in more detail below. In each embodiment, the Program Control Logic and hardware can be created using standard programming and engineering techniques, respectively.
Similarly, the computer infrastructure 12 is only illustrative of various types of computer infrastructures for implementing the invention. For example, in embodiments, the computer infrastructure 12 comprises two or more computing devices (e.g., a server cluster) that communicate over any type of communications link, such as a network, a shared memory, or the like, to perform the process described herein. Further, while performing the processes described herein, one or more computing devices in the computer infrastructure 12 can communicate with one or more other computing devices external to computer infrastructure 12 using any type of communications link. The communications link can comprise any combination of wired and/or wireless links; any combination of one or more types of networks (e.g., the Internet, a wide area network, a local area network, a virtual private network, etc.); and/or utilize any combination of transmission techniques and protocols.
In one example, a programmer can annotate the collection of complex objects using a first computer infrastructure. The annotation can be used to define base classes or base objects in the collection. The collection can then be transmitted to a receiving computer infrastructure, where a wizard 30 on the receiving computer infrastructure reconstructs the WSDL file in XML. As noted herein, this is done by retrieving a base class (base object) as defined by the annotation, retrieving a template for the collection and wrapping the base class as an element in the template.
Normally, when a collection is created, the base class (object) in the collection is not known by the compiler and the WSDL generator. However, by implementing the present invention, the collection is defined in such a way that the base class (object) of the collection is known by the compiler and the WSDL generator. In its simplest form, the contents of the collection are labeled (annotated). This label allows the WSDL wizard to reconstruct the collection, as it now can determine the contents of the collection.
In one embodiment, to provide the advantages herein, Java annotations are used to document (define) the base object(s) used by the collection. For example, an exemplary annotation can be written as follows:
This annotation will generate a javaDoc reference that shows the base object being added to the collection. As in the case of a collection, the service provider would know that the base element (object) of the collection would be MyMessageDTO class.
In one embodiment, the MyMessageDTO is as follows:
The invention would break the collection into a group of complex types (base classes, base objects or other primitives) using the annotation to decompose the collection to the base objects that are placed into the collection. For example, the base object can be shown in the WSDL as follows:
Now that the base object is shown in the WSDL it is possible to use an xml plug-in to instruct the wizard how to handle the collection. This can be written, for example, as follows:
Additionally or alternatively, a hash, map or list can be used by the wizard. A hash, for example, can be defined as:
In this manner, a complex object can be converted to a simpler object (e.g., into its primitives). In this example, a collection of MyMessageDTO's would be written as:
Notice that the word “collection” defines the complex type. When a client (wizard) that implements collections is used, it can parse the name and determine that it is using an object type that can be transcoded back into its base object.
Also, in order for transcoding to work properly, the WSDL element names are preferably a name of an attribute in the class. This becomes important when the tool creates objects like hash maps where there is a key/value relationship.
The invention can take the form of hardware and software elements as shown in
In embodiments, a service provider, such as a Solution Integrator, could offer to perform the processes described herein. In this case, the service provider can create, maintain, deploy, support, etc., the computer infrastructure that performs the process steps of the invention for one or more customers. In return, the service provider can receive payment from the customer(s) under a subscription and/or fee agreement.
Referring to
If the object is annotated, at step 235, the wizard retrieves the base class (base object) of the annotation. The wizard retrieves the template for the collection, map, hash or library, at step 240. At step 245, the wizard wraps the base class (base object) as an element in the template. In this manner, the wizard can now reconstruct the collection in an XML.
Thus, as should now be understood by those of skill in the art, the wizard is configured to reconstruct the collection of complex objects from its basic structure (which is understandable by the WSDL). That is, once the collection of complex objects is decomposed into as simple types as possible, e.g., primitives, the wizard can reconstruct the collection using a label (which defines the contents of the collection). For example, once the collection is broken into its primitives, the wizard can reconstruct the WSDL on a receiving computing device using a template for the collection. By breaking down the collection into its primitives, the service consumer and the service provider can now both understand what will be returned by the WSDL file, even though it is a collection of complex objects. In this manner, a collection of complex objects can be broken down into their simplest form to allow a standard interaction between a consumer and service provider, effectuating a transaction that would not have otherwise been possible using a wizard.
While the invention has been described in terms of embodiments, those skilled in the art will recognize that the invention can be practiced with modifications and in the spirit and scope of the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
4853843 | Ecklund | Aug 1989 | A |
6016497 | Suver | Jan 2000 | A |
6477701 | Heistermann | Nov 2002 | B1 |
6529909 | Bowman-Amuah | Mar 2003 | B1 |
6609130 | Saulpaugh et al. | Aug 2003 | B1 |
6928488 | de Jong et al. | Aug 2005 | B1 |
7200804 | Khavari et al. | Apr 2007 | B1 |
7287216 | Lee et al. | Oct 2007 | B1 |
7440967 | Chidlovskii | Oct 2008 | B2 |
7539978 | Haddox et al. | May 2009 | B1 |
7617504 | Hill et al. | Nov 2009 | B1 |
7774330 | Kalaboukis et al. | Aug 2010 | B2 |
7873908 | Varanasi et al. | Jan 2011 | B1 |
7950064 | Chavez et al. | May 2011 | B2 |
20030018402 | Breunese | Jan 2003 | A1 |
20030018661 | Darugar | Jan 2003 | A1 |
20030110177 | Andrei | Jun 2003 | A1 |
20030131010 | Redpath | Jul 2003 | A1 |
20030188292 | Herkert | Oct 2003 | A1 |
20030204645 | Sharma et al. | Oct 2003 | A1 |
20030208509 | Komine et al. | Nov 2003 | A1 |
20040015840 | Walker | Jan 2004 | A1 |
20040039964 | Russell et al. | Feb 2004 | A1 |
20040073870 | Fuh et al. | Apr 2004 | A1 |
20040111220 | Ochs et al. | Jun 2004 | A1 |
20040199636 | Brown et al. | Oct 2004 | A1 |
20040216086 | Bau | Oct 2004 | A1 |
20040225959 | D'Orto et al. | Nov 2004 | A1 |
20040261008 | Pepin et al. | Dec 2004 | A1 |
20050021689 | Marvin et al. | Jan 2005 | A1 |
20050022164 | Takacsi-Nagy | Jan 2005 | A1 |
20050097110 | Nishanov et al. | May 2005 | A1 |
20050097450 | Lumera et al. | May 2005 | A1 |
20050097504 | Ballinger et al. | May 2005 | A1 |
20050144622 | Ballinger et al. | Jun 2005 | A1 |
20050172300 | Snover et al. | Aug 2005 | A1 |
20050234868 | Terek et al. | Oct 2005 | A1 |
20060010138 | Huerta et al. | Jan 2006 | A1 |
20060053368 | Bosworth et al. | Mar 2006 | A1 |
20060136435 | Nguyen et al. | Jun 2006 | A1 |
20060136483 | Nguyen et al. | Jun 2006 | A1 |
20060144010 | Wolf | Jul 2006 | A1 |
20060149817 | Bou-Ghannam et al. | Jul 2006 | A1 |
20060150204 | Beisiegel et al. | Jul 2006 | A1 |
20060200747 | Bhatia et al. | Sep 2006 | A1 |
20060225027 | Venkatesh | Oct 2006 | A1 |
20060277456 | Biberstein et al. | Dec 2006 | A1 |
20070067421 | Angelov | Mar 2007 | A1 |
20070149817 | Fukushima et al. | Jun 2007 | A1 |
20080275829 | Stull et al. | Nov 2008 | A1 |
Entry |
---|
Efficient Object Serialization in Java, Opyrchal et al., in ICDCS 99 Workshop on Middleware, Jun. 1999. |
More Efficient Object Serialization, Philippsen et al, Proceedings of the 11 IPPS/SPDP'99 Workshops Held in Conjunction with the 13th International Parallel Processing Symposium and 10th Symposium on Parallel and Distributed Processing, pp. 718-732 , 1999. |
Preeda Rajasekaran, “Enhancing Web Service Descriptions Using WDSL-S”, 2004, Citeseer, pp. 1-95. |
Ha, Y et al., “Integration of Semantic Web Service and Component-Based Development for e-business environment”, IEEE Computer Society, Proceedings of the Fourth International Conference on Software Engineering Research, Management and Aoolications (SERA '06), 2006. |
Number | Date | Country | |
---|---|---|---|
20150248289 A1 | Sep 2015 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14086577 | Nov 2013 | US |
Child | 14712264 | US | |
Parent | 12029048 | Feb 2008 | US |
Child | 14086577 | US |