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:
Parameter | 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 |
Parameter | 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 |
Parameter | 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 |
Parameter | 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 |
Parameter | Description |
---|---|
name | The attribute name. Mandatory |
value | The value of the attribute. Mandatory |