From BITPlan mediawiki-japi Wiki
Jump to navigation Jump to search

The jaxbgenerator script createschame creates Java sources for the xml messages of the Mediawiki API.

The Mediawiki API supports XML and Json encoding of API calls. The XML version of things will be deprecated soon. The original idea to create am schema was dropped in 2014 see:


Still it would be nice to generate the code for the API access. JAXB is choosen to attempt this. The bash script createschema in the jaxbgenerator directory does this.

how it works

  • runs sample query or queries
  • stores the resulting xml
  • generates xsd from the xml (uses a webservice)
  • generates java code from the xml

The generated java code is stored in the subdirectory "src" and can be inspected and copied for use Some code will work out of the box - some needs modification.