axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Asen <asen.m.ase...@gmail.com>
Subject Re: xs:date issues in axis2-1.5
Date Fri, 18 Sep 2009 15:59:54 GMT
Here is how I am setting the date from the client:

Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(2009,8,16);
java.util.Date date = calendar.getTime();



On Fri, Sep 18, 2009 at 9:08 AM, Asen <asen.m.asenov@gmail.com> wrote:

> I am using axis2-1.5.
> I did not experience this error with 1.4.1 version even though I found this
> issue AXIS2-4447.
> This is my incoming object(pojo) using java.util.Date
>
> import java.util.Date;
>
> /**
>  * Test pojo with xs:data
>  * @author asen
>  */
> public class PojoIn implements PojoI {
>
>     private static final long serialVersionUID = 1L;
>     private Date date = null;
>     private String alias = null ;
>
>     public PojoIn(){}
>
>     public Date getDate() {
>         return date;
>     }
>
>     public void setDate(Date date) {
>         this.date = date;
>     }
>
>     public String getAlias() {
>         return alias;
>     }
>
>     public void setAlias(String alias) {
>         this.alias = alias;
>     }
>
>     @Override
>     public String toString() {
>         StringBuffer sb = new StringBuffer(" DATA WS IN");
>         sb.append("DATE: " + date).append("\n");
>         sb.append("ALIAS: " + alias).append("\n");
>         return sb.toString();
>     }
>
> }
>
> And this is sample web method exposed as web service through Axis2-1.5
> integration with Tomcat-6.0.16
>
> public Long storeData(PojoIn data) throws Exception {
>         // implementation follow
>
>         return new Long(1);
>
>     }
>
>
> On Fri, Sep 18, 2009 at 12:53 AM, Amila Suriarachchi <
> amilasuriarachchi@gmail.com> wrote:
>
>>
>>
>> On Fri, Sep 18, 2009 at 3:05 AM, Asen <asen.m.asenov@gmail.com> wrote:
>>
>>> Hi there,
>>>
>>> I am getting error on xs:date manipulations at the server side.
>>> Does anyone know any solution to this problem?
>>>
>>> Exception in thread "main" org.apache.axis2.AxisFault: date string can
>>> not be less than 19 charactors
>>>     at
>>> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:517)
>>>     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)
>>>
>>> wsdl snipped:
>>> <xs:element name="endDate" minOccurs="0" type="xs:date" nillable="true"
>>> />
>>>
>>> My client uses wsdl2java ADB binding.
>>>
>>
>> how your service is written? what is the Axis2 version you use?
>>
>> thanks,
>> Amila.
>>
>>
>>
>> --
>> Amila Suriarachchi
>> WSO2 Inc.
>> blog: http://amilachinthaka.blogspot.com/
>>
>
>

Mime
View raw message