[ https://wso2.org/jira/browse/COMMONS-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706#action_15706 ]
Jonathan Marsh commented on COMMONS-54: --------------------------------------- Actually, it is the schema that's at fault, as the following fragment shows. Basically there are two simpleTypes named typeEnumerationType, which I think is invalid in schema. A simple solution is to qualify the name of enumerated types (or any restrictions we generate) with the name of the parent type, e.g. replace typeEnumerationType with testType_typeEnumerationType and test2Type_typeEnumeration. <xs:complexType name="testType"> <xs:sequence> <xs:element name="type" type="ws:typeEnumerationType" /> </xs:sequence> </xs:complexType> <xs:simpleType name="typeEnumerationType"> <xs:restriction base="xs:string"> <xs:enumeration value="msn" /> <xs:enumeration value="yahoo" /> <xs:enumeration value="jabber" /> </xs:restriction> </xs:simpleType> <xs:element name="test" type="ws:testType" /> <xs:complexType name="test2Type"> <xs:sequence> <xs:element name="type" type="ws:typeEnumerationType" /> </xs:sequence> </xs:complexType> <xs:simpleType name="typeEnumerationType"> <xs:restriction base="xs:string"> <xs:enumeration value="msn" /> <xs:enumeration value="yahoo" /> <xs:enumeration value="jabber" /> </xs:restriction> </xs:simpleType> <xs:element name="test2" type="ws:test2Type" /> > try-it: enumerations are doubled up > ----------------------------------- > > Key: COMMONS-54 > URL: https://wso2.org/jira/browse/COMMONS-54 > Project: WSO2 Commons > Issue Type: Bug > Components: dynamic-codegen > Reporter: Jonathan Marsh > Assignee: Keith Godwin Chapman > > The following service results in drop downs with more than 3 values. ?wsdl > looks fine, ?sig doesn't. > var thisType = {"x": "msn | yahoo | jabber"}; > test.inputTypes = { "type" : thisType.x }; > function test(type) { > return type; > } > test2.inputTypes = { "type" : thisType.x }; > function test2(type) { > return type; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://wso2.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ Commons-dev mailing list Commons-dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/commons-dev