# Patent

## Title
System and method for enterprise application interactions

## Abstract

An application view control can allow users of a software tool to interact with Enterprise applications using simple Java APIs. This can allow a user who is not an expert in the use of a given Enterprise system to utilize its capabilities in a manner a Java programmer can understand. A developer can invoke application view services both synchronously and asynchronously, and can subscribe to application view events. The developer can use simple Java objects in both the service and event cases. The developer need not understand XML, or the particular protocol or client API for the Enterprise application, such as an Enterprise Information System (EIS).

## Background
CLAIM OF PRIORITY
This application claims priority to U.S. Provisional Patent Application No. 60/377,306, filed May 2, 2002, entitled “System and Method for Enterprise Application Interactions,” which is hereby incorporated herein by reference.


COPYRIGHT NOTICE
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document of the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
CROSS-REFERENCED CASES
The following applications are cross-referenced and incorporated herein by reference:
U.S. patent application Ser. No. 10/402,819, entitled “Shared Common Connection Factory,” by Timothy Potter et al., filed Mar. 28, 2003.
U.S. patent application Ser. No. 10/400,822, entitled “Adapter Deployment Without Recycle,” by Timothy Potter et al., filed Mar. 27, 2003.
U.S. patent application Ser. No. 10/400,821, entitled “Modular Deployment of Components,” by Timothy Potter et al., filed Mar. 27, 2003.
U.S. patent application Ser. No. 10/271,194 entitled “Application View,” by Mitch Upton et al., filed Oct. 15, 2002.
U.S. patent application Ser. No. 10/402,825, entitled “Systems and Methods for Application View Transactions,” by Tim Potter et al., filed Mar. 28, 2003.
FIELD OF THE INVENTION
The present invention relates to ways of allowing users to interact with an Enterprise application.
BACKGROUND
E-commerce has become a major driving factor in the new economy. To be successful in the long-term, e-commerce will require many companies to engage in cross-enterprise collaborations. To achieve cross-enterprise integration, a company must first integrate its internal applications. Using existing technology and tools, application integration can be an expensive proposition. No integration solution exists that is easy to use, affordable, and based on industry standards. Neither does a solution exist that is based on an industry standard infrastructure, has universal connectivity, is capable of massive scalability, and has accessible business process tools.
Application integration to this point has been very inward-focused. Many existing integration systems have not focused on integrating applications between enterprises. Even when integration solutions were used for cross-enterprise integration, the solutions were still narrowly focused and aimed at vertical markets. This inward focus did little to help companies field external business-to-consumer and business-to-business applications, such as applications that can utilize the Internet to generate revenue and reduce costs. The requirement for Internet-enabled applications led to the rise of the application server market. To date, application servers have primarily been used to host external applications targeted at customers and partners. Application servers are themselves packaged applications that, instead of solving a specific problem, are general-purpose platforms that host vertical solutions.
The first attempts at application integration were primarily focused on low-level implementation details such as the format of the data, the byte ordering between machines, and character encoding. The focus on low-level data formats was necessary because, for the first generation of application integration solutions, there were no widely adopted standards for data encoding that could be deployed across multiple vertical applications.
The traditional approach involved connecting individual systems to, in effect, hardwire the systems together. This approach can be complex, as connecting different systems can require an intimate, low-level knowledge of the proprietary technologies of multiple systems. To remove this complexity, businesses began developing and using adapters.
Adapters are software components that applications can use to programmatically access enterprise data. For example, an adapter can use a Java class to represent enterprise data, and can provide methods that applications can invoke to access the data. When an application invokes an access method, the adapter can execute the method to retrieve the enterprise data.
These integration systems, however, suffer from a lack of standards. Each integration vendor typically provides a proprietary solution for application adapters, message transformation, message formats, message transport, and routing. Not one of these systems to date has achieved significant market share to enable its technologies to become the de-facto standard. This lack of standards has given packaged application vendors little incentive to create adapters to their applications. Further, each of these integration servers has its own proprietary API for constructing adapters, so packaged application vendors cannot leverage the development of an adapter beyond a single integration server. This fragmentation of the integration market has provided little financial incentive for third parties to build adapters.
Application views were developed as a solution to this problem. An application view provides a layer of abstraction between an adapter and Enterprise Information System (EIS) functions exposed by that adapter. Instead of accessing an EIS by directly programming the EIS, a user can simply edit the application views for the adapter, create new application views, or delete obsolete application views. This layer of abstraction, formed by application views, makes it easy for non-programmers to maintain the services and events exposed by the adapter. Each application view is adapter-specific, and defines a set of business functions on the adapter's EIS. Such application views provide a view of the application capabilities exposed by an adapter. Presently, there is no analogous functionality for users of tools such as Cajun, a Java 2 Enterprise Edition (J2EE)-based Web services development framework available from BEA Systems Inc. of San Jose, Calif., that can allow tool developers to easily interact with information systems.
BRIEF SUMMARY
An application view tool control can allow users of a software tool to interact with Enterprise applications using simple Java APIs. Such an approach can allow a user who is not an expert in the use of a given Enterprise system to utilize system capabilities in a manner a Java programmer can understand. An application view tool control, hereafter referred to as an application view control, can provide a way for a tool developer to invoke application view services both synchronously and asynchronously, and to subscribe to application view events. In both the service and event cases, the tool developer can use simple Java objects. The developer need not understand XML, or the particular protocol or client API for the Enterprise application, such as an Enterprise Information System (EIS). Systems and methods in accordance with embodiments of the present invention can allow tool developers, or non-EIS experts, to access Enterprise application functionality.
Other features, aspects, and objects of the invention can be obtained from a review of the specification, the figures, and the claims.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a diagram of a system using an application view that can be used in accordance with one embodiment of the present invention.
FIG. 2 is a diagram of a system using an application view that can be used in accordance with one embodiment of the present invention.
FIG. 3 is a diagram of a system using an application view that can be used in accordance with one embodiment of the present invention.
FIG. 4 is a flowchart showing a method that can be used with the systems of FIGS. 1-3.



