3

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.

StrekoZ
  • 618
  • 6
  • 12

2 Answers2

6

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.

Brent Daniel
  • 355
  • 1
  • 4
1

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
Azquelt
  • 1,380
  • 10
  • 15