1

我正在尝试使用 xjc 将 xsd 转换为 Java 对象。生成类。但是,当我尝试使用 spring OXM 将示例 xml 文件解组为 java 对象时,它失败并出现以下错误。

org.springframework.oxm.UnmarshallingFailureException: JAXB unmarshalling exception; nested exception is javax.xml.bind.UnmarshalException: unexpected element (uri:"urn:validfilenotification", local:"ValidFileNotification"). Expected elements are <{urn:notificationbase}ActionRequestedGrp>,<{urn:notificationbase}DocTypeIndicCd>,<{urn:notificationbase}FATCANotificationCd>,<{urn:notificationbase}FATCANotificationHeaderGrp>,<{urn:notificationbase}FATCAReportTypeCd>,<{urn:notificationbase}FieldErrorGrp>,<{urn:notificationbase}FileTypeCd>,<{urn:notificationbase}MessageTypeCd>,<{urn:notificationbase}OriginalFileMessageSpecGrp>,<{urn:notificationbase}OriginalFileMetadataGrp>,<{urn:notificationbase}OriginalFileProcessingDataGrp>,<{urn:notificationbase}OriginalPaperRecordMetadataGrp>,<{urn:notificationbase}PaperRecordDocumentTypeCd>,<{urn:notificationbase}RecordLevelErrorCd>,<{urn:notification

有人可以指出我做错了什么。

4

0 回答 0