You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Andrei Stefan (Commented) (JIRA)" <ji...@apache.org> on 2011/10/12 11:31:11 UTC
[jira] [Commented] (AXIS2-5159) Wsdl2Java doesn't handle properly
multiple restrictions for a simpleType element
[ https://issues.apache.org/jira/browse/AXIS2-5159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125681#comment-13125681 ]
Andrei Stefan commented on AXIS2-5159:
--------------------------------------
Hi Shameera,
I have tested your patch and can confirm it is fixing the issue reported. Hopefully, it will get in the source code as an official commit from AXIS2 contributors.
Thanks.
> 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
> Labels: patch
> 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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org