DETAILED DESCRIPTION
Systems and methods in accordance with embodiments of the present invention can assist in system integration, such as between a client application and an Enterprise Information System. Such systems can take advantage of application views, and can provide an external software tool with access to application view services and events. Systems in accordance with one embodiment will be described using a Cajun environment, although many such environments can take advantage of aspects of the present invention. Generation tools, such as control wizards, can be used to guide a user through the process of developing an application view control. These tools can automate much of the generation process, generating the necessary objects and files for selections made by the user. For example, meaningful and/or useful classes can be generated to describe request, response, and event payload data structures for services, such as Web services. Schema definitions can be handled automatically, such that any application view defined in terms of an adapter can be imported into, and used within, the external environment. In certain environments, a conversational Java Web services (JWS) instance can be configured to listen for application view events and respond to those events via a callback method.
An exemplary integration system that can take advantage of embodiments in accordance with the present invention is shown in FIG. 1. An integration adapter 110 be used that includes a Web application, allowing a user to browse documents or business programming application interfaces (BAPIs) that are available in an EIS system 100, such as an SAP system, through a Web browser 116 without the Web application. A resource adapter 114 can be used to send requests to, and receive requests from, the EIS 100. The resource adapter 114 can also be used to implement a connector specification 118. An event router 104, which can also be a Web application, can be used to route messages from the EIS 100 to an application view 108 for the application integration component 106.
When an event occurs in the EIS 100, an event generator 102 can detect the event and determine whether anyone should receive this event. To do this, the event generator 102 can check the types of events that have subscriptions, which can be maintained by the event router 104. The event router can create an event object containing pertinent data about the event, and can sends the event object to the event router 104. The event router 104 can send the event object to any application view 108 that is subscribed to the type of event object received from the event generator 102. The application view 108 can receive the event object and notify any listener 112 registered for that type of event. Exemplary listeners can include integration process flow or custom business logic flow. A listener 112 can process the event object and determine whether a service should be invoked in response to the event.
The application view 108 can combine data from the event object with data held by the application view, such as in state variables, and can make a service invocation on a resource adapter 114. The application view can accept the service request and determine which interaction to request on the resource adapter 114. This mapping from service name to adapter interaction can allow the service to be business-centric and not system-function centric. The resource adapter 114 can carry out the request interaction with the EIS 100 and pass the data received from the application view 108. This data can then be viewed, such as through a Web browser 116, through the integration adapter 110.
FIG. 2 shows another system that can take advantage of aspects of the present invention the system capable of high-availability event processing in an application integration engine. In an example of event processing using an integration system, an event occurs in an enterprise information system (EIS) 230. The event data is transferred to an event generator 228 in the resource adapter. The event generator 228 transforms the EIS-specific event data into an XML document and posts an event object, such as an IEvent object, to the event router 226. The event router 226 passes the event object to an event context object 224 for each AI server that is interested in the specific event type. The event context object 224 encapsulates the event object into a JMS object message and sends it to the event queue 222. This queue can be a distributed queue, in that the selected queue exists somewhere in the cluster but uses the same alias.
The event object message is stored in the event queue 222 until it is retrieved for processing by the AI event processor 220, which can process events in a first-in-first-out (FIFO) manner. It may not be enough to send a message to a distributed queue and expect the message to be received by a receiver of that distributed queue. There can be a receiver, or “QueueReceiver”, receiving or listening on each physical queue to which an event could be forwarded. Thus, an AI event processor can be deployed on all nodes in a cluster. Multiple event processor deployment can further prevent single points of failure.
The event processor 220 can forward the event to all registered event destinations 210, which in the Figure include a BPM event queue 212, an event topic 114, and a Cajun event processor 216. Event destinations can be added by posting a message to a notification topic 208 for application integration. For example, when an AI plug-in 200 for BPM is deployed, it can send an “addDestination” message to the notification topic to register the BPM event queue 212 as an event destination. The BPM event queue can be a distributed queue. A message published on the notification topic can have cluster-wide visibility. Each node in the cluster can have a singleton event destination manager 218 that is a durable subscriber to this topic. Thus, the message can be published to every event destination manager in the cluster.
The event processor can use a singleton event destination manager 218 to listen for add/remove event destination messages on the notification topic 208 to configure the list of event destinations 210. The event object message can be delivered to all registered event destinations in a single transaction, such as in a single Java Transaction API (JTA) user transaction. If a post to any event destination 210 fails, the event message can be rolled back to the distributed queue 222. The roll back can use the same alias, but can forward the event to a different physical queue in the cluster. If the event processor 220 receives a message such as one that has “getJMSRedelivered( )” true, the post can be tried again. If the retry fails, the message can be sent to an error queue, which can be a distributed queue for failed event and asynchronous service response messages.
If an AI plug-in 200 for BPM is deployed, the plug-in can add the BPM event queue 212 as an event destination during startup so that AI events are passed to a BPM workflow 202 for processing. If there are any registered application view event listeners 206, the event can be sent to an event topic 214 which will use event context 204 to establish a connection with the remote event listener 206 for the application view.
Application Views
An application view can provide significant value to an application integration component. An application view can abstract away much of the complexity in dealing with an application, such as a backend EIS system. Application views can also simplify the way in which adapters are accessed. Application views can provide a layer of abstraction, for example, between an adapter and the EIS functions exposed by that adapter. Instead of accessing an EIS by direct programming a user can simply edit an adapter's application views, create new application views, or delete any obsolete application view(s). A layer of abstraction formed by application views can help non-programmers maintain the services and events exposed by an adapter. Each application view can be specific to a single adapter, and can define a set of business functions on that adapter's EIS. After an adapter is created, a Web-based interface for the adapter can be used to define application views.
If an application view is used as a primary user interface for an adapter, a number of features can be included that are not commonly found in existing enterprise application integration technologies. Application views can, for example, use XML as a common language among applications. Service and event definitions can be used to expose application capabilities. XML schemas can be used to define the data for services and events. Bi-directional communication can also be supported in adapters.
An application view can be an integral part of an integration framework when used as an interface object. An application view can provide a view of the application capabilities exposed by an adapter that a user can customize to meet specific needs. A user can tailor an application view, for example, for a specific business purpose. As a result, the application view can provide an effective alternative to the “one size fits all” approach that many applications provide for the design of a client interface. An application view can be defined for only the business or other capabilities that are applicable for a specific purpose. The capabilities can be customized such as by naming, describing, and defining the data requirements.
In one example, shown in FIG. 3, adapters 306, 308, 310 can be developed that allow a client application 300 to communicate with an Enterprise Information System 304 through the use of an application view 302. A developer can begin by coding an adapter that exposes the functionality in the enterprise application that accesses enterprise data. The functionality the adapter exposes could, for example, update records in a database using SQL statements, or could request information from an SAP system using its BAPI or IDOC interfaces. A business analyst, working with the developer, can then define an application view of the adapter using an application view interface.
An application view is an object, which can be implemented in one embodiment as a stateless session JavaBean. There can be a Java interface to the application view for the client application. A Java application can be custom coded to use that object, such as by passing XML in and receiving XML back. In addition, a business process management component can be included that allows process engineers to define workflows, and allows application views to be invoked as business services. In a workflow, a callout can be made to an EIS to get information such as a customer's credit record. The fact that the application view is a Java object or enterprise JavaBean can be hidden from the process and designer.
A Web services interface can also be used with an application view. A protocol such as SOAP can be used to invoke a Web service. Another protocol that may be used includes UDDI, a platform-independent, open framework for describing services, discovering businesses, and integrating business services using the Internet. A WSDL protocol can also be used, which is an XML format for describing network services. A Web services layer can be provided on top of the application view so that any application view can be invoked as a Web service.
In application integration, new application views can be hot-deployed against an existing EIS through a Web-based interface. An application view is hot-deployed when it is deployed with the system running, without restarting the destination server. A new customer management tool for SAP, for example, can also be defined through a Web browser. A user can also decide whether or not an application view should be deployed persistently. Persistent deployment means the application view can be redeployed whenever the application server is restarted.
Control Wizard
One such software tool for providing access to application view services and events is a control wizard, or application view control wizard. A control wizard can be, for example, a Cajun design-view wizard. One purpose for such a wizard is to guide a user through the process of creating a new instance of an application view control.
For example, as shown in the method of FIG. 4, the control wizard can identify an application view definition that corresponds to an application view that a user or client application wishes to access 400. The control wizard can automatically generate a control file to represent that application view definition 402. The control wizard can contain a user interface(UI) component that allows a user to select services that are defined for, and correspond to, the selected application view 404. For each service selected by the user, the control wizard can allow the user to determine whether synchronous or asynchronous invocation, or both, should be supported 406. The control wizard can then generate classes to describe events for the selected services. 408. The control wizard can then generate an application view control to allow the user or client application to interact with the application view service using the generated classes and control file 410.
Each run of the control wizard can identify a single application view definition, such as in an integration XML repository, and can generate a single JWI file representing that application view definition. A JWI file is a ‘standard’ Java file, except that the file contains annotations used to define a control. This process can be referred to as ‘importing’ an application view, such as for use in the Cajun environment.
A control wizard can be invoked in one embodiment when a user clicks on an ‘Application View Control’ button on a user interface (UI) toolbar. At the end of the wizard, a new icon can exist on an area of the design view that corresponds to the imported application view and the resultant application view control instance.
The control wizard can display a navigation tree that allows a user to navigate namespaces and application view definitions, similar to the way that an application integration (AI) plugin does for BPM. Once a user has designated an application view definition as the import source for the control instance, the wizard can allow the user to select any number of services defined for the application view to be generated with asynchronous invocation support.
Since a model such as a Cajun model can be strongly-typed and early-bound, the choice of synchronous/asynchronous invocation can be made at design-time instead of being deferred to runtime. Any service the user chooses to make asynchronous can have both a call-in method and a callback method defined.
A control wizard can also provide a way for a user to ‘update’ a control instance with any new metadata contained in the application view that was originally imported to create the control instance. The user should be allowed to designate an existing control instance (such as through a pick-list or by name) or a new control instance as the target of the import/JWI generation. This can allow a user to iteratively import an application view to a control instance in the development phase of a Web service. If the user chooses to import to an existing control instance name, then the original contents of the JWI file for that control instance can be overwritten. A backup copy of the JWI can always be kept to prevent the loss of any customizations that may have been made to the JWI contents.
A control wizard can generate a JWI file that contains Java class definitions corresponding to schemas for all services (request/response) and events on the application view that was imported. The generated Java types can be used by the JWS developer when invoking methods and responding to callbacks within the JWS.
A dialog in the control wizard user interface can allow a user to specify the name of the control instance variable in the JWS, and the package name to use when generating the JWI file for the control. It can also allow a user to navigate the namespace/application view hierarchy in the AI repository and select an application view to be imported. Each time the selection changes, the application view and description fields can be updated with the information from the current selection. The description can help the user understand the purpose of the application view that is selected, and thus help the user make the correct decision about whether to import the application view.
A main dialog can also allow a user to specify a ‘Run As’ identity for a control. Services invoked via a generated JWI file can use the specified user name as their effective identity. The password can be passed to the JWI generator in clear text, but can be encrypted by the JWI generator before placing it into the generated JWI text.
A user can choose services to be imported as asynchronous methods in one embodiment by clicking an ‘Async Services . . . ’ button. This can pop up in an ‘Async Services’ dialog. Clicking ‘OK’ on this dialog can cause the generation of a JWI file for the ApplicationViewControl instance, as well as the creation of the JWS variable for the control.
For the main dialog, a navigation tree can be backed by a Namespace Navigation Facility. Such a facility can allow a user to list application views and namespaces within a namespace. The root of the tree can be populated by listing application views and namespaces in the root namespace, which can be specified by passing the namespaceName as the empty string.
The description can be obtained from the application view selected in the tree. Retrieving the application view's descriptor or metadata about an ApplicationView, such as by using a ‘Get ApplicationView’ command, can return the XML for the application view descriptor. The user can pass an ‘objectQName’ parameter as the qualified name of the application view. The user can generate this qualified name by composing the node names of all the nodes in the currently selected TreePath. For example, if the currently selected application view were named ‘baz’, and it lived inside a namespace called ‘bar’ (represented by a tree node with label ‘bar’), and bar lived inside a namespace called ‘foo’ (represented by a tree node with label ‘foo’), then the selected node would be represented by a TreePath object containing the sequence ‘foo’, ‘bar’, and ‘baz’. The qualified name ‘foo.bar.baz’ can be created by contatenating together each segment with a period or ‘dot’.
To get the description, a user can parse the XML descriptor for the application view. If this proves to be too cumbersome, Java archive (JAR) files such as xmltoolkit.jar and wlai-common.jar can be included to allow the user to use the an ApplicationViewDescriptor object that parses the XML for the user.
A dialog can be ‘popped up’ from the main wizard dialog when a user clicks ‘Async Services . . . ’. Such a dialog can allow the user to choose which services on the selected application view should be imported to be asynchronous. The user can choose any services that are to be imported as asynchronous. By default, all services can be imported as synchronous. Synchronous services can be represented by a control method having both input parameters and a non-void return type. Asynchronous services can be represented by a control method having input parameters and a void return type, as well as a callback method having input parameters matching the type that would have been returned if the service was imported as synchronous.
A services list can be populated by getting all the ‘service’ elements from the descriptor XML, and getting the ‘name’ attribute value from each. If an IApplicationViewDescriptor object is generated from the XML, such as may require xmltoolkit.jar and wlai-common.jar to be on the classpath, then the user can just call the ‘listServiceNames( )’ method on the IApplicationViewDescriptor object.
JWI Generation
An application view control can have a JWI generation facility. A servlet can be written to implement an HTTP interface to the JWI generation facility. Such a servlet can accept the information taken from the user during their interaction with the control wizard, and can return the generated JWI text. The servlet can interface with the JWI generation facility in the ApplicationViewControl.
A JWI Generation Servlet can be called, for example, ApplicationViewJWIGeneratorServlet, and can accept parameters such as the following in an HTTP request (both ‘get’ and ‘post’ can be supported):

    
    
        JWI GEN—Flag to cause JWI generation. This servlet might be used for other purposes, so we use a flag to indicate we want JWI generation. Value is ignored, but for consistency it can be set to the string ‘true’.
        PkqName—The name of the package that can appear in the package statement at the top of the generated JWI code. Optional. If given, this can be a valid Java package name (i.e. period separated Java identifiers). May be the empty string.
        ClassName—The name of the class that can be implemented in the generated JWI code. Optional. If given, can be a valid Java class name. If not given, the appViewQName parameter can be used.
        AppViewQName—Fully qualified name of the application view that can act as the source for JWI generation. A period separated name containing a single segment for each level in the namespace hierarchy containing the application view, and a final segment representing the name of the ApplicationView.
        asyncService-Names—The list of services (by name) that can be generated as async methods in the generated JWI code. Optional. If given, this list can be derived from the list item labels that are selected in the ‘Services to Import as Asynchronous’ list box in the ‘Async Services’ dialog. Names can be separated by commas. The servlet can parse them into a List object for use in the makeJwi method.
        RunAsUserID—The effective principal when using the application view (named in the ‘appViewQName’ parameter) at runtime. Optional. However, it is recommended this be given because an ApplicationView is a protected resource and thus not all principals will be allowed to execute it. Therefore the principal can be specified that does have the correct permissions to execute it. If not given, the server identity in thread can be used.
        RunAsPassword—The password for the above mentioned user ID. Optional. Used only when runAsUserID is given. This can be passed in plain text for simplicity, and can be encrypted with a reversible encryption algorithm before being stored into the generated JWI code.

