JJD
JJD

Reputation: 51804

XJC fails generating *.java classes

I am trying to generate java classes that describe the web service offered here which belongs to this page. Please mind that I am not convinced that the XML is the one needed to run the following steps!

  1. I save the XML of the API to a file: getcapabilities.xml
  2. I run the following trang command to generate an XSD: java -jar trang.jar getcapabilities.xml getcapabilities.xsd
  3. I get the following files: getcapabilities.xsd, ogc.xsd, wfs.xsd, xlink.xsd, xsi.xsd
  4. I run the following command to generate java classes: xjc getcapabilities.xsd
  5. The following error message is prompted

parsing a schema... [ERROR] no-xsi: The {target namespace} of an attribute declaration must not match 'http://www.w3.org/2001/XMLSchema-instance'.
line 7 of file:xsi.xsd
Failed to parse a schema.

Questions:

Upvotes: 2

Views: 1114

Answers (1)

lexicore
lexicore

Reputation: 43651

You're dealing with an OGC Web Feature Service. There's a couple of peculiarities with that.

Upvotes: 1

Related Questions