You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Asen <as...@gmail.com> on 2009/09/17 23:35:34 UTC
xs:date issues in axis2-1.5
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.
Re: unsubscribe
Posted by Andreas Veithen <an...@gmail.com>.
You need to send a mail to axis-user-unsubscribe@ws.apache.org
On Thu, Sep 24, 2009 at 09:53, Pradeep Patel <pa...@gmail.com> wrote:
>
>
>
>
unsubscribe
Posted by Pradeep Patel <pa...@gmail.com>.
unsubscribe
Posted by Jeremy O'Donohue <je...@loftusit.com.au>.
Re: xs:date issues in axis2-1.5
Posted by Asen <as...@gmail.com>.
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 <as...@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 <as...@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/
>>
>
>
Re: xs:date issues in axis2-1.5
Posted by Asen <as...@gmail.com>.
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 <as...@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/
>
Re: xs:date issues in axis2-1.5
Posted by Amila Suriarachchi <am...@gmail.com>.
On Fri, Sep 18, 2009 at 3:05 AM, Asen <as...@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/