You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-tck@ws.apache.org by sc...@us.ibm.com on 2002/07/11 00:36:26 UTC
JAXRPC TCK CALENDAR ISSUE: Attn Lance
Lance,
Axis is failing 3 of the jaxrpc.ee.w2j.rpc.encoded.parametermodetest tests
due to a Calendar comparison.
Here is the comparison method (in the JAXRPC_Datat class) that is used by
the TCK to compare Calendars:
public static boolean compareCalendars(Calendar cal1, Calendar cal2) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.
SSS z");
TimeZone tmpzone = cal1.getTimeZone();
tmpzone.setID("Custom");
df.setTimeZone(tmpzone);
String str1 = df.format(cal1.getTime());
tmpzone = cal2.getTimeZone();
tmpzone.setID("Custom");
df.setTimeZone(tmpzone);
String str2 = df.format(cal2.getTime());
System.out.println("str1=" + str1); // Debug added by me
System.out.println("str2=" + str2); // Debug added by me
return str1.equals(str2);
}
This method is used to compare the original Calendar (GregorianCalendar(96,
5,1)) and the Calendar that is received by the service. The problem is
that Axis always serializes the Calendar in its canonical form; thus the
Calendar received by the service will always be in the GMT timezone.