[ https://issues.apache.org/jira/browse/AXIS2-5159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrei Stefan updated AXIS2-5159: --------------------------------- Priority: Critical (was: Major) > Wsdl2Java doesn't handle properly multiple restrictions for a simpleType > element > -------------------------------------------------------------------------------- > > Key: AXIS2-5159 > URL: https://issues.apache.org/jira/browse/AXIS2-5159 > Project: Axis2 > Issue Type: Bug > Components: adb, codegen > Affects Versions: 1.4.1, 1.5.6, 1.6.1, 1.6.2, 1.7.0, nightly > Environment: Windows Vista, Eclipse 3.6.1 > Reporter: Andrei Stefan > Priority: Critical > Attachments: AXIS2-5159.patch, bank.wsdl > > > Considering the wsdl attached to this JIRA issue, for the following snippet: > <element name="withdraw"> > <simpleType name="TNDataType"> > <xsd:restriction base="string"> > <xsd:minLength value="0" /> > <xsd:maxLength value="12" /> > <xsd:pattern value="[0-9]*" /> > </xsd:restriction> > </simpleType> > </element> > this is the output generated in the BankServiceStub class: > /** > * Auto generated setter method > * @param param TNDataType > */ > public void setTNDataType(java.lang.String > param){ > > if > (org.apache.axis2.databinding.utils.ConverterUtil.convertToString(param).matches("[0-9]*")) > { > this.localTNDataType=param; > } > else { > throw new > java.lang.RuntimeException(); > } > > } > I've tested this further and the test cases don't, also, cover any > combination of two restrictions used together for the same element. If I take > out the pattern then the two restrictions for length are checked ok in the > resulting code. > There were previous reports related to the same issue > (https://issues.apache.org/jira/browse/AXIS2-4555, > https://issues.apache.org/jira/browse/AXIS2-4205, > https://issues.apache.org/jira/browse/AXIS2-3237) but none seem to have fixed > the issue reported above. Especially, > https://issues.apache.org/jira/browse/AXIS2-4205, which is identical but > there seems to be no commit associated with it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org For additional commands, e-mail: java-dev-h...@axis.apache.org