axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Angel Fuentes Dominguez <jafuen...@naevatec.com>
Subject Re: Missing typeof "duration" in class org.apache.axis2.databinding.types.Union
Date Thu, 19 May 2011 09:04:47 GMT
I`ve reported the bug: https://issues.apache.org/jira/browse/AXIS2-5048

Thanks for your help.

--
Juan Ángel
<jafuentes@naevatec.com>



On 18 May 2011 21:46, Andreas Veithen <andreas.veithen@gmail.com> wrote:

> Yes, this indeed looks like a bug and is still present in the current
> version of the code. Please open a JIRA report [1] for this issue.
>
> Andreas
>
> [1] https://issues.apache.org/jira/browse/AXIS2
>
> On Wed, May 18, 2011 at 14:27, Juan Angel Fuentes Dominguez
> <jafuentes@naevatec.com> wrote:
> > Hello,
> >
> > I'm new in the list so I'll try to do my best.
> >
> > 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);
> >
> >
> > Obviously i would like both ways to work.
> >
> > Thanks for your help.  And my apologies if this isn't the right place to
> > post this issue or the right way.
> >
> > --
> > Juan Ángel
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> 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