Featured post
using xsd.exe to generate c# files, getting error and warnings -
this command i'm running:
xsd.exe -c -l:c# d:\documents\dev\sarpilot\docs\schemas\06-141r2\06-141r2.xsd
these errors i'm getting:
microsoft (r) xml schemas/datatypes support utility [microsoft (r) .net framework, version 2.0.50727.3038] copyright (c) microsoft corporation. rights reserved. schema validation warning: undefined complextype 'http://www.opengis.net/sps/0:parameterdescriptortype' used base comp lex type extension. line 617, position 2. schema validation warning: undefined complextype 'http://www.opengis.net/ows:getcapabilitiestype' used base complex ty pe extension. line 23, position 2. schema validation warning: undefined complextype 'http://www.opengis.net/ows:capabilitiesbasetype' used base complex t ype extension. line 35, position 2. schema validation warning: 'http://www.opengis.net/gml:point' element not declared. line 869, position 2. schema validation warning: 'http://www.opengis.net/gml:polygon' element not declared. line 870, position 2. schema validation warning: 'http://www.opengis.net/gml:rectangle' element not declared. line 871, position 2. schema validation warning: 'http://www.opengis.net/sps/0:parameter' element not declared. line 381, position 2. schema validation warning: 'http://www.opengis.net/sps/0:id' element not declared. line 451, position 2. warning: schema not validated. class generation may fail or may produce incorrect results. error: error generating classes schema 'd:\documents\dev\sarpilot\docs\schemas\06-141r2\06-141r2'. - datatype 'http://www.opengis.net/ows:getcapabilitiestype' missing. if more help, please type "xsd /?". c:\program files (x86)\microsoft sdks\windows\v7.0a\bin>
the xsd file copy/pasted appendix in following document: http://services.eoportal.org/portal/documents/06-141r2_ordering_services_for_earth_observation_products_0.9.2.pdf
the xml schema included in pdf document linked has references several other xsd files using <import>
element. need download these additional schema files , make sure path references in <import>
elements pointing correct locations on local computer.
if still getting errors, because xsd.exe not follow on external references. solve issue, specify required xsd files directly on command line follows:
xsd.exe /c myschema.xsd import01.xsd import02.xsd include01.xsd include02.xsd
where import01.xsd, import02.xsd, include01.xsd , include02.xsd xsd files referenced via import , include elements in myschema.xsd.
- Get link
- X
- Other Apps
Comments
Post a Comment