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!
- I save the XML of the API to a file:
getcapabilities.xml
- I run the following trang command to generate an XSD:
java -jar trang.jar getcapabilities.xml getcapabilities.xsd
- I get the following files:
getcapabilities.xsd
,ogc.xsd
,wfs.xsd
,xlink.xsd
,xsi.xsd
- I run the following command to generate java classes:
xjc getcapabilities.xsd
- 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:
- Do you get the same error message?
- What can I do about it?
- Is my approach meant to be successful at all?