This servlet can return a MIME type of ‘text/plain’ when the command is completed successfully. If an error occurs, the error text can be returned as MIME type ‘text/html’.

JWI Generation Method

    
    


The following signature can be called by an application view JWI generator servlet when a generation request is received. This can be when a user clicks the ‘OK’ button on the control wizard dialog, for example.















public static boolean makeJwi (










String
pkgName,



String
className,



String
appViewQName,



List
asyncServiceNames,



String
runAsUserID,



String
runAsPassword,



ApplicationViewManager
avm,



SchemaManager
sm,



NamespaceManager
nm,



PrintWriter
out,



JwErrors
errors )









throws Exception










The following describes each parameter and where the data for each parameter can be retrieved:

    
    
        PkgName—The package name that can appear in the package statement at the top of the generated JWI. pkgName parameter in HttpServletRequest
        ClassName—The name of the interface that can be generated into the JWI. className parameter in HttpServletRequest
        appViewQ-Name—The qualified name of the ApplicationView that can act as the source for JWI generation. appViewQName parameter in HttpServletRequest.
        asyncService-Names—A list of names of services that the user selected to make async. Parsed from the comma separated list of service names in the asyncServiceNames parameter of the HttpServletRequest.
        RunAsUserID—The ‘Run As’ user name specified by the user. runAsUserID parameter in HttpServletRequest
        RunAsPassword—The password for the ‘Run As’ user name. runAsPassword parameter of HttpServletRequest. This can be passed in clear text. It can be encrypted before being placed into the generated JWI code.
        sm—A SchemaManager instance. This is an EJB remote interface. It can be obtained by looking it up in JNDI at ‘com.client.SchemaManager-Home’. This instance can be cached for the life of the servlet if possible (but its not critical)
        avm—An Application-ViewManager instance. This is a local Java object of class ‘com.client.-ApplicationViewManager,’ but can require an InitialContext in its constructor. This instance can be cached for the life of the servlet if possible (but its not critical).
        nm—A Namespace-Manager instance. This is an EJB remote interface. It can be obtained by looking it up in JNDI at ‘com.client.Namespace-ManagerHome’. This instance can be cached for the life of the servlet if possible (but its not critical).
        out—A PrintWriter instance attached to the HttpServlet-Response. Obtained from the HttpServletResponse object (via response.getWriter( )).
        Errors—A JwErrors instance. Same place as for the Service control.

