xml unmarshall error jax-b a unexpected element that exists in the expected 元素

xml unmarshall error jax-b a unexpected element that exists in the expected elements

我发现一个我可以解释的错误,在解组 jaxb 中抛出一个错误,它说 xml 有一个意外的元素,但在加速元素中它出现:

javax.xml.bind.UnmarshalException: 
unexpected element (uri:"urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0", local:"AdhocQueryResponse").
Expected elements are <{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Action>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Address>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}AdhocQuery>,<{urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0}AdhocQueryResponse>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Association>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}AuditableEvent>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Classification>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ClassificationNode>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ClassificationScheme>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Description>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}EmailAddress>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ExternalIdentifier>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ExternalLink>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ExtrinsicObject>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Federation>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Identifiable>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}InternationalString>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}LocalizedString>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Name>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Notification>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}NotifyAction>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ObjectRef>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ObjectRefList>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Organization>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Person>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}PersonName>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}PostalAddress>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}QueryExpression>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Registry>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0}RegistryError>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0}RegistryErrorList>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}RegistryObject>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}RegistryObjectList>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}RegistryPackage>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Service>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ServiceBinding>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Slot>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}SlotList>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}SpecificationLink>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Subscription>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}TelephoneNumber>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}UsageDescription>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}UsageParameter>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}User>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}Value>,<{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}ValueList>

有什么想法吗?

没有。

意外元素:

{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}AdhocQueryResponse

预期元素包含:

{urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0}AdhocQueryResponse

你有一个错误的命名空间