Oracle9i Application Server Wireless Edition Developer's Guide Release 1.1 Part Number A86700-01 |
|
This document describes the XML formats that Wireless Edition uses to represent service content and its internal objects. Each section of this document presents a different topic. These sections include:
Extensible Markup Language (XML) is a standards-based language for creating structured documents. In an XML document, markup tags describe the content of the document, rather than its visual presentation:
<account_dept> <employee> <emp_name>Scott</emp_name> <emp_ID>20</emp_ID> </employee> <employee> <emp_name>Laura</emp_name> <emp_ID>30</emp_ID> </employee> </account_dept>
Because it isolates content from presentation, XML is an ideal language for exchanging data between diverse platforms. Transformers, in the form of XSLT stylesheets or Java classes, render the data in the format best suited to a particular platform.
The Wireless Edition uses the Oracle XML Parser for Java. The parser supports the W3C XML 1.0 Standard Recommendation. While the parser supports various character encoding standards, the Wireless Edition uses UTF-8 character encoding.
The parser requires a version attribute in the XSL stylesheet, while prior versions do not. If you have created your own result and/or device transformers, you have to include the XML version number in the XSL stylesheet.
For example:
<xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Without the version attribute, you will receive a runtime error in the Wireless Edition log file in the form of "missing version attribute from the stylesheet."
The Oracle XML Parser exposes two interfaces:
To improve performance and usability, the APIs reside in a single archive. The Oracle XML Parser is provided as a .jar file comprising the following four packages:
In Wireless Edition, XML serves two primary functions: to define the format of service content and to define repository objects. The content formats include the following:
The Simple Result DTD defines the format of deliverable service content. Adapter Result is an intermediary format for service content.
The object formats include:
The Provisioning DTD defines the structure of user objects. You can use the Provisioning DTD to transfer user information between Wireless Edition and an external provisioning system.
Repository XML is not defined by a DTD, since repository objects can have extended attributes which cannot be validated. An extended attribute can be an XML document, such as XSLT, or a Java program. Transformer and adapter objects have extended attributes.
This document contains references for the Wireless Edition XML formats. The references list the attributes and subelements for every element in the Simple Result and Provisioning DTDs. It uses the following DTD symbols to indicate the usage of subelements.
Table 9-1 DTD Symbols
The Adapter Result (also called raw result) format is a simplified, user interface-independent content format. Adapter Result documents must be converted to Simple Result format prior to conversion to their final target format. This intermediary step, called preprocessing, enables you to apply a service-specific transformation to the content returned by an adapter. Result transformers convert Adapter Result documents. Adapter Result format provides an efficient means of exchanging data between chained services.
Note: Both standard adapter services based on the Web Integration adapter, and user-designed custom adapters can use the Adapter Result format. |
The Wireless Edition does not specify an Adapter Result DTD. You can define the content any way you like. While the content is not validated by Wireless Edition, it must be well-formed. The only element Wireless Edition requires in Adapter Result content is the <AdapterResult>
tag. The remaining structure of the content is important only to the transformer that processes it. For example:
<AdapterResult> <Value name="target"> /parm/epayment/amex </Value> <Value name="creditcard"> Please enter your credit card no: </Value> <Value name="expdate"> Please enter expiration date: </Value> </AdapterResult>
The sample uses a single element type, the Value
tag. The first Value
element contains a link to another service in the Wireless Edition repository tree (using JNDI-naming format).
A result transformer converts the Adapter Result content as follows:
<SimpleResult> <SimpleForm link="/parm/epayment/amex"> <SimpleFormItem name="creditcard" description="Please enter your credit card no:"/> <SimpleFormItem name="expdate" description="Please enter expiration date:"/> </SimpleForm> </SimpleResult>
The elements in the Simple Result DTD represent the elements of an abstract user interface. These include text items, menus, forms, and tables. When converting source content to Simple Result format, adapters map the source content to the appropriate Simple Result element. Likewise, when converting the content from Simple Result format to the target format, transformers map the Simple Result elements to the appropriate elements in the target format.
Appendix A, "Simple Result DTD Reference" describes the content of the Simple Result DTD in detail.
The Wireless Edition repository holds the persistent Wireless Edition objects, such as end users, user groups, services, adapters, and transformers. Internally, Wireless Edition stores these objects as database objects in an Oracle8i database. In most cases, you create or modify repository objects using the Service Designer. However, you can also export, modify, and import the repository as an XML file, using utilities provided by Wireless Edition. To use these utilities, you must understand the XML structure of the repository, as described in this section.
Wireless Edition provides an XML editor that you can use to modify the XML definitions of objects directly in the repository. You can also modify objects in an XML file. To do so, you export the repository using LoadXml
or the download
utility, and edit the resulting XML file. When finished, you re-import the file into the repository, committing your changes. See Section 9.9, "XML Tools" for more information on using the XML Editor or the LoadXML
utility.
Repository XML enables you to distribute populated repositories easily. It also enables you to access the repository programmatically, and to integrate Wireless Edition with other systems.
Important: Changes made directly to the repository XML are not validated by the Service Designer. Use caution to ensure that the changes you make do not cause conflicts or errors. |
The Provisioning DTD defines the XML format for Wireless Edition users. You can use it to import users into the repository programmatically, or to import a large number of users at once. The Provisioning DTD declares only two elements:
The Wireless Edition user list.
PUSR+
The PUSR
element represents a Wireless Edition user. It includes the following attributes:
A user's unique identifier in an external provisioning system. For example, this may be a telephone number or an account number. You can use this attribute to tie a Wireless Edition user to another account. This is an optional attribute.
User's display name. This is an optional attribute.
Indicates whether the user is enabled. Possible values are:
The user's password. In exported repositories, this appears in encrypted form. For uploading, this can be either an encrypted or plain text password. If the string is greater in length than 32 characters, and all uppercase, Wireless Edition assumes that it is an encrypted password.
Indicates whether the user has administrator privileges. Possible values are:
Indicates whether the user has designer privileges. Possible values are:
The Wireless Edition user identifier.
Indicates whether the user is anonymous. Possible values are:
The users home folder.
The name of the group to which the user belongs.
The XML file you import into the repository must contain appropriately formatted repository objects. Since objects in the repository, such as transformers, can have extended attributes, Wireless Edition does not validate repository XML documents. Therefore, Wireless Edition does not define a repository DTD.
Your XML definition should use the following elements for repository objects.
The PanamaObjects
element is the root element.
PGRP_LIST
PUSR_LIST
TRAN_LIST
ADAP_LIST
AGEN_LIST
PSRV_LIST
TRAN_LIST
LDEV_LIST
The Wireless Edition group list.
PGRP
The PGRP
element represents a Wireless Edition user group.
The name of the element. This is an optional attribute.
The Wireless Edition user list.
PUSR
The PUSR
element represents a Wireless Edition user.
External identifier. This is an optional attribute.
User's display name. This is an optional attribute.
Indicates whether the user is enabled. Possible values are:
The user's password. In exported repositories, this appears in encrypted form. For uploading, this can be either an encrypted or plain text password. If the string is greater in length than 32 characters, and all uppercase, the Wireless Edition assumes that it is an encrypted password.
Indicates whether the user has administrator privileges. Possible values are:
Indicates whether the user has designer privileges. Possible values are:
The user name.
Indicates whether the user is anonymous. Possible values are:
The user's home folder.
The name of the group to which the user belongs.
The Wireless Edition transformer list.
XTRA
JTRA
The XTRA
element represents an XSLT Wireless Edition transformer.
The name of the transformer.
EXT_ATTR
Extended attribute. The actual XML element that comprises the XSLT implementation.
The JTRA
element represents a Wireless Edition Java transformer.
The name of the element.
The complete class name including attributes.
The Wireless Edition logical device list.
LDEV
The LDEV
element represents a Wireless Edition logical device.
Indicates whether the logical device needs URL caching. If true, URL-encoding request parameters are cached on the server and only small pointers are encoded within the URL that is sent to the logical device. Use this option for devices with limited memory. Possible values are:
The name of the logical device.
MIME type.
Character encoding format, such as UTF-8 or ASCII.
The default transformer used by the logical device.
A string inserted in front of the output from the transformer, such as an XML document type.
The number of softkeys (used only for phones).
The number of rows on the screen (useful for breaking text in pages).
The number of columns on the screen.
The width of the screen in points.
The height of the screen in points.
The Wireless Edition adapter list.
ADAP
The ADAP
element represents a Wireless Edition adapter.
Indicates whether the adapter is valid (accessible). Possible values are:
The adapter name.
The Java class name.
The Wireless Edition service object list.
FOLD
LINK
MAST
BOMA
The FOLD
element represents a Wireless Edition service folder.
The location of the service folder, relative to the root URL of the service tree. This attribute is set by the Wireless Edition system. It cannot be edited.
The service folder name.
Indicates whether the folder is visible. Possible values are:
Indicates whether the folder is valid (available). Possible values are:
The master folder where the service folder is located.
The user name of the folder owner.
A value which determines whether a folder is visible, depending on a user's physical location.
The user group that is allowed to access the folder. This is an optional attribute.
The LINK
element represents a Wireless Edition service link.
The location of the service link, relative to the root URL of the service tree. This attribute is set by the Wireless Edition system. It can not be edited.
The service link name.
Indicates whether the link is visible. Possible values are:
Indicates whether the link is valid (accessible). Possible values are:
The folder where the link is located.
The user name of the link owner.
Name of the linked service.
The MAST
element represents a Wireless Edition master service.
The location of the master service, relative to the root URL of the service tree. This attribute is set by the Wireless Edition system. It can not be edited.
The master service name.
Indicates whether the master service is visible. Possible values are:
Indicates whether the master service is valid (accessible). Possible values are:
The folder where the master service is located.
The user name of the master service owner.
A value identifying the geographic location of the user.
The amount charged for using the service.
The adapter used by the master service.
The BOMA
element represents a bookmark.
The location of the bookmark, relative to the root URL of the service tree. This attribute is set by the Wireless Edition system. It can not be edited.
The bookmark name.
Indicates whether the bookmark is visible. Possible values are:
Indicates whether the bookmark is valid (accessible). Possible values are:
The folder where the bookmark is located.
The URL of the external datasource.
The Wireless Edition user agent list.
AGEN
The AGEN
element represents a Wireless Edition user agent.
The address of the user agent.
The name of the user agent.
The Wireless Edition user associated with the user agent.
The logical device.
An identifying attribute set by Wireless Edition.
Wireless Edition includes the LoadXml tool and upload and download utilities for working directly with the XML interface. See the Oracle9i Application Server Wireless Edition Configuration Guide for more information.
|
Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|