Search code examples
javawebsphere-libertyopen-liberty

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.


Solution

  • 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.