[ https://issues.apache.org/jira/browse/YOKO-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Balaji Ravi resolved YOKO-358. ------------------------------ Resolution: Fixed Fix Version/s: v1.0.0 typedef should be mapped to just an alias since we dont have a clear mapping to schema type. Also the corba:typemapping section is where we keep this information, so we should not pollute the schemas with this info. > 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 > Assigned To: Balaji Ravi > Priority: Critical > Fix For: v1.0.0 > > > 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.