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

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrf-comment message

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


Subject: Public Comment


Comment from: ramyan@us.ibm.com

Name:Ramya Nagarajan
Title:BaseFaultType definition in BaseFaults XSD
Organization:IBM
Regarding Specification:http://docs.oasis-open.org/wsrf/wsrf-ws_base_faults-1.2-spec-pr-02.pdf

The current BaseFaults XSD (http://docs.oasis-open.org/wsrf/bf-2.xsd) has a definition of BaseFaultType as a complexType with a sequence of elements, the first of which is:

      <xsd:any namespace="##other" processContents="lax"
              minOccurs="0" maxOccurs="unbounded"/>

As I understand it, this is to allow for the extensibility of BaseFaultType, without requiring that new fault types be defined as explicit extensions of BaseFaultType.  (UnableToPutResourcePropertyDocumentFaultType in http://docs.oasis-open.org/wsrf/rp-2.xsd is one such example of an explicit extension of BaseFaultType.)

If this is the intent, why not split BaseFaultType into two type definitions:

1) AbstractBaseFaultType, which can be extended (by UnableToPutResourcePropertyDocumentFaultType, etc), and is defined as follows:

  <xsd:complexType name="AbstractBaseFaultType">
    <xsd:sequence>
      <xsd:element name="Timestamp" type="xsd:dateTime" 
               minOccurs="1" maxOccurs="1"/>
      <xsd:element name="Originator" type="wsa:EndpointReferenceType" 
               minOccurs="0" maxOccurs="1"/>
      <xsd:element name="ErrorCode" 
               minOccurs="0" maxOccurs="1">
        <xsd:complexType>
          <xsd:complexContent mixed="true">
            <xsd:extension base="xsd:anyType">
              <xsd:attribute name="dialect" type="xsd:anyURI"
                         use="required"/>
            </xsd:extension>
          </xsd:complexContent>
        </xsd:complexType>      
      </xsd:element>

      <xsd:element name="Description" 
               minOccurs="0" maxOccurs="unbounded">
        <xsd:complexType>
          <xsd:simpleContent>
            <xsd:extension base="xsd:string">
              <xsd:attribute ref="xml:lang" use="optional"/>
            </xsd:extension>
          </xsd:simpleContent>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="FaultCause" minOccurs="0" maxOccurs="1">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:any namespace="##other" processContents="lax" 
                     minOccurs="1" maxOccurs="1"/>
          </xsd:sequence>
        </xsd:complexType> 
      </xsd:element>      
    </xsd:sequence>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
 </xsd:complexType>

2) BaseFaultType, which should not be extended, and is defined as follows:

   <xsd:complexType 
      name="BaseFaultType">
    <xsd:complexContent>
      <xsd:extension base="wsrf-bf:AbstractBaseFaultType">
        <xsd:sequence>
            <xsd:any namespace="##other" processContents="lax"
              minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

I believe this would make it easier to understand, and also allow the XSD to validate easily.

The previous version of this XSD (http://docs.oasis-open.org/wsrf/bf-1) did not allow XSDs that contained extensions of BaseFaultType to validate because of a Unique Particle Attribution error.  For example, there was a UPA error for UnableToPutResourcePropertyDocumentFaultType, because the ResourcePropertyChangeFailure element in the extension could be validated under the xsd:any defined in BaseFaultType.


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