ebcore — archive
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]
RegRep4 question: asynchronous query exceptions
According to its charter, the ebCore TC is responsible for maintenance
of ebXML specifications from previous ebXML TCs. The OASIS ebXML
Registry TC that was closed by OASIS TC Administration on 29 October
2019 and is no longer active. The last deliverable of that TC is the
RegRep4 specification,
https://docs.oasis-open.org/regrep/regrep-core/v4.0/os/. ; In a customer
project, we are looking at using the RegRep5 query manager interface
with an asynchronous protocol (in fact ebMS3/AS4) and some questions
are coming up. The ebCore TC mailing list can be used to discuss them
and to help implementers.
A first question relates to how exceptions are returned by the
server.
There seem to be two options:
1) In the SOAP/WSDL binding provided by the OASIS standard,
https://docs.oasis-open.org/regrep/regrep-core/v4.0/os/wsdl/1.1/regrep-server-interface.wsdl ,
the "fault" is linked to a "tns:msgRegistryException".
<portType name="QueryManager">
<documentation>
The portType for QueryManager abstract interface.
</documentation>
<operation name="executeQuery">
<input message="tns:msgQueryRequest"/>
<output message="tns:msgQueryResponse"/>
<fault name="registryException" message="tns:msgRegistryException"/>
</operation>
</portType>
<message name="msgRegistryException">
<part element="rs:RegistryException" name="fault"/>
</message>
The registry exception is defined in the RS schema,
https://docs.oasis-open.org/regrep/regrep-core/v4.0/os/xsd/rs.xsd:
<complexType name="RegistryExceptionType">
<annotation>
<documentation>Base for all registry exceptions. Based upon
SOAPFault: http://www.w3schools.com/soap/soap_fault.asp </documentation>
</annotation>
<complexContent>
<extension base="rim:ExtensibleObjectType">
<attribute name="code" type="string" use="optional"/>
<attribute name="detail" type="string" use="optional"/>
<attribute name="message" type="string"/>
<attribute name="severity" type="rim:objectReferenceType"
default="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/>
</extension>
</complexContent>
</complexType>
<element name="RegistryException" type="tns:RegistryExceptionType"/>
A problem with the RegistryExceptionType is that it does not have a
"requestId" attribute, so there is no correlation of the exception to
the request that it relates to.
This is not an issue for SOAP/WSDL
with an HTTP binding where the fault is returned synchronously, as it
will be returned on the backchannel that is associated with a specific
request.
But it is problematic for the customer project as there all
responses are asynchronous, and this type of application responses are
not handled using SOAP faults.
2) A second option would be to wrap the exception in a regular ebRS
response. This is from
https://docs.oasis-open.org/regrep/regrep-core/v4.0/os/xsd/rs.xsd:
<complexType name="RegistryResponseType">
<annotation>
<documentation xml:lang="en">Base type for all ebXML
Registry responses</documentation>
</annotation>
<complexContent>
<extension base="rim:ExtensibleObjectType">
<sequence>
<element name="Exception"
type="tns:RegistryExceptionType" minOccurs="0" maxOccurs="unbounded"/>
<element ref="rim:RegistryObjectList" minOccurs="0"
maxOccurs="1"/>
<element ref="rim:ObjectRefList" minOccurs="0"
maxOccurs="1"/>
</sequence>
<attribute name="status" type="rim:objectReferenceType"
use="required"/>
<!-- id is the request if for the request for which this is
a response -->
<attribute name="requestId" type="anyURI" use="optional"/>
</extension>
</complexContent>
</complexType>
<element name="RegistryResponse" type="tns:RegistryResponseType"/>
This schema definition allows exceptions to be returned in a
RegistryResponse that contains an Exception element.
<?xml version="1.0" encoding="UTF-8"?> <query:QueryResponse requestId="c4369c4d-740e-4b64-80f0-7b209a66d629" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure"
xmlns:xlink=" http://www.w3.org/1999/xlink" ;
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" ;
xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0"
xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:4.0"
xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:4.0" xsi:schemaLocation="urn:oasis:names:tc:ebxml-regrep:xsd:query:4.0 http://docs.oasis-open.org/regrep/regrep-core/v4.0/os/xsd/query.xsd" ;>
<query:Exception xsi:type="rs:AuthorizationExceptionType" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"
message="Not Authorized" detail="Party xxx_9876543210 is not
authorized to request XXX in context YYY"/>
</query:QueryResponse>
As the QueryResponse has a correlation attribute "requestId", the
exception can be correlated to the request it relates to.
Problem is that section 1.2.2.2 of
https://docs.oasis-open.org/regrep/regrep-core/v4.0/os/regrep-core-rs-v4.0-os.pdf
seems to require use of "fault" messages for failures, and disallows
values with a status Failure. But this requirement seems to only apply
to SOAP/WSDL (other protocols do not have a concept of synchronous
"fault" messages), and that
urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure is a valid
option for an asynchronous response protocol.
Looking forward to any comments. Kind Regards, Pim
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]