StrekoZ
StrekoZ

Reputation: 618

XSD schema for Liberty server.xml

I am using Liberty application server, which have server.xml as a configuration file for server.

Is there a XSD schema for server.xml?

Any of schemes for open-liberty or websphere-liberty - would be good for me.

Upvotes: 3

Views: 1343

Answers (2)

Brent Daniel
Brent Daniel

Reputation: 355

You can generate one using the 'serverSchemaGen' script from the Liberty 'bin' directory.

./serverSchemaGen server1

The server will need to be started and the 'localConnector-1.0' feature needs to be enabled. It will generate a schema that is specific to that server (ie, it will only generate content for features that are enabled on that server.)

Alternatively, you can run:

java -jar wlp/bin/tools/ws-schemagen.jar {output file} 

This will generate a complete schema using all available features.

Upvotes: 6

Azquelt
Azquelt

Reputation: 1495

The things allowed in server.xml depend on which features are used. There isn't a published schema which includes everything, but liberty does include tools for creating an xml schema for your setup.

You can generate a schema for all the features you have installed by running

java -jar wlp/bin/tools/ws-schemagen.jar output.xsd

Alternatively, you can generate a schema for the features enabled for a particular server with the following steps:

  1. Add localConnector-1.0 to the list of features in the server.xml
  2. Start the server
  3. Run wlp/bin/serverSchemaGen myServerName

Upvotes: 1

Related Questions