Oracle9i Application Server Wireless Edition Implementation Guide Release 1.1 Part Number A86699-01 |
|
This document describes how to create and manage the services of the Oracle9i Application Server Wireless Edition using the Serivce Designer. Each section of this document presents a different topic. These sections include:
Services enable end users to access the functionality of the Wireless Edition adapters. Services represent the link between the content source and the delivery target. They tie a specific adapter to the logical devices in the Wireless Edition repository.
Services also define how users access the adapter. They can restrict or grant user access to the adapter's parameters. Services can set default values for a parameter, they can enable users to set a default, or they can hide the parameter from users altogether.
The following repository objects encapsulate and manage the Wireless Edition services:
Master services provide the actual implementation of the service. They specify the adapter used for the service and any service-specific parameters. By mapping an adapter to device transformers, master services link the Wireless Edition content sources to the delivery platforms. Each master service is based on one adapter. A master service creates its own instance of the adapter it uses. Therefore, several services can use the same type of adapter, and each can pass its own service-specific argument values.
The Wireless Edition end users typically invoke a master service by clicking on a menu item from their device. The information returned by the master service can be text, such as a movie review, or an application, such as an airline booking system. While a user request usually invokes a master service, a scheduled job can also invoke a master service.
The Wireless Edition enables developers to assign a location to a service, making the service location-based. The Wireless Edition supports two types of location-based services, location-based services that are visible to users only at certain locations and services whose content depends upon the physical location of the user. For example, Wireless Edition users located in San Francsico would see content related to San Francisco, such as lists of restaurants or business located in San Francisco. The Wireless Edition supports content-specific location-based services through customized adapter implementation and location-aware runtime support. For more information on creating location-based services that are visible only at specific locations, see Section 3.4.1 and Section 4.4, "Creating Location-Based Master Services and Folders" in Chapter 4, "Using the Region Modeling Tool". For information on creating location-based services that display content specific to the user's location, see Section 4.5, "Creating Location-Based Services with Location-Specific Content" in Chapter 4, "Using the Region Modeling Tool".
An alias is a pointer to a master service, folder, bookmark, or to another alias. Aliases are useful for distributing access to a master service among many users and groups. End users can access a master service only if the master service, or an alias to the master service, appears in a service tree they own or that a group they are a member of owns. Aliases can set parameter values that override values set at the master service.
Folders group services and make them available to end users. Every user has a "home" folder. This folder contains the services, ususally referenced by an alias, that the user can access. A user can also access any service in a folder owned by the group to which the user belongs.
You can manage service objects (master services, aliases, and folders) using the Service Designer. The Service Designer provides a tree view of the Wireless Edition repository. The repository tree includes a Master Services folder and a Service Trees folder for managing services. You can create service objects in either folder. In most cases, however, you should place folders and master services in the Master Services root folder, and user- and group-owned folders and aliases in the Service Trees root folder.
The Service Designer is a visual interface for implementing and managing the objects in the Wireless Edition. The Service Designer enables you to create and modify Wireless Edition objects, including adapters, transformers, and services.
Text description of the illustration srv_svd1.gif
The Service Designer provides a tree view of the Wireless Edition repository. The tree shows Wireless Edition object classes, such as adapters and transformers, as folders or branch nodes. It shows instances of those classes, such as the WML 1.1 transformer, as objects, or leaf nodes.
Note: For performance reasons, the default tree view in the Service Designer does not display more than 100 objects of any type. This, however, can be configured in the ptgsd.properties file. |
To start the Wireless Edition Service Designer:
Note: You cannot connect directly to the Wireless Edition repository using in-process connection. You should use an RMI connection. |
To connect to the repository through the Wireless Edition server, the RMI listener must be running on the Wireless Edition server. By default, the RMI listener is started when you start the Wireless Edition server.
In the Location field of the Log In dialog, enter the URI of the Wireless Edition server in any of the following formats:
The default port number and server name are:
You can modify these defaults in the oracle.panama.core.admin.Rmi.properties file. The System.properties file identifies the default RMI listener used as follows:
locator.request.daemon.classes=oracle.panama.core.rmi.server.ServerImpl
You can create an object in the Service Designer as follows:
Note: Before using the Service Designer to create a master service, you must first use the Web Integration Server to publish the service interface to the repository tree. |
The Service Designer then presents a form, or a sequence of forms, that lets you configure the object. You can navigate through the forms by clicking the Next or Previous button. When you have finished configuring the master service, click the Finish button.
When you highlight an object in the repository tree, the right panel displays the object's properties. If an object has more than one property panel, you can navigate between panels by clicking the tabs at the top of the panel.
You can modify an object by making changes directly to the properties in the panel. To save your changes, click the Apply button. This saves the changes you have made to any of the object's panels, not just the current panel.
To cancel the changes you have made to an object since last saving, click the Revert button. This restores the object to its prior state. If you make changes to an object, but click another object in the repository before clicking Apply, the changes to the object do not take effect.
To remove an object from the repository:
You cannot delete an adapter used by a master service. If you delete a master service that is referenced by aliases, Service Designer deletes the aliases as well.
Flagged objects appear in red type in the repository tree. The Wireless Edition flags objects that are specified as not valid or not visible. Specifying an object as not valid or not visible prevents its use. You may choose to disable an object, for example, while it is under development or testing.
The Service Designer caches object information. If multiple Service Designer users work in the same repository concurrently, the object view for each user may not be up-to-date with the state of the repository. To retrieve the latest state of the repository, click the refresh icon on the toolbar.
Each object in the Wireless Edition repository is identified by a unique object ID. You can see the object ID for an object by moving the mouse over the object. The object ID helps you to identify the object when you access the repository with another tool, such as the Wireless Edition XML Editor.
The Service Designer provides you with two methods of creating a master service in the Wireless Edition repository: you can use the Service Designer itself as described in Section 3.2.2, "Creating Objects", or through the Master Service Creation Wizard. Using the Wizard, you can successfully create a master service by following a series of steps. The Wizard provides you with a separate screen for each step, presenting the creation of a master service as a sequence. When you compete this sequence, you complete a master service. This document describes devotes a section for each step of the master service creation sequence. These sections include:
The Cancel, Help, Back, and Next buttons appear at the bottom of each of the Service Creation Wizards screens. The Back and Next buttons navigate you through the service creation sequence. Clicking the Next button takes you to the next screen, clicking the Back button takes you to the previous screen. Selecting the Cancel button closes the Master Service Creation Wizard and sets all conditions back to their original state.
After you select the Master Service Creation Wizard option from the Tools menu of the Service Designer, the Welcome screen appears. Click Next to move to the Select Service Folder screen.
To select a service folder, click the radio button for Select a Service Folder. Click the desired folder from the tree view and then click Next.
If you wish to create a new service folder, click the Create a Service Folder radio button and then click Next.
The Create New Folder screen appears, which prompts you to select a parent folder and then create a new service folder as a subfolder of that parent folder.
The Create New Service Folder screen enables you to configure the new service folder by entering values for the following parameters:
Table 3-1 Parameters for the Create New Service Folder Screen
Click Next after you have entered the desired values. The Selecting Folder screen reappears with the Select a Service Folder radio button selected (the default setting). Select the folder you created from the hiearchy and then click Next. The Setting Service Properties screen appears.
The Setting Service Properties screen enables you to configure properties for the master service by entering values for the following parameters:
Table 3-2 Configuration Properties for the Master Service
After you have entered the desired values, click Next. The Adapter Selection screen appears.
The Adapter Selection screen displays the adapters available in the Wireless Edition repository. Click the desired adapter (for example, the SQLAdapter) and then click Next. The Initial Parameters screen appears.
The Init Parameters screen contains the init parameters for the adapter you chose in Step 3. Enter the values for these parameters in the adjacent fields and then click Next. The Input Parameters screen appears.
The Input Parameters Screen displays the input parameters for the adapter you selected in Step 3. The Master Service Creation Wizard queries the adapter definition to determine the parameters that appear in this screen. For this example, the Input Parameters screen displays the parameters for the Provisioning adapter. Every Wireless Edition parameter has the following attributes:
Table 3-3 Attributes of the Wireless Edition Adapters
From this screen, you can add or delete the input parameters for the adapter. To add an input parameter, highlight the parameter and click the Add button. To delete an input parameter, select the input parameter and click the Delete button. Clicking Reset sets the input parameters back to their original state. After you have finished adding or deleting the input parameters for the adapter, click Next. The Output Parameters screen appears.
The Output Parameters screen enables you to add the output parameters for the adapter. The output parameters displayed below are for the Provisioning adapter, the adapter selected in Step 3. The Master Service Creation Wizard queries the adapter definition to determine the parameters that appear in this screen. The output parameters have the following attributes:
Table 3-4 Output Parameters for the Wireless Edition Adapters
To add an output parameter, highlight the output parameter and click the Add button. To delete an output parameter, select the output parameter and click the Delete button. Clicking Reset sets the output parameters back to their original state.
After you have finished adding or deleting the output parameters for the adapter, click Next. The Confirmation screen appears if the Wireless Edition has not found a PASection
in the master service you have created. Review the values listed on the Confirmation screen. If they are correct, click the Finish button. You have completed creating a master service.
If your master service contains a PASection
, the Create Result Transformer screen appears.
After you have set the output parameters for the adapter, the Wireless Edition checks if the input parameters include PASection
, the value used by the WIDL adapter to identify the service that is the entry point in the chained service sequence. If the Master Service Creation Wizard finds a PASection
input adapter, it invokes the Create Result Transformer screen. The tabs in the Result Transformer panel represent different PASections
.
To edit a PASection
:
PASection
you wish to edit. Each panel contains a text editor for entering the XSLT style sheet. You can also import an XLST style sheet by clicking the import button.
The Device Transformer Screen lists the logical devices in the repository. This screen enables you to specify the custom transformer used by the master service for a logical device. A custom transformer enables you to optimize the presentation of service content for a particular device. Since the transformer is specialized for a particular device and master service, you can associate a custom transformer with only one master service and one logical device.
To select a logical device:
You use both the Service Designer and the Region Modeling Tool to create services that are visible to users only at specific locations.
In the Service Designer, you access the Region Modeling tool by selecting the Location Dependent check box in the either the General tab (used for modifying a folder or service in the Wireless Edition repository tree), or the Create New Services or the Create New Folders forms (invoked by right-clicking the Wireless Edition repository) and then by clicking the Browse button.
Note: Location independent services are services, such as email, which are always visible to the user at any location. These services are created by not selecting the Location Dependent check box. |
In the Master Service Creation Wizard, you access the Region Modeling Tool by selecting the Browse button in the Creating New Folder and Setting Service Properties screens. For more information on using the Region Modeling Tool, see Chapter 4, "Using the Region Modeling Tool". For a further description of creating a location-based service, see Section 9.6, "Creating Location-Based Services" in Chapter 9, "Walkthroughs".
Note: You must be connected to the spatial database to return objects using the Region Modeling Tool. |
To make an existing folder or service location-based:
To create a location-based folder or service from the Service Designer:
To access the Region Modeling Tool from either the Create the Master Service Creation Wizard:
To modify a master service using the Service Designer, click the master service that you want to change. The object's property tabs appear in the right-hand panel of the Service Designer. You can enter new values directly in the parameter fields, then click Apply to save your changes.
Master services have the following property panels:
The General panel contains parameters that identify and describe the master service. It includes fields for the service name, the adapter on which the service is based, and the cost of the service. Typically, you set the properties listed in this panel when you first created the master service.
The Init Parameters panel shows the initialization parameters for the adapter. These parameters vary depending on the adapter implementation. The Service Designer generates the fields in this panel from the adapter definition for the master service. When the Wireless Edition first invokes the adapter, it passes the values you set in this panel to the adapter.
The following sections describe the initialization panels for master services based on the adapters provided by the Wireless Edition.
The Web Integration adapter retrieves and adapts Web content. The Web Integration adapter works with Web Interface Definition Language (WIDL) files to map source content to Wireless Edition XML. Typically, the source format for the Web Integration adapter is HTML, but developers can also use the adapter to retrieve content in other formats, such as XML.
For a master service based on the Web Integration adapter, the Init Parameters panel appears as follows:
The Init Parameters panel contains the following parameters:
Table 3-5 Init Parameters of the Web Integration Adapter
Given a URL, the stripper adapter dynamically retrieves and converts the content of the URL target. Unlike the Web Integration adapter, which uses a predefined mapping of the source content, the stripper adapter dynamically processes the markup tags in the content. Currently, the stripper adapter either removes the original markup tags or leaves them intact. Developers can extend the stripper adapter, however, so that it processes the tags in another way.
For a master service based on the SQL adapter, the Init Parameters panel includes the following parameters:
Table 3-6 Init Parameters for the SQL Adapter
The URL adapter enables integration with existing Java, JSP, or XML applications. The URL adapter supports parameterization and cookie management, thus providing an easy way to call Wireless Edition services from remote applications and make them wirelessly available. The URL adapter is well suited for developers wishing to build a wireless Web site or internet application using only Java servlets and Java Server Pages (JSPs).
Note: The target attributes in the SimpeResult XML documents retrieved by the URL adapter must be URL-encoded. |
There are no Init parameters for this adapter.
The Servlet adapter enables developers to integrate other applications that are already Java servlets, providing a convenient way to call them as Wireless Edition services and make them wirelessly available.
For a master service based on the servlet adapter, the Init Parameters panel appears as follows:
The panel contains the following parameters:
Table 3-7 Init Parameters for the Servlet Adapter
The Mail adapter is based on the JavaSoft's Java Mail API and provides mail services to both POP3 and IMAP4 mail servers. It provides basic authentication and mail session management. The Mail adapter enables users to browse, create, delete, reply, and forward mail and folders from their wireless devices. For more information on the Mail adapter, see Appendix A, "The Mail Adapter".
The Mail adapter has no init parameters. See Section 3.5.3.2 for the input parameters of the Mail adapter.
The Directory adapter provides directory service and is based on the JavaSoft Java Naming Directory Interface (JNDI) 1.2 specification. The Directory adapter also enables you to create hyperlinks.
The Init Parameters panel for the Directory Adapter includes the following parameters:
Table 3-8 Init Parameters for the Directory Adapter
The Input Parameters panel displays the input parameters for the adapter. The Service Designer queries the adapter definition to determine the parameters that appear in this panel. The master service passes the input parameter values to the adapter's invoke method every time the adapter executes.
Some parameters rely on user input for values. The values for other parameters, such as name of the WIDL service in the WIDL interface (PAsection
), are set by the master service or master service alias. PAsection
is an internal parameter, not exposed to the end user. In addition to PAsection
, the Wireless Edition provides these input parameters:
You can configure your parameters in the Service Designer. Every Wireless Edition parameter has the following attributes:
Table 3-10 Input Parameters Attributes
The following figure shows a sample Inputs panel for a Web service.
The master service determines the parameters to display in the panel by querying the adapter. Every input parameter defined in the WIDL interface appears in the Inputs panel, including parameters for other WIDL services within the WIDL interface.
In addition to the custom input parameters that you create, Web Integration services provide these parameters:
The OutputType
specifies the type of XML output that the adapter should return. You can specify RawResult
, to return content in Adapter Result format, or SimpleResult
, to return content in Simple Result format. If returning raw result format, you must create a result transformer that converts the result into Simple Result for the device transformer. The result transformer should have the same name as the value you use for the PAsection
parameter; that is, it should have the same name as the WIDL service. You use RawResult
for chained services.
PAsection
is the name of the WIDL service that you want the master service to invoke. A WIDL interface can include more than one WIDL service. The Wireless Edition lists the WIDL service names in a selection list in the value field.
InputEncoding
specifies the encoding used to encode the source document. The source document is the URL that was used to create the WIDL file for this service. See Chapter 9, "Walkthroughs" for information on creating a Web service. The default value of this parameter is UTF-8. If the language of the source document is an Asian language, you can change the default encoding to the appropriate multi-byte encoding according to the IANA standards for the particular Asian language that is used in the source document. The InputEncoding
parameter enables you to specify or change the encoding. It is part of the multi-byte character support. The Oracle9i Application Server Wireless Edition Developer's Guide provides more information about multi-byte character support.
The Mail adapter has the following input parameters.
Table 3-11 Init Parameters for the Mail Adapter
You can configure SQL input parameters just as you can Web service parameters. You specify input parameters in the SQL statement you use to implement the service. For information on creating parameterized SQL services, see Section 3.5.2.2.
For a master service based on the stripper adapter, the Inputs panel appears as follows:
The panel contains the following parameters:
Table 3-12 Input Parameters for the Stripper Adapter
The URL adapter allows applications to invoke other URLs and pass in arguments. In addition, the URL adapter enables the following functions:
The URL adapter is well suited for developers wishing to build a wireless Web site or internet application using only Java servlets and Java Server Pages (JSPs).
The panel contains the following parameter:
Table 3-13 Input Parameters for the URL Adapter
For a service that is based on the Servlet adapter, the Input Parameters panel appears as follows:
Table 3-14 Input Parameters for the Servlet Adapter
The output parameters panel allows you to set captions for service output parameters.
The Result Transformer panel specifies a transformer that the Wireless Edition uses to convert Adapter Result content. The Wireless Edition provides two content formats, Adapter Result and Simple Result. Adapter Result is intended to be an intermediary format for passing raw data between services. Device transformers, which convert service content for the target format, cannot convert Adapter Result format. A result transformer must therefore convert the content to Simple Format before it can be processed by a device transformer.
To create a result transformer:
PAsection
input parameter.
The Device Transformer panel lists the logical devices in the repository. You can specify a custom transformer to be used with the master service for a logical device. A custom transformer enables you to optimize the presentation of service content for a particular device. Since the transformer is specialized for a particular device and master service, you can associate a custom transformer with only one master service and one logical device.
You can delete a master service in the Service Designer as follows:
When you delete a master service, the Service Designer flags any aliases to the master service.
You can create folders in either the Master Services folder or the Service Trees folder of the Wireless Edition repository tree. To create a folder, you use the Create New Folder form.
To invoke the form:
The Create New Folder form appears as follows:
The panel includes the following parameters:
Table 3-15 Parameters for the Create New Folder Form
You can delete a folder in the Service Designer as follows:
A service tree is a folder you use to organize and distribute access to services. It can contain master services, service aliases, or other folders.
Folders make services accessible to users. When you create a new user, you also create a service tree for that user. Any service that you place in a user's service tree (or user's home), is accessible to the user.
Similarly, when you create a group, you specify the service trees that belong to the group. Any member of the group can access the services in that group's service trees. While a user can have only one private service tree, groups can have many service trees. Different groups can share the same service tree.
If you do not specify an owner when you create a service tree, the tree is public. If you specify an owner, the service tree is private. End users can access any public service tree, but they can only access their own private service trees. They have complete control of their service trees from the Personalization Portal; they can copy services between service trees, rename services, and create folders.
The Wireless Edition does not provide dependency tracking for a private service (a service in a private service tree). If the target service of the private service is no longer valid, an error occurs when a user attempts to submit a request for that service. The Wireless Edition then advises the user to delete the service from the private service tree.
A service alias is a link to a master service, folder, or other alias. Service aliases help you to distribute service access to multiple users or groups. They also enable you to specialize master services, since default parameter values specified by an alias override values set at the master service. This characteristic provides several benefits. One benefit is that it enables you to localize services. For example, suppose you create a service that delivers restaurant information for a city. The adapter takes a single parameter, a location, and returns a list of restaurants in the area. While the master service can specify a more general location, such as the city, you can create aliases that provide a more specific parameter, such as a district within the city. You can then distribute the aliases, as appropriate, to user groups that you assemble based on the users' locations of residence.
To create a service alias:
The first form in the sequence appears as follows:
The panel includes the following parameters:
Table 3-16 Parameters for the Create New Alias Form
Complete the properties in the form and click Finish to create the alias in the repository. You do not need to complete the second form in the sequence. You can configure the runtime parameters for the alias by modifying the alias properties, just as you would for the master service on which the alias is based. For more information on specifying runtime parameters, see Section 3.5.3.
|
Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|