Re: Proposal for Assertion InterfaceMessageReference-0042

Hi All,

Just a few modifications to the XSD snippet I had sent earlier.

I am attaching the "InterfaceType" complex type definition inline with the
updated unique identitity constraints [messageRefMLabel and faultRefMLabel].
I have verified this constraint with test cases.

<xs:complexType name="InterfaceType" mixed="false">
  <xs:complexContent mixed="false">
    <xs:extension base="wsdl:ExtensibleDocumentedType">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="operation" type="wsdl:InterfaceOperationType">
          <xs:unique name="messageRefMLabel">
            <xs:selector xpath="./wsdl:input|./wsdl:output"/>
            <xs:field xpath="@messageLabel"/>
          </xs:unique>
          <xs:unique name="faultRefMLabel">
            <xs:selector xpath="./wsdl:infault|./wsdl:outfault"/>
            <xs:field xpath="@messageLabel"/>
          </xs:unique>
        </xs:element>
        <xs:element name="fault" type="wsdl:InterfaceFaultType"/>
        <xs:element ref="wsdl:feature"/>
        <xs:element ref="wsdl:property"/>
        <xs:any namespace="##other" processContents="lax"/>
      </xs:choice>
      <xs:attribute name="name" type="xs:NCName" use="required"/>
      <xs:attribute name="extends" use="optional">
        <xs:simpleType>
          <xs:list itemType="xs:QName"/>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="styleDefault" use="optional">
        <xs:simpleType>
          <xs:list itemType="xs:anyURI"/>
        </xs:simpleType>
       </xs:attribute>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

 rgds,

Ram
On 2/15/07, Ramkumar Menon <ramkumar.menon@gmail.com> wrote:
>
> Hi Gurus,
>
> The mentioned assertion states "For each Interface Message Reference
> component in the {interface message references} property of an Interface
> Operation component, its {message label} property MUST be unique.".
>
> Correct me if I am wrong, but can we have the XSD capture this constraint
> explicitly ?
>
> For instance,
>
> <xs:element name="operation" type="wsdl:BindingOperationType">
>   <xs:unique name="messageLabel">
>     <xs:selector
> xpath="(wsdl:input|wsdl:output:wsdl:infault|wsdl:outfault)">
>      <xs:field xpath="@messageLabel">
>     </xs:selectpr>
>   </xs:unique>
> </xs:element>
>
> rgds,
> Ram
> --
> Shift to the left, shift to the right!
> Pop up, push down, byte, byte, byte!
>
> -Ramkumar Menon
> A typical Macroprocessor
>



-- 
Shift to the left, shift to the right!
Pop up, push down, byte, byte, byte!

-Ramkumar Menon
A typical Macroprocessor

Received on Wednesday, 21 February 2007 18:13:30 UTC