axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Angel Fuentes (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AXIS2-5048) Missing typeof "duration" in class org.apache.axis2.databinding.types.Union
Date Thu, 19 May 2011 09:09:47 GMT

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

Juan Angel Fuentes updated AXIS2-5048:
--------------------------------------

    Attachment: Test.wsdl

> Missing typeof "duration" in class org.apache.axis2.databinding.types.Union
> ---------------------------------------------------------------------------
>
>                 Key: AXIS2-5048
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5048
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.5.4, 1.5.5, 1.6.0
>         Environment: all platforms
>            Reporter: Juan Angel Fuentes
>            Priority: Minor
>         Attachments: Test.wsdl
>
>
> I'm using axis2 1.5.4, but I also tried this with the last snapshot of version 1.5.5.
> I think there' s a missing typeof in class org.apache.axis2.databinding.types.Union
> I'm trying to use this type in my webservice:
> <simpleType name="relativeOrAbsoluteDateType">
>                 <annotation>
>                     <documentation>Absolute and relative time</documentation>
>                 </annotation>
>                 <union memberTypes="dateTime duration"/>
>             </simpleType>
> When I try to send a message from  my  ws client using dateTime it works smooth. But
when i try to use duration i get this exception:
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Error in parsing
value
>     at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
>     at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
>     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
>     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>     at com.naevatec.www.testws.definitions.NaevatecTestStub.testSubmit(NaevatecTestStub.java:181)
>     at com.naevatec.Test.main(Test.java:59)
> I have attached the wsdl prepared to show you the maybe "possible bug".
> To patch this issue I would include this lines in the Union class:
> else if ("duration".equals(type)) {
>             setObject(ConverterUtil.convertToDuration(value));
> }
> More info:
> This is the way I'm using this type in the object  I create in the ws client:
>  It causes the excepction i've posted a few lines up;
> import org.apache.axis2.databinding.types.Duration;
>       RelativeOrAbsoluteDateType date= new RelativeOrAbsoluteDateType();
>       Duration dur= new Duration(false, 0, 0, 0, 1, 0, 0);
>       date.setObject(dur);
> If i create the object RelativeOrAbsoluteType  using Calendar It works:
> import java.util.Calendar;
>   RelativeOrAbsoluteDateType date1= new RelativeOrAbsoluteDateType();
>   Calendar cal= Calendar.getInstance();
>   cal.set(2011, Calendar.MAY, 18, 10, 0, 0);
>   date1.setObject(cal);
> It should work both ways.
> Thanks for your help.

--
This message is automatically generated by JIRA.
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