Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1901

xsd:attribute use="required" not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • C++-SCA-Next
    • C++-SCA-Next
    • C++ SDO
    • None
    • All platforms

    Description

      While creating unit tests for the TuscanySCA WSDL parser, I noticed that the xsd:attribute use="required" does
      not work correctly. Consider the following TuscanySCA Native wsdl_11.xsd schema snippet for the WSDL
      message/part element:

      <xs:complexType name="tPart">
      <xs:complexContent>
      <xs:extension base="wsdl:tExtensibleAttributesDocumented">
      <xs:attribute name="name" type="xs:NCName" use="required"/> <!-- look here -->
      <xs:attribute name="element" type="xs:QName" use="optional"/>
      <xs:attribute name="type" type="xs:QName" use="optional"/>
      </xs:extension>
      </xs:complexContent>
      </xs:complexType>

      And the corresponding wsdl snippet loaded using TuscanySDO:

      <message name="request">
      <!-- this is the correct form
      <part name="zipcode" type="xsd:string"/>
      -->
      <part type="xsd:string"/> <!-- this should cause a failure, since the name attribute is missing -->
      </message>

      The XML loads with no errors. An exception should be thrown.

      To reproduce this, comment out the following test case from TuscanySCA Native runtime/core/test/main.cpp:

      TEST ( wsdlErrorsTest.testMissingMessagePartName() );

      --------------------
      Brady Johnson
      Lead Software Developer - HydraSCA
      Rogue Wave Software - brady.johnson@roguewave.com

      Attachments

        Activity

          People

            Unassigned Unassigned
            bjohnson@roguewave.com Brady Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: