OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebcore message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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] | [List Home]