我正在構建我的svcutil命令行以從OSEO schema生成業務對象。'minOccurs'屬性不能存在
每當它告訴我「xxx」類型丟失時,我確定需要將哪些xsd包含到命令行中並添加它。到目前爲止,我的命令行看起來是這樣的:
svcutil /language:C# /namespace:*,OGC.OSEO.DataContract /out:IOSEO.cs oseo/1.0/oseo.wsdl oseo/1.0/oseo.xsd ows/2.0/owsAll.xsd ows/2.0/ows19115subset.xsd ows/2.0/owsAdditionalParameters.xsd ows/2.0/owsCommon.xsd ows/2.0/owsContents.xsd ows/2.0/owsDataIdentification.xsd ows/2.0/owsExceptionReport.xsd ows/2.0/owsGetCapabilities.xsd ows/2.0/owsGetResourceByID.xsd ows/2.0/owsInputOutputData.xsd ows/2.0/owsManifest.xsd ows/2.0/owsOperationsMetadata.xsd ows/2.0/owsServiceIdentification.xsd ows/2.0/owsServiceProvider.xsd ows/2.0/owsDomainType.xsd http://www.w3.org/2006/03/addressing/ws-addr.xsd sweCommon/2.0/block_components.xsd sweCommon/2.0/advanced_encodings.xsd sweCommon/2.0/basic_types.xsd sweCommon/2.0/choice_components.xsd sweCommon/2.0/record_components.xsd sweCommon/2.0/simple_components.xsd sweCommon/2.0/simple_encodings.xsd sweCommon/2.0/swe.xsd xlink/1.0.0/xlinks.xsd swes/2.0/swes.xsd swes/2.0/swesCommon.xsd swes/2.0/swesContents.xsd swes/2.0/swesDeleteSensor.xsd swes/2.0/swesDescribeSensor.xsd swes/2.0/swesInsertSensor.xsd swes/2.0/swesNotification.xsd swes/2.0/swesUpdateSensorDescription.xsd gml/3.2.1/basicTypes.xsd gml/3.2.1/coordinateOperations.xsd gml/3.2.1/coordinateReferenceSystems.xsd gml/3.2.1/coordinateSystems.xsd gml/3.2.1/coverage.xsd gml/3.2.1/datums.xsd gml/3.2.1/defaultStyle.xsd gml/3.2.1/deprecatedTypes.xsd gml/3.2.1/dictionary.xsd gml/3.2.1/direction.xsd gml/3.2.1/dynamicFeature.xsd gml/3.2.1/feature.xsd gml/3.2.1/geometryAggregates.xsd gml/3.2.1/geometryBasic0d1d.xsd gml/3.2.1/geometryBasic2d.xsd gml/3.2.1/geometryComplexes.xsd gml/3.2.1/geometryPrimitives.xsd gml/3.2.1/gml.xsd gml/3.2.1/gmlBase.xsd gml/3.2.1/grids.xsd gml/3.2.1/measures.xsd gml/3.2.1/observation.xsd gml/3.2.1/referenceSystems.xsd gml/3.2.1/temporal.xsd gml/3.2.1/temporalReferenceSystems.xsd gml/3.2.1/temporalTopology.xsd gml/3.2.1/topology.xsd gml/3.2.1/units.xsd gml/3.2.1/valueObjects.xsd gmd/applicationSchema.xsd gmd/citation.xsd gmd/constraints.xsd gmd/content.xsd gmd/dataQuality.xsd gmd/distribution.xsd gmd/extent.xsd gmd/freeText.xsd gmd/gmd.xsd gmd/identification.xsd gmd/maintenance.xsd gmd/metadataApplication.xsd gmd/metadataEntity.xsd gmd/metadataExtension.xsd gmd/portrayalCatalogue.xsd gmd/referenceSystem.xsd gmd/spatialRepresentation.xsd gco/basicTypes.xsd gco/gcoBase.xsd gts/temporalObjects.xsd gss/geometry.xsd gsr/spatialReferencing.xsd smil20/smil20-animate.xsd smil20/smil20-animate.xsd smil20/smil20-language.xsd
所以我擊中了最新的xsd to add一個樹樁到命令行這是smil20-language.xsd
,我發現了以下錯誤:
The 'minOccurs' attribute cannot be present
正如你可以從xsd看到的,有很多'minOccurs'。
所以我的問題是:哪些導致這些錯誤?我如何發現?
它的整體錯誤不會給出行號,代碼或任何提示。
嘗試通過更方便用戶的XSD處理器使用相同的模式。 –
@邁克爾凱:任何XSD處理器建議? (免費軟件) – capdragon
從提供的URL中引用的一組XSD文件是有效的。但是,該集內的單個文件似乎有問題,因爲不直接參考需要的內容。例如。 gmlBase.xsd(http://schemas.opengis.net/gml/3.2.1/gmlBase.xsd)引用了gml:remoteSchema,這是一個在deprecatedTypes.xsd中定義的全局屬性。 svcutil將很難找出答案。最好的辦法是重構整個集合(你需要的實際上是15個XSD文件,而不是100+),然後用svcutil從那裏取出。如果有興趣,請告訴我,我會發佈一個詳細的答案。 –