axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AXIS2-5159) Wsdl2Java doesn't handle properly multiple restrictions for a simpleType element
Date Thu, 13 Oct 2011 12:51:11 GMT

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

Amila Chinthaka Suriarachchi resolved AXIS2-5159.
-------------------------------------------------

    Resolution: Fixed

applied the patch revision 1182813
                
> 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


Mime
View raw message