xsd:attribute use="required" not working
----------------------------------------

                 Key: TUSCANY-1901
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1901
             Project: Tuscany
          Issue Type: Bug
          Components: C++ SDO
    Affects Versions: Cpp-M3
         Environment: All platforms
            Reporter: Brady Johnson
             Fix For: Cpp-M4


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 - [EMAIL PROTECTED]



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to