Namespace Navigation Facility

    
    


A servlet interface can be provided to the namespace navigation features of a namespace manager, and the application view retrieval facilities of an application view manager. A ‘Ping’ command can allow a caller to verify the presence of a running AI engine within the target server and can be indicated by passing a ‘PING’ parameter in an HTTP query string. Ping can be used to verify that this servlet is alive in the server.
A ‘List ApplicationViews’ command can be indicated by passing a ‘NM_LIST_APPVIEWS’ parameter in the HTTP query string, such as:















Usage for command: NM_LIST_APPVIEWS









NM_LIST_APPVIEWS=true









namespaceName=[namespace name (empty for root









namespace)] [required] [value optional]










This can list objects of application view type in the given namespace. Names may not include the name of the parent namespace. To form a qualified name, the name of the namespace passed in the namespaceName argument can be pre-pended. The command can return a comma-separated list of object names.

A ‘List Namespaces’ command can be indicated by passing a ‘NM_LIST_NAMESPACES’ parameter in the HTTP query string, such as:















Usage for command: NM_LIST_NAMESPACES









NM_LIST_NAMESPACES=true









namespaceName=[namespace name (empty for root









namespace)] [required] [value optional]










This can list objects of Namespace type in the given namespace. Names do not include the name of the parent namespace. To form a qualified name, the name of the namespace passed in the namespaceName argument can be pre-pended.

A ‘Get ApplicationView’ command can be indicated by passing a ‘NM_GET_APPVIEW’ parameter in the HTTP query string, such as:















Usage for command: NM_GET_APPVIEW









NM_GET_APPVIEW=true









objectQName=[qualified name of appview] [required]









[value required]










Schema Type to Java Type Mapping

When importing an application view using a control wizard, the wizard can automatically generate Java types corresponding to the request/response types for services and the payload types for events. These types can be generated based on the schema information associated with the service and events on the application view.
The generated Java type can contain fields for all element definitions at the root level of the schema, such as contained in the named root element definition within the schema. These fields can be derived from simple XML types or from complex XML types. In the case of complex XML types, a new Java type can be generated, and the generated field definition can have the generated Java type for that field. Thus, the generation of Java types from a schema can result in any number of Java class definitions, and thus a nested Java datatype.
All generated types can be inner classes of a container class representing the service request/response or event payload. The container class can be named according to the appropriate naming conventions. This can provide a guaranteed unique namespace for all generated Java types.
For example, given the following schema:















<xsd:schema>









<xsd:element name=“Rows”>









<xsd:complexType>









<xsd:element name=“Row” minOccurs=“0”









maxOccurs=“unbounded”>









<xsd:complexType>









<xsd:element name=“StringField”









type=“xsd:string”/>









<xsd:element name=“IntField”









type=“xsd:int”/>









<xsd:element name=“DateTimeField”









type=“xsd:dateTime”/>









</xsd:complexType>









</xsd:element>









</xsd:complexType>









</xsd:element>









</xsd:schema>










and assuming that the schema is associated with the response for the ‘GetSomeRows’ service, Java types such as the following could be generated:
















public static class GetSomeRowsResponse implements



java.io.Serializable



{









public Row[] Rows;



public static class Row implements









java.io.Serializable









{









public String StringField;



public int IntField;



public java.util.Date DateField;









}









}










The outer class can be named for the service and the fact that it is the response from the service. The outer class can contain a single field, as the schema contains a single child element, but the field's type is not ‘Rows’, but rather ‘Row[ ]’. The type generation facility can detect parent elements that contain a single child with maxOccurs>1, and can treat the parent element as an array of the child's type.

The Row class can contain fields for all elements in the ‘Row’ element definition, and can be defined as an inner class of a GetSomeRowsResponse class. This can ensure that the Row class can be named according to the name in the schema without fear of name collisions, which might otherwise be the case if another service used a schema that contained a ‘Row’ element definition that differs from this one.
Generated Java types can implement java.io.Serializable. This can allow any generated Java type to be serialized to an ObjectOutputStream, and deserialized from an ObjectInputStream. Given the above Java type definitions, in order to retrieve the IntField value from the first Row object in a response object of the above type, a user could write the following code:

    
    
        GetSomeRowsResponse response=< . . . code to invoke the service . . . >;
        int intField=response.Rows[0].IntField;

Types

    
    


A single top-level type can be generated to represent the schema for a service request. The generated Java type can be named according to the following pattern:

    
    
        <service name>Request

Another possible naming convention would use the root element name or the schema name. However, both these approaches have their problems. In general, the schema name might contain information about the application view and service for which it was defined. This information may not be not terribly useful or readable in the context of the JWI definition. The root element name may not be guaranteed to be unique among all root element names for all service request/responses and event payload types in the application view. Thus using the root element name could lead to name collisions in the generated JWI file. Because the service name is guaranteed to be unique within an application view, this name can be used to qualify the name of the generated Java type.

    
    


A single type can be generated to represent the schema for a service response. The generated Java type can be named according to the following pattern:

    
    
        <service name>Response

A single type can be generated to represent the schema for an event. The generated Java type an be named according to the following pattern:

        <event name>Event

Invoke Service Synchronously

    
    


Given an application view control instance, such as may be represented by a JWI file with the same name as the application view control instance type name, a JWS developer can invoke an application view service using a single simple Java method taking and/or returning simple Java objects. These objects can represent the data structures required by the service and described by the schemas for request/response on the service. The JWI file can contain sufficient information in any generated types to support the generation of useful JavaDoc pages. Such JavaDoc information can be gleaned from the service names and descriptions, and any documentation elements in the request/response schemas.
When the method representing a synchronous service is invoked, the caller can block until the method returns and the response data is available. Any exceptions thrown from the underlying invocation of the service can be thrown as-is back from the method representing the service. No wrapping of exceptions may be performed by the application view control.
The control wizard can generate a method declaration for each service, not designated as async, on the application view. The generated method can have the following signature:















/**



 * @jws:av-request xml-map::<xml map definition for Java−



>request XML mapping>::



 * @jws:av-response xml-map::<xml map definition for



response XML−>Java mapping>::



 */



public <return type> <service name>(<input arguments>)









throws ApplicationViewException, RemoteException










Here, <return type> represents a generated Java type corresponding to the <response schema+root element name> for the service, and <input arguments> represents the generated Java type(s) for the <request schema+root element name> for the service. The @jws:av-request and @jws:av-response JavaDoc annotations can be used to control how Java types are mapped to XML for input to the service, and how XML output from the service is mapped to Java types, respectively.

The input argument list can represent the fields of the generated request Java type. This effectively ‘unwraps’ the request type, making it easier for the user to invoke the JWI method representing a service, because variables only need to be created for the request fields, and not the request itself. This can be particularly useful in cases where the generated request type contains a small number of fields. Without unwrapping, the user could have to create a wrapper object, then set its few fields before passing the wrapper object into the JWI service method. With unwrapping, the user can simply pass these field values directly into the JWI service method.
Invoke Service Asynchronously
To invoke a service asynchronously, a user can designate the service to be invoked asynchronously, such as at design-time while importing the application view. This can cause the control wizard to generate code for both a call-in and a callback method in the JWI. The call-in method can have the following signature:















/**



 * @jws:av-service name=“<service name>” async=“true”



 * @jws:av-request xml-map::<xml map definition for



Java−>request XML mapping>::



 */



public String <service name> (<input arguments>)









throws ApplicationViewException, RemoteException










The @jws:service async=“true” JavaDoc annotation can be required to indicate that this method represents an async service invocation. Without this, there may be no way to distinguish an async service method from a service method that returned a single String value. The @jws:av-request JavaDoc annotation can be used to control how Java types are mapped to XML for input to the service.

When a call-in method is invoked, the request can be enqueued, and the call can return without actually servicing the request. Instead, an identifier representing the enqueued request can be returned that allows the correlation of request to response when the response is actually returned, such as by the callback method. This request identifier is a String object. At a later time, such as may be subject to server load, the number of threads processing async requests, and the amount of time required for the EIS to process the request, the response can be made available to the JWS instance via its implementation of the callback method. The callback method can have the following signature and can be defined in the JWI's Callback interface:












public   interface   Callback   extends


ApplicationViewControl.Callback


{









. . .



/**



 * @jws:av-async-response xml-map::<xml map definition







for response XML−>Java mapping>::









 */



public void on<service name>Response(String requestID,







<output arguments>)









throws Exception;









. . .







}









The requestID parameter to the callback can give the identifier for the request caused this response. The <output argument> parameters can represent the response data from the async service invocation, and can be dependent on the response schema for the service. The @jws.av-async-response JavaDoc annotation can be used to control hor XML output from the service is mapped to Java types.
In order for a JWS instance to receive this callback, it can implement a method with the following signature:












public void <control instance name>_on<service name>


Response (String requestID, <output arguments>)









throws Exception










Here, <control instance name> is the name of the variable that holds the reference to the control instance in the JWS file. For example, an application view can be imported based on the database adapter that handles customers (e.g. CustomerMgmt). This can result in the generation of a CustomerMgmt.jwi file. Assuming services to create/update/delete customers named CreateCustomer, UpdateCustomer, DeleteCustomer, respectively, and assuming that the JellyBeans design-time user designated the UpdateCustomer service as async as the user imported the ApplicationView, the JWI file could look like this:















import Weblogic.jws.control.ApplicationViewControl;



/**



 * @jws:identity name=“CustomerMgmt” user-id=“system”



password=“<encrypted passwords>”



 * @jws:namespace xm=“http://bea.com/jws/xmap”



 */



public interface CustomerMgmt extends



ApplicationViewControl



{









. . . <other classes for create/delete> . . .



public static class UpdateCustomerRequest









implements java.io.Serializable









{









public static class Input implements









java.io.Serializable









{









public String FirstName;



public String LastName;



. . . <fields to describe updated customer









info> . . .









}









}



// No type generated for UpdateCustomerResponse









because it holds a single int









public interface Callback extends









ApplicationViewControl.Callback









{









. . . <other async response callbacks> . . .



/**



 * @jws:av-async-response xml-map::



 *









<RowsAffected>{RowsAffected}</RowsAffected>::









*/



public void onUpdateCustomerResponse (String









requestID, int RowsAffected);









. . . <other event callbacks> . . .









}



/**



 * @jws:av-service name=“UpdateCustomer”









async=“true”









 * @jws:av-request xml-map::










 *
<Input>










 *
<FirstName>{Input.FirstName}</FirstName>



 *
<LastName>{Input.LastName}</LastName>



 *
. . . other field mappings for update info . . .










 *
</Input>::









 */









public String UpdateCustomer









(UpdateCustomerRequest.Input Input)









throws Exception;









. . . <other service methods>. . .









}







And the JWS file could look like this:


import Weblogic.jws.*;


import Weblogic.jws.control.*;


public class CustomerMgmtService


