![]() ![]() ![]() ![]() ![]() ![]() |
The following sections describe XML administration with WebLogic Server:
You access the XML Registry through the Administration Console and use it to configure WebLogic Server for XML applications.
To invoke the Administration Console in your browser, enter the following URL:
http://host
:port
/console
You create, configure, and use the XML Registry using the Administration Console. Using the Administration Console XML Registry has several benefits:
You can use the XML Registry to specify:
These capabilities are for use on the server side only.
You can create as many XML Registries as you like; however, you can associate only one XML Registry with a particular instance of WebLogic Server.
If an instance of WebLogic Server does not have an XML Registry associated with it, then the default parser and transformer are used when parsing or transforming documents. The default parser and transformer are those included in the JDK Version 5.0.
Once you associate an XML Registry with an instance of WebLogic Server, all XML configuration options are available for XML applications that use that server.
You can make the following types of entries for a given XML registry:
Note: | The XML Registry is case sensitive. For example, if you are configuring a parser for an XML document type whose root element is <CAR> , you must enter CAR in the Root Element Tag field and not car or Car . |
The XML Registry is automatically consulted whenever you use JAXP to parse or transform your XML applications. WebLogic Server follows an ordered lookup when determining which parser class to load:
The process is also true for transformers, except for the first step, because you cannot define a transformer for a particular document type.
Additionally, when WebLogic Server starts, a SAX entity resolver is automatically set so that it can resolve entities that are declared in the registry. As a result, users are not required to modify their XML application code to control the parsers used, or to set the location of local copies of external entities. The parser being used and the location of the external entity is controlled by the XML Registry.
Note: | If you elect to use an API provided by a parser instead of JAXP, the XML Registry has no effect on the processing of XML documents. For this reason, it is highly recommended that you always use JAXP in your XML applications. |
By default, WebLogic Server is configured to use the default parser and transformer to parse and transform XML documents. The default parser and transformer are those included in the JDK 5.0. As long as you use the default, you do not have to perform any configuration tasks for your XML applications. If you want to use a parser or transformer other than the default, you must use the XML Registry to configure them, as described in the following sections.
The following procedure first describes how to create an XML registry that defines SAX and DOM parsers and transformers. It then describes how to associate (or plug-in) the new XML Registry with an instance of WebLogic Server so that the server starts to use the new parsers and transformer.
WARNING: | You can plug-in only those parsers and transformers that are compatible with the default WebLogic Server parser transformer. The default parser and transformer are those that are included in the JDK 5.0. |
When you configure a parser for a particular document type, you can use the document’s system id, public id, or root element to identify the document type.
WARNING: | WebLogic Server searches only the first 1000 bytes of an XML document when attempting to identify its document type. If it does not find a DOCTYPE identifier in those first 1000 bytes, it stops searching the document and uses the parser configured for the WebLogic Server instance to parse the document. |
To configure a parser for a particular document type, follow these steps:
See Overview of Administering WebLogic Server XML for information on invoking the Administration Console.
Use the XML Registry to configure external entity resolution and to configure and monitor the external entity cache.
You can configure external entity resolution with WebLogic Server in the following two ways:
Caching the external entity in a Managed Server saves the remote access time and provides a local backup in the event that the Administration Server cannot be accessed while an XML document is being parsed, due to the network or the Administration Server being down.
You can configure the expiration date for a cached entity, at which point WebLogic Server re-retrieves the entity from the URL or Administration Server and re-caches it.
To configure external entity resolution, perform the following steps:
See Overview of Administering WebLogic Server XML for information on invoking the Administration Console.
You can configure the following properties of the external entity cache:
To configure the external entity cache, follow these steps:
See Overview of Administering WebLogic Server XML for information on invoking the Administration Console.
![]() ![]() ![]() |