You are viewing a plain text version of this content. The canonical link for it is here.
Posted to savan-dev@ws.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2010/05/09 08:40:47 UTC

[jira] Resolved: (AXIS2-4447) Axis2 - ADB - xs:date tag conversion in stub throws RuntimeException - ConverterUtil.convertToString() problem

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

Amila Chinthaka Suriarachchi resolved AXIS2-4447.
-------------------------------------------------

    Resolution: Invalid

xsd:date has a defined string pattern so you can not change it. 

> Axis2 - ADB - xs:date tag conversion in stub throws RuntimeException - ConverterUtil.convertToString() problem
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4447
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4447
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4.1
>         Environment: Windows XP - Workshop 10.3 - Axis2 1.4.1 - ADB Data Binding 
>            Reporter: Andrea Pacini
>
> In a schema I have the following type:
> <xs:simpleType name="dateType">
> 	<xs:restriction base="xs:date">
> 		<xs:pattern value="\d{4}-\d{2}-\d{2}"/>
> 	</xs:restriction>
> </xs:simpleType>
> When I generate the STUB (using Oracle Workshop 10.3 which points to an Axis2 1.4.1 external installation), the generated stub (ADB Data Binding) has the following source code :
> [...]
> public void setDateType(java.util.Date param){
>                             
>                                             if (org.apache.axis2.databinding.utils.ConverterUtil.convertToString(param).matches("\\d{4}-\\d{2}-\\d{2}")) {
>                                                 this.localDateType=param;
>                                             }
>                                             else {
>                                                 throw new java.lang.RuntimeException();
>                                             }
>  }
> [...]
> This method always throws RuntimeException because the ConverterUtil.convertToString() method returns a String in a different format than "yyyy-mm-dd".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org