{









/**



 * Our control instance



 * @jws:application-view



 * @jws:control



 */



private CustomerMgmt custMgmt;



/**



 * This method begins a JWS conversation. We can only







invoke async services when









 * in a conversation. This is because the conversation is







required to accept the









 * async response.



 *



 * @jws:operation



 * @jws:conversation start



 */



public String UpdateCustomerAsync(String FirstName,







String LastName,









<fields for updated







info>)









throws Exception









{









CustomerMgmt.UpdateCustomerRequest.Input request =









new CustomerMgmg.UpdateCustomerRequest.Input( );









request.FirstName = FirstName;



request.LastName = LastName;



. . . fill in other fields . . .



String requestID =









custMgmt.UpdateCustomer(request);









return “invoked service as request ′” + requestID +







“′” +









“, will notify you when we're done”;









}



/**



 * This is a callback for any async service error. This







is called when an async









 * request ends in error. This is necessary because the







specific signature of









 * the async response callback does not, in general,







support passing back error









 * information.



 */



public void



custMgmt_onAsyncServiceError(String requestID, String







errorMessage)









{









System.out.println (“** In onAsyncServiceError with ′”







+ requestID + “′ and ′” +









errorMessage +“′”);









}



/**



 * This is the callback for the ‘UpdateCustomer’ service



 */



public void



custMgmt_onUpdateCustomerResponse(String requestID, int







rowsAffected)









{









System.out.println(“Got async response for request ′”







+ requestID + “′.” +









“ We updated ” + rowsAffected + “







rows”);









}







}









The JWS instance can be in conversational mode before invoking a method representing an async service on an application view control instance. This can be required in certain systems where something is around after the initial request call returns in order to receive the response at a later date. In non-conversational JWS instances, no state may be maintained between method invocations, and thus no state may be available to assist in the processing of the async response. In conversation mode, the response can be routed back to the proper JWS/control instance such that the appropriate state can be used to process the response (i.e. the state, or a descendent of the state, that was present when the async request was made).
The async request can be entered by calling an ApplicationView.invokeServiceAsync( ) method with a ServiceHandle instance, and a specific response queue (CAJUN_ASYNC_RESPONSE_QUEUE). An ApplicationViewBean implementation can attach the ServiceHandle instance representing the JWS instance to the async request, and the async request processor can replicate the ServiceHandle into the async response. The async response can be retrieved by a message driven bean (MDB) listening on the CAJUN_ASYNC_RESPONSE_QUEUE queue. This MDB can retrieve the ServiceHandle from the response message, and route the response by calling ServiceHandle.invoke( ).
The ability of async responses to survive a server crash/restart can be directly predicated on the ASYNC_REQUEST and WLAI_ASYNC_RESPONSE queues being managed by a JMS server running in persistent mode. The MDB can always be up and listening to the response queue, so as long as the responses arrive/remain on the queue, the response can be routed to the JWS instance that made the request.
A CAJUN_SYNC_RESPONSE_QUEUE can be a distributed queue with multiple physical destinations. When a response is enqueued to the response queue, it can be sent to a single physical destination. The MDB deployment listens on a single physical destination, even though it can establish its connection by specifying a distributed destination. Thus, a single MDB deployment can receive the response and receive it exactly once.
Multiple async requests could be pending for a given JWS conversation instance at any given time. This means that multiple responses may be ready to dispatch to the JWS conversation instance at any given time. An entity EJB locking mechanism can be relied upon to ensure that only one response is dispatched to the entity EJB at a time.
Listen for Event in Existing Conversation
A JWS instance can be in conversation mode in order to listen for and receive events. This means that a JWS method marked as @jws:conversation phase=“start” can have been invoked prior to attempting to receive events. To receive events, a JWS instance can indicate its desire to receive events, such as by invoking an enableEventDelivery( ) method on the application view control instance from which it wishes to receive events. After such a call, callback methods corresponding to events of given types can be invoked. To stop receiving events, a JWS instance can invoke the disableEventDelivery( ) method on the ApplicationView control instance.
Events can be delivered via a callback method. The signature of the callback method (within the application view control JWI file) can be of the form:












public interface Callback extends


ApplicationViewControl.Callback


{









. . . <other callback methods> . . .



/**



 * @jws:av-event xml-map::<xml map definition for







event payload XML−>Java mapping>::









 */



public void on<event name>(<event Java type>)









throws Exception;









. . . <other callback methods> . . .







}









The @jws:av-event JavaDoc annotation can be used to control how the event payload XML is mapped to the Java types represented in the callback signature.

The callback method can be implemented in the JWS and can conform to the standard Cajun control callback naming scheme (<control instance name>_<callback name>). So in this case:















public void <control instance name>_on<event



name>(<event Java type>)









throws Exception










The application view control can manage the subscription for events upon receiving a call to the enableEventDelivery( ) method, and can unsubscribe for events upon receiving a call to the disableEventDelivery( ) method. In general, JWS developers can call enableEventDelivery( ) from a conversation start JWS operation, or from an operation that is guaranteed to be called within a conversation, and can call disableEventDelivery( ) before the conversation ends.

EVENT USAGE EXAMPLE
A JWS developer can use the event listening features in many ways. One typical example would be of a JWS that acts as a ‘daemon’ service that handles synchronizing data records from one system to another. The JWS can be ‘triggered’ to start listening for events via a JWS operation, and can stop listening for events via another JWS operation.
Between ‘start listening’ and ‘stop listening’ operation calls, a JWS can process any incoming events according to business logic coded in the event callback methods or utility methods on the JWS. Such processing can make use of any state accumulated into the JWS conversation instance. Given this, it can be possible for a JWS implementation to ‘parameterize’ its processing of events by parameters passed into the ‘start listening’ operation.
As an example of this type of JWS usage, a use case can be described in which a user wishes to synchronize a customer database in a customer relationship management (CRM) system with multiple legacy customer databases. The legacy customer databases can contain customers meeting different criteria. For the sake of example it can be assumed that LegacyEast only contains customers that live in the eastern part of the United States. LegacyWest only contains customers that live in the western part of the United States. The CRM database contains customers from both the eastern and western parts of the United States.
An example JWS can be intended to synchronize changes in the CRM database into the appropriate legacy database (LegacyEast or LegacyWest). There can be an application view defined for each database and named <db name>AppView. Each application view can have a CreateCustomer, DeleteCustomer, and UpdateCustomer service. Each of these application views can be imported via the application view control wizard, and can have a JWI file representing each one. The JWI class names can match the names of the ApplicationViews (i.e. <db name>AppView).
Given these descriptions, a JWS could be written that looks like the following:












import system.jws.*;


import system.jws.control.*;


public class CustomerMgmtService


