我想從xsd爲FHIR生成java代碼。FHIR JAXB XJC代碼生成
我從here下載的代碼生成模式,然後我跑:
xjc patient.xsd
但我有以下異常:
parsing a schema...
[ERROR] src-resolve: Cannot resolve the name 'Account' to a(n) 'type definition' component.
line 332 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'DetectedIssue' to a(n) 'type definition' component.
line 354 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'ImplementationGuide' to a(n) 'type definition' component.
line 380 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'MedicationOrder' to a(n) 'type definition' component.
line 387 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'QuestionnaireResponse' to a(n) 'type definition' component.
line 409 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'Parameters' to a(n) 'type definition' component.
line 425 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'MeasuredQuantity' to a(n) 'type definition' component.
line 225 of file:/Users/gerard/Downloads/fhir-codegen-xsd/questionnaireanswers.xsd
我已經導入到Eclipse中的所有的XSD和我在fhir-base.xsd中看到相同的錯誤。不知道如何解決它,因爲例如account.xsd在同一個目錄中。
在這裏發佈相關的xsd文件可能會有所幫助(即patient.xsd和fhir-base.xsd) – rmlan
@rmlan文件很大,您可以從「here」鏈接下載它。謝謝。 – gerardribas