kSOAP2 a little too strict with double ID exceptions?
Asked Answered
S

1

6

kSOAP2 refuses to parse a SOAP response I'm getting because it contains 2 elements with the same id value. The thing is that in the XML Schema, this id is of type anyURI, not xs:ID, so it doesn't have any unicity semantic: https://github.com/oehf/ipf/blob/8a22c51a47fab1af6fea7da81f9e5d8de636e225/commons/ihe/xds/src/main/resources/wsdl/schema/ebRS30/rim.xsd#L103

Is that a bug in kSOAP2 or is there a way to disable that exception?

Stanwinn answered 21/7, 2018 at 2:5 Comment(1)
Questions are encouraged to provide a Minimum Complete and Verifiable Example, try to improve yours.Rubierubiginous
H
4

The documentation says:

Common base type for all types that have unique identity.     
If id is provided and is not in proper URN syntax then it is used for
linkage within document and is ignored by the registry. In this case the
registry generates a UUID URN for id attribute.
id must not be null when object is retrieved from the registry.

Just because something is schema-valid doesn't mean it satisfies all the constraints imposed by the application. I'm not familiar with this specification, but it's perfectly legitimate for a specification to impose constraints beyond those in the XML schema. There's certainly a suggestion in this annotation that such constraints exist.

Heedless answered 27/7, 2018 at 17:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.