Stored query invocation using the SOAP interface doesn't work as specified in ebRS, section 6.3.2. The following request is correct according to specs:
<AdhocQueryRequest xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
<ResponseOption returnComposedObjects="true" returnType="LeafClassWithRepositoryItem"/>
<rim:AdhocQuery id="urn:freebxml:registry:query:BusinessQuery">
<rim:Slot name="$name">
<rim:ValueList>
<rim:Value>%ebXML%</rim:Value>
</rim:ValueList>
</rim:Slot>
</rim:AdhocQuery>
</AdhocQueryRequest>
However, it causes OMAR to reply with an error caused by a NPE; see attached file.
Additional information about this problem can be found here: http://lists.oasis-open.org/archives/regrep-comment/200708/msg00006.html