incubator-yoko-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Murphy (JIRA)" <j...@apache.org>
Subject [jira] Updated: (YOKO-358) IDLToWSDL incorrectly maps all typedefs to restrictions.
Date Wed, 25 Apr 2007 14:09:15 GMT

     [ https://issues.apache.org/jira/browse/YOKO-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Murphy updated YOKO-358:
-------------------------------

    Description: 
Consider IDL like :
  typedef string PropertyName;
  typedef string PropertyValue;
  struct Property {
    PropertyName name;
    PropertyValue value;
  };
  typedef sequence <Property> PropertyList;
  typedef PropertyList MyProperties;

This will produce invalid schema like

      <xs:simpleType name="PropertyName">
        <xs:restriction base="xs:string">
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType name="PropertyValue">
        <xs:restriction base="xs:string">
        </xs:restriction>
      </xs:simpleType>
      <xs:complexType name="Property">
        <xs:sequence>
          <xs:element name="name" type="PropertyName">
          </xs:element>
          <xs:element name="value" type="PropertyValue">
          </xs:element>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="PropertyList">
        <xs:sequence>
          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="Property">
          </xs:element>
        </xs:sequence>
      </xs:complexType>
      <xs:simpleType name="MyProperties">
        <xs:restriction base="PropertyList">
        </xs:restriction>
      </xs:simpleType>

The simpleType MyProperties is not valid schema as per http://www.w3.org/TR/xmlschema-1/#variety
(section 3.14) : 
Schema Component Constraint: Derivation Valid (Restriction, Simple)
The appropriate case among the following must be true:
1 If the {variety} is atomic, then all of the following must be true:
   1.1 The {base type definition} must be an atomic simple type definition or a built-in primitive
datatype. 

This presents a bit of a problem. Should all typedefs be ignored, or should only typedefs
where the base is not a simple type or built-in primitive datatype be handled?
The IDLToWSDL tool also produces invalid code for a typedef on an any since you can't have
a restriction on a schema anyType.

  was:
Consider IDL like :
  typedef string PropertyName;
  typedef string PropertyValue;
  struct Property {
    PropertyName name;
    PropertyValue value;
  };
  typedef sequence <Property> PropertyList;
  typedef PropertyList MyProperties;

This will produce invalid WSDL like

      <xs:simpleType name="PropertyName">
        <xs:restriction base="xs:string">
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType name="PropertyValue">
        <xs:restriction base="xs:string">
        </xs:restriction>
      </xs:simpleType>
      <xs:complexType name="Property">
        <xs:sequence>
          <xs:element name="name" type="PropertyName">
          </xs:element>
          <xs:element name="value" type="PropertyValue">
          </xs:element>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="PropertyList">
        <xs:sequence>
          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="Property">
          </xs:element>
        </xs:sequence>
      </xs:complexType>
      <xs:simpleType name="MyProperties">
        <xs:restriction base="PropertyList">
        </xs:restriction>
      </xs:simpleType>

The simpleType MyProperties is not valid schema as per http://www.w3.org/TR/xmlschema-1/#variety
(section 3.14) : 
Schema Component Constraint: Derivation Valid (Restriction, Simple)
The appropriate case among the following must be true:
1 If the {variety} is atomic, then all of the following must be true:
   1.1 The {base type definition} must be an atomic simple type definition or a built-in primitive
datatype. 

This presents a bit of a problem. Should all typedefs be ignored, or should only typedefs
where the base is not a simple type or built-in primitive datatype be handled?
The IDLToWSDL tool also produces invalid code for a typedef on an any since you can't have
a restriction on a schema anyType.


> IDLToWSDL incorrectly maps all typedefs to restrictions.
> --------------------------------------------------------
>
>                 Key: YOKO-358
>                 URL: https://issues.apache.org/jira/browse/YOKO-358
>             Project: Yoko - CORBA Server
>          Issue Type: Bug
>          Components: Idl2Wsdl
>    Affects Versions: v1.0-incubating-M1
>         Environment: Tested on Windows, will probably be on all platforms.
>            Reporter: Martin Murphy
>            Priority: Critical
>
> Consider IDL like :
>   typedef string PropertyName;
>   typedef string PropertyValue;
>   struct Property {
>     PropertyName name;
>     PropertyValue value;
>   };
>   typedef sequence <Property> PropertyList;
>   typedef PropertyList MyProperties;
> This will produce invalid schema like
>       <xs:simpleType name="PropertyName">
>         <xs:restriction base="xs:string">
>         </xs:restriction>
>       </xs:simpleType>
>       <xs:simpleType name="PropertyValue">
>         <xs:restriction base="xs:string">
>         </xs:restriction>
>       </xs:simpleType>
>       <xs:complexType name="Property">
>         <xs:sequence>
>           <xs:element name="name" type="PropertyName">
>           </xs:element>
>           <xs:element name="value" type="PropertyValue">
>           </xs:element>
>         </xs:sequence>
>       </xs:complexType>
>       <xs:complexType name="PropertyList">
>         <xs:sequence>
>           <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="Property">
>           </xs:element>
>         </xs:sequence>
>       </xs:complexType>
>       <xs:simpleType name="MyProperties">
>         <xs:restriction base="PropertyList">
>         </xs:restriction>
>       </xs:simpleType>
> The simpleType MyProperties is not valid schema as per http://www.w3.org/TR/xmlschema-1/#variety
(section 3.14) : 
> Schema Component Constraint: Derivation Valid (Restriction, Simple)
> The appropriate case among the following must be true:
> 1 If the {variety} is atomic, then all of the following must be true:
>    1.1 The {base type definition} must be an atomic simple type definition or a built-in
primitive datatype. 
> This presents a bit of a problem. Should all typedefs be ignored, or should only typedefs
where the base is not a simple type or built-in primitive datatype be handled?
> The IDLToWSDL tool also produces invalid code for a typedef on an any since you can't
have a restriction on a schema anyType.

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


Mime
View raw message