The general format for the XML representation of a resource is as follows:
<resource attributes> <Methods> method-list </Methods> children </type>
The replaceable items in this format are as follows:
The name of the resource.
Zero or more name-value pairs separated by a space. Each name-value pair is specified as name="value".
One or more XML elements that represent the methods that the resource supports. For the format of each element, see XML Representation of a Resource Method.
Zero or more XML elements that specify the URLs of child resources. Each element is specified as <child-resource>url</child-resource>, where child-resource is the name of the child resource and url is the URL to the child resource.
The XML representation of a method in a method list is as follows:
<Method name="method-name"> <Message-Parameters> message-parameter-list </Message-Parameters> <Query-Parameters> query-parameter-list </Query-Parameters> </Method>
The replaceable items in this format are as follows:
The name of the method, which is GET, POST, or DELETE.
Zero or more XML elements separated by a line feed that represent the message parameters that are allowed for the method. For the format of each element, see XML Representation of a Message Parameter or a Query Parameter.
Zero or more XML elements separated by a line feed that represent the query parameters that are allowed for the method. For the format of each element, see XML Representation of a Message Parameter or a Query Parameter.
The XML representation of a message parameter or a query parameter is as follows:
<parameter-name attribute-list/>
The replaceable items in this format are as follows:
The name of the parameter.
A space-separated list of name-value pairs of attributes for the parameter. Each pair is in the following format:
name="value"
Possible attributes are as follows:
The default value of the parameter.
The set or range of acceptable values for the parameter.
The data type of the parameter, which is one of the following types:
boolean
int
string
Indicates whether the parameter is optional. If true, the parameter is optional. If false, the parameter is required.
Indicates whether the parameter is key. If true, the parameter is key. If false, the parameter is not key.
This example shows the XML representation of the resource for managing a domain. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain.
Line breaks are added to enhance readability.
<Domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" locale="" version="73"> <Methods> <Method name="POST"> <Message-Parameters> <log-root Key="false" Type="string" Optional="true"/> <application-root Key="false" Type="string" Optional="true"/> <locale Key="false" Type="string" Optional="true"/> <version Key="false" Type="string" Optional="true"/> </Message-Parameters> </Method> <Method name="GET"> </Method> </Methods> <Child-Resources> <Child-Resource>http://localhost:4848/management/domain/configs</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/resources</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/servers</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/property</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/applications</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/system-applications</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/stop</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/restart</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/uptime</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/version</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/rotate-log</Child-Resource> <Child-Resource>http://localhost:4848/management/domain/host-port</Child-Resource> </Child-Resources> </Domain> |