views:

38

answers:

3

I'm using Axis2 1.5.2 to pass Dates between client/server. But when using java.util.Date Axis2 throws this error:

date string can not be less than 19 characters.

Anyone knows a workaround or how to fix it?

+1  A: 

Looks like a bug in Axis2. My guess is that the expectation of DateTime is what is causing that error versus it is now Date. It appears that some have been able to switch to a Calendar type which cured their issue.

When inter-operating between a .NET client and an Axis2 WS, type differencing surfaced so we would opt for primitive types, in this instance we used a long to hold the milliseconds, then converted it to a .NET DateTime representation. You could always switch to using a long/milliseconds and bypass the type all together.

Aaron
+1  A: 

As far as I know Axis2 doesn't support java.util.Date.

I had the same issue, but I was able to overcome this problem by using Calendar class.

Upul