{









/**



 * ApplicationView control instance for CRM database



 * @jws.applicationView



 * @jws:control



 */



private CrmAppView crmAppView;



/**



 * ApplicationView control instance for LegacyEast







database









 * @jws:applicationView



 * @jws:control



 */



private LegacyEastAppView legacyEastAppView;



/**



 * ApplicationView control instance for LegacyWest







database









 * @jws:applicationView



 * @jws:control



 */



private LegacyWestAppView legacyWestAppView;



/**



* Saved state indicating what longitude is considered to







be the









 * dividing line between the east and west halves of the







U.S.









 */



private float m_cutoffLongitude;



/**



 * This is our ‘start listening’ operation. When invoked,







we'll start









 * processing events from the CRM app view.



 *



 * @jws conversation phase=“start”



 */



public void startListening(float cutoffLongitude)



{









// Store state information to be used when processing







events









m_cutoffLongitude = cutoffLongitude;



// Start listening for events



crmAppView.enableEventDelivery( );









}



/**



 * This is our ‘stop listening’ operation. When invoked,







we'll stop









 * processing events from the CRM app view.



 *



 * @jws conversation phase=“finish”



 */



public void stopListening( )



{









// Stop listening for events



crmAppView.disableEventDelivery( );









}



/**



 * This is a callback indicating a new customer has been







created in the









 * CRM database. We will only get called back on this







method after









 * a call to startListening(float) has been made, and







before a call to









 * stopListening( ) has been made.



 */



public void







crmAppView_onCustomerCreated(CrmAppView.CustomerCreatedEvent.


Customer event)









{









if (isEast(event))



{









createEastCustomer(event);









}



else if (isWest(event))



{









createWestCustomer(event);









}



else



{









System.out.println(“Customer is not and East or







West United States customer”);









}









}



/**



 * Check the newly created customer to see if they live







in the east or west as









 * determined by their address, city, state and our







stored cutoff longitude.









 */



private boolean







isEast(CrmAppView.CustomerCreatedEvent.Customer event)









{









// Fetch address information from event and calculate







longitude









float longitude = getLongitude(event.Address,







event.City, event.State);









// Are we east?



return longitude > m_cutoffLongitude;









}



/**



 * Check the newly created customer to see if they live







in the east or west as









 * determined by their address, city, state and our







stored cutoff longitude.









 */



private boolean







isWest(CrmAppView.CustomerCreatedEvent.Customer event)









{









// Fetch address information from event and calculate







longitude









float longitude = getLongitude(event.Address,







event.City, event.State);









// Are we west?



return longitude <= m_cutoffLongitude;









}



/**



 * Utility function to calculate longitude of a given







address, city and state.









 */



private float getLongitude(String address, String city,







String state)









{









float longitude = m_cutoffLongitude;



// Maybe make use of a general purpose geographical







data service via a









// Web service and ServiceControl instance.



return longitude;









}



/**



* Create a new customer in the LegacyEast database



*/



private void







createEastCustomer(CrmAppView.CustomerCreatedEvent.Customer


event)









{









LegacyEastAppView.CreateCustomerRequest.Customer







request =









new







LegacyEastAppView.CreateCustomerRequest.Customer( );









// Fill in the request from the data we got off the







event.









// NOTE: The fields might not have the same names,







and may not map









//   one to one from event to request. If this is







the case,









//   we would write code to transform event field







data into the









//   proper form for the request



request.FirstName = event.FirstName;



request.LastName = event.LastName;



request.Address = event.Address;



request.City = event.City;



request.State = event.State;



. . . fill in the rest of the fields . . .



legacyEastAppView.CreateCustomer(request);









}



/**



 * Create a new customer in the LegacyWest database



 */



private void







createWestCustomer(CrmAppView.CustomerCreatedEvent event)









{









LegacyWestAppView.CreateCustomerRequest.Customer







request =









new







LegacyWestAppView.CreateCustomerRequest.Customer( );









// Fill in the request from the data we got off the







event.









// NOTE: The fields might not have the same names,







and may not map









//   one to one from event to request. If this is







the case,









//   we would write code to transform event field







data into the









//   proper form for the request



request.FirstName = event.FirstName;



request.LastName = event.LastName;



request.Address = event.Address;



request.City = event.City;



request.State = event.State;



. . . fill in the rest of the fields . . .



legacyWestAppView.CreateCustomer(request);









}







}









A user of this JWS could then call ‘startListening( )’ and pass a longitude somewhere in the middle of the United States. From this point, until no more synchronization is desired, the JWS, or its single conversational instance, could continue to synchronize customers between the CRM database and LegacyEast/LegacyWest databases.
If a JWS developer wants to allow for better parallelism, the developer can define ‘startListening( )’ to take a range of longitudes. The JWS conversation instance could then only handle the creation of customers only when the customer's longitude fell within the given range. In this way, the JWS user could call startListening with multiple discrete longitude ranges, and get parallel synchronization of customers from multiple JWS conversation instances.
Application views may not explicitly provide for event filtering based on payload content. Each independent JWS conversation instance mentioned above could receive a copy of the event, and they could discard it if it did not meet the filter criteria. The event delivery mechanism for the application view control (ApplicationViewControl) can be directly invocable from an MDB onMessage( ) callback. This can allow an AI event processing MDB to directly dispatch the event to Cajun without the need for an intervening send/publish to another destination.
The event delivery mechanism can store event >watch=information that will control the routing of events off the AI event queue into JWS conversation instances. This event watch info can include a mapping from event type to Cajun ServiceHandle, that can identify the JWS/conversation/control instance identity, and can be persistently stored to a database.
Upon initialization, the event delivery mechanism can read stored event watch information and prepare to route events based on those event watches. As new event watches are added, they too can be persisted to the event watch store, such as to a single table in the database.
This implementation can allow event subscription information and associations with JWS instances to survive server crashes/restarts. A system entity EJB locking mechanism can be relied upon to handle concurrency issues with dispatching multiple events from different nodes in a cluster to the same conversation instance.
JavaDoc Tag Reference


    
    
        application-view—Can be used on the JWI class to identify an instance of the ApplicationViewControl.
        av-identity—can be used on the JWI class to identify the application view this control represents and identify the ‘Run As’ user and password. The ‘Run As’ can be used to establish the runtime identity under which all services on the ApplicationView will be invoked. If this tag is not specified, defaults can apply.
        name—Attribute of identity tag. Can give the ApplicationView's qualified name (dot-separated qualifiers). If not specified, can default to the fully qualified class name of the JWI interface name. For example, a JWI interface named CustomerMgmt in the EastCoast.Sales package can imply an application view name of ‘EastCoast.Sales.CustomerMgmt’.
        user-id—Attribute of identity tag. Gives the ‘Run As’ user name. If not specified, this can default to the ‘default’ system identity in the server.
        password—Attribute of identity tag. Gives the ‘Run As’ user name. Required if user-id is specified, ignored if user-id is not specified, so no default value is applied.
        av-service—Used on the JWI method (call-in only) to indicate that this method represents an ApplicationView service. If not specified, default attributes will apply.
        name—Attribute of av-service. Gives the name of the service on the ApplicationView. If not specified, the method name is used.
        async—Attribute of av-service. Indicates whether this service should have asynchronous behavior. Can default to false. If true, the return type can always be String, and can be the request id of the async request. There can be a corresponding method in the Callback interface called ‘on<async method name>Response’. The input arguments to this method represent the response from the async service invocation.
        av-request—Used on a JWI method (call-in only) to specify the xml-map to use when marshalling Java->XML. Can default to null. If null, ‘natural’ serialization can be used (which means field->element names and containment must match exactly).
        av-response—Used on a JWI method (call-in only) to specify the xml-map to use when unmarshalling XML->Java. Can default to null. If null, ‘natural’ deserialization is used (which means field->element names and containment must match exactly).
        av-async-response—Used on the async response callback method to specify the xml-map to do XML->Java. Can default to null. If null, ‘natural’ deserialization can be used (which means field->element names and containment must match exactly).
        av-event—Can be used on an event callback method to specify the xml-map to do XML->Java. Can default to null. If null, ‘natural’ deserialization is used (which means field->element names and containment must match exactly).

There can be a way to attach non-JMS data to an async request so that a Cajun ServiceHandle instance can be stored. This instance can be used to correlate the async response to the correct Cajun JWS/control instance. Currently, only a hastable of JMS properties can be specified. JMS only allows limited types of data to be stored as properties. Thus a side-band can be used to hold non-JMS data. An additional signature for the ApplicationView.invokeServiceAsync( ) method can be added that includes a ‘user object’ parameter:

    
    

















public String



invokeServiceAsync(String serviceName,









IDocument request,



String responseQueueJNDIName,



Map jmsPropertyMap,



Serializable userObject)









throws ApplicationViewException, RemoteException










In addition, a user object value can be included in the AsyncServiceRequest object created to represent this request, and can be transferred to the AsyncServiceResponse object that will result from this request. The user object can be retrieved from the AsyncServiceResponse object thus:

    
    
        public Serializable getUserObject( )
    
    


The foregoing description of preferred embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to one of ordinary skill in the relevant arts. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalence.

## Claims

1. A method for providing access to an application view service, comprising:
identifying an application view definition for an application view to be accessed, wherein the application view definition defines services for the application view, and wherein the application view provides a layer of abstraction between an adapter and functionality of an enterprise information system exposed by the adapter;
generating a control file representing that application view definition;
allowing a user to select services defined for the application view;
allowing the user to determine at least one of synchronous and asynchronous invocation support for each of the selected services;
generating a control file includes generating a Java Web Interface (JWI) file containing Java class definitions corresponding to schemas for all services on the application view;
generating classes to describe events for the selected services; and
generating an application view control to allow the user or a client application to interact with the application view service using the classes and the control file.

2. A method according to claim 1, wherein:
generating a control file includes generating an annotated Java file.

3. A method according to claim 1, wherein:
generating classes to describe events includes generating classes to describe requests and responses for each of the selected services.

4. A method according to claim 1, further comprising:
generating a schema definition allowing the application view to be imported into an external software environment.

5. A method according to claim 4, further comprising:
generating a Java type that contains fields for all element definitions at a root level of the schema.

6. A method according to claim 4, further comprising:
generated a Java type that is an inner class of a container class representing at least one of a request and response for the selected services.

7. A method according to claim 1, further comprising:
allowing a user to select namespaces and application view definitions from a navigation tree.

8. A method according to claim 1, wherein:
allowing the user to determine at least one of synchronous and asynchronous invocation support for each of the selected services occurs at design-time.

9. A method according to claim 1, further comprising:
allowing the user to update an instance of application view control using metadata contained in the application view.

10. A method according to claim 1, further comprising:
allowing the user to iteratively import an application view to an application view control instance in the development phase of a Web service.

11. A method according to claim 1, further comprising:
automatically updating when a user changes selected services.

12. A method according to claim 1, further comprising:
generating a servlet to implement an interface for generation of the control file.

13. A method according to claim 12, wherein:
generating a servlet includes generating a servlet that can accept information taken from the user and can return the text for the control file.

14. A method according to claim 1, further comprising:
generating an application view event that can be processed by a conversation Java Web services (JWS) instance.

15. A method according to claim 14, further comprising:
allowing the user to specify the name of a control instance variable to be used with the JWS instance.

16. A method according to claim 1, further comprising:
generating a Java object capable of invoking an application view service, the Java object representing the data structures required by the service.

17. A method according to claim 1, further comprising:
allowing a JWS instance to receive events for a selected service by invoking an enable-delivery method on the application view control instance from which the instance wishes to receive events.

18. A computer system for providing access to an application view service, comprising:
a processor;
means for identifying an application view definition for an application view to be accessed, wherein the application view definition defines services for the application view, and wherein the application view provides a layer of abstraction between an adapter and functionality of an enterprise information system exposed by the adapter;
means for generating a control file representing that application view definition;
means for allowing a user to select services defined for the application view;
means for allowing the user to determine at least one of synchronous and asynchronous invocation support for each of the selected services;
means for generating a control file includes generating a Java Web Interface (JWI) file containing Java class definitions corresponding to schemas for all services on the application view;
means for generating classes to describe events for the selected services; and
means for generating an application view control to allow the user or a client application to interact with the application view service using the classes and the file.

19. A computer-readable medium, comprising:
means for identifying an application view definition for an application view to be accessed, wherein the application view definition defines services for the application view, and wherein the application view provides a layer of abstraction between an adapter and functionality of an enterprise information system exposed by the adapter;
means for generating a control file representing that application view definition;
means for allowing a user to select services defined for the application view;
means for allowing the user to determine at least one of synchronous and asynchronous invocation support for each of the selected services;
means for generating a control file includes generating a Java Web Interface (JWI) file containing Java class definitions corresponding to schemas for all services on the application view;
means for generating classes to describe events for the selected services; and
means for generating an application view control to allow the user or a client application to interact with an application view service using the classes and the control file.

20. A computer program product for execution by a server computer for providing access to an application view service, comprising:
computer code for identifying an application view definition for an application view to be accessed, wherein the application view definition defines services for the application view and wherein the application view provides a layer of abstraction between an adapter and functionality of an enterprise information system exposed by the adapter;
computer code for generating a control file representing that application view definition;
computer code for allowing a user to select services defined for the application view;
computer code for allowing the user to determine at least one of synchronous and asynchronous invocation support for each of the selected services;
computer code for generating a control file includes generating a Java Web Interface (JWI) file containing Java class definitions corresponding to schemas for all services on the application view;
computer code for generating classes to describe events for the selected services; and
computer code for generating an application view control to allow the user or a client application to interact with an application view service using the classes and the control file.

21. A computer system comprising:
a processor;
object code executed by said processor, said object code configured to:
identify an application view definition for an application view to be accessed, wherein the application view definition defines services for the application view, and wherein the application view provides a layer of abstraction between an adapter and functionality of an enterprise information system exposed by the adapter;
generate a control file representing that application view definition;
allow a user to select services defined for the application view;
allow the user to determine at least one of synchronous and asynchronous invocation support for each of the selected services;
generate a control file includes generating a Java Web Interface (JWI) file containing Java class definitions corresponding to schemas for all services on the application view;
generate classes to describe events for the selected services; and
generate an application view control to allow the user or a client application to interact with an application view service using the classes and the control file.