Service.xml keeps a tree structure of the published
services. It also keeps the attributes used to initiate the widget according
to the widget runtime standard.
Here is an example of Service.xml:
<?xml version="1.0" encoding="UTF-8"?>
<ServiceList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://btt.cn.ibm.com/61/Web20"
xsi:schemaLocation="http://btt.cn.ibm.com/61/Web20 ../BTTWeb20/schema/Service.xsd">
<ServiceRepository id="bttroot" name="my_service" desc="my_service"
logo="theme/servicelogo/serviceList.gif" expand="1">
<ServiceCategory id="0" name="basic_widget" desc="basic_widget"
logo="theme/servicelogo/serviceCategory.gif">
<Service id="0.1" name="html_service" desc="html_service" logo="theme/servicelogo/navlogo.gif">
<Widget name="simpleHTMLWgt">
<attribute name="url" value="http://www.ibm.com" />
</Widget>
</Service>
</ServiceCategory>
...
</ServiceRepository>
</ServiceList>
Parameters specification for each tag are as follows:
- ServiceRepository is the root element of the service
tree:
Table 1. Parameters specification for ServiceRepositoryParameter |
Description |
id |
The service repository id, mandatory and unique |
name |
The service repository name, it will be displayed as
the root node. Mandatory |
desc |
The description of the service repository, it will be
displayed as a tip. If no tip is needed, you can set the value as an empty
string. Mandatory |
logo |
The URL of the logo. If no logo is needed, you can set
the value as an empty string. Mandatory |
expand |
The attribute to determine if the tree is expanded or
not. 1 stands for expanded, while 0 stands for collapsed. Optional |
ServiceCategory |
The intermediate node of the service tree. Optional |
Service |
The leaf node of the service tree. Optional |
- ServiceCategory is the intermediate node of the service
tree:
Table 2. Parameters specification for ServiceCategoryParameter |
Description |
id |
The service category id, mandatory and unique |
name |
The service category name, it will be displayed in the
service tree. Mandatory |
desc |
The description of the service category, it will be
displayed as a tip. If no tip is needed, you can set the value as an empty
string. Mandatory |
logo |
The URL of the logo. If no logo is needed, you can set
the value as an empty string. Mandatory |
expand |
The attribute to determine if the tree is expanded or
not. 1 stands for expanded, while 0 stands for collapsed. Optional |
ServiceCategory |
The intermediate node of the service tree. Optional |
Service |
The leaf node of the service tree. Optional |
- Service is the leaf node of the service tree:
Table 3. Parameters specification for ServiceParameter |
Description |
id |
The service id, mandatory and unique |
name |
The service name, it will be displayed in the service
tree. Mandatory |
desc |
The description of the service, it will be displayed
as a tip. If no tip is needed, you can set the value as an empty string. Mandatory |
logo |
The URL of the logo. If no logo is needed, you can set
the value as an empty string. Mandatory |
Widget |
The widget that will be displayed in the widget window.
One service consists of only one widget. Mandatory |
- Widget is the service widget binding to one service node.
One service node has only one widget now.
Table 4. Parameters
specification for WidgetParameter |
Description |
name |
The Widget name, it will be displayed in the widget
window. The widget name should relate to WidgtCatalog.xml in name attribute.
Refer to WidgetCatalog.xml.
Mandatory |
attribute |
The attribute of the widget. It will override the attributes
defined in the widget definition file. Refer to WidgetCatalog.xml.
Optional |
- attribute is used to initiate the widget. It will override
the attributes defined in the widget definition file.
Table 5. Parameters
specification for attributeParameter |
Description |
name |
The attribute name. Mandatory |
value |
The value of the attribute. Mandatory |