#228 Nonconformance to ebRS, section 6.5.1

3.1
open
nstojano
5
2007-09-17
2007-09-17
No

Section 6.5.1 of the "ebXML Registry Services and Protocols" specification requires that for filter queries "The <rim:queryExpression> element of AdhocQueryRequest MUST contain a Query element derived from the <query:RegistryObjectQueryType> type." Therefore one would expect the following request to be accepted by OMAR:

<?xml version="1.0" encoding="UTF-8"?>
<AdhocQueryRequest xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ResponseOption/>
<rim:AdhocQuery id="temporaryId">
<rim:QueryExpression queryLanguage="urn:oasis:names:tc:ebxml-regrep:QueryLanguage:ebRSFilterQuery">
<ClassificationNodeQuery>
<PrimaryFilter comparator="Like" domainAttribute="parent" value="urn:oasis:names:tc:ebxml-regrep:classificationScheme:QueryLanguage" xsi:type="StringFilterType"/>
</ClassificationNodeQuery>
</rim:QueryExpression>
</rim:AdhocQuery>
</AdhocQueryRequest>

However, this request causes a ClassCastException in QueryManagerImpl#submitAdhocQuery (line 264), because the code only accepts a text node as a child of <rim:QueryExpression>. The following request is accepted by OMAR:

<?xml version="1.0" encoding="UTF-8"?>
<AdhocQueryRequest xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ResponseOption/>
<rim:AdhocQuery id="temporaryId">
<rim:QueryExpression queryLanguage="urn:oasis:names:tc:ebxml-regrep:QueryLanguage:ebRSFilterQuery">
<![CDATA[
<ClassificationNodeQuery xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PrimaryFilter comparator="Like" domainAttribute="parent" value="urn:oasis:names:tc:ebxml-regrep:classificationScheme:QueryLanguage" xsi:type="StringFilterType"/>
</ClassificationNodeQuery>
]]>
</rim:QueryExpression>
</rim:AdhocQuery>
</AdhocQueryRequest>

I believe this is not what is intended by the specifications.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks