You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2008/03/09 20:21:46 UTC
svn commit: r635333 - in /webservices/axis2/trunk/java/modules:
adb/src/org/apache/axis2/databinding/utils/ integration/
integration/test/org/apache/axis2/rpc/complex/
Author: dims
Date: Sun Mar 9 12:21:44 2008
New Revision: 635333
URL: http://svn.apache.org/viewvc?rev=635333&view=rev
Log:
Fix for AXIS2-3583 - failures caused by DST change in US
Modified:
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
webservices/axis2/trunk/java/modules/integration/pom.xml
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=635333&r1=635332&r2=635333&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Sun Mar 9 12:21:44 2008
@@ -882,6 +882,7 @@
if (rest.endsWith("Z")) {
// this is in gmt time zone
timeZoneOffSet = 0;
+ calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
miliSecond = Integer.parseInt(rest.substring(1, rest.lastIndexOf("Z")));
milliSecondPartLength = rest.substring(1,rest.lastIndexOf("Z")).trim().length();
} else if ((rest.lastIndexOf("+") > 0) || (rest.lastIndexOf("-") > 0)) {
@@ -917,6 +918,7 @@
} else {
if (rest.startsWith("Z")) {
+ calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
// this is in gmt time zone
timeZoneOffSet = 0;
} else if (rest.startsWith("+") || rest.startsWith("-")) {
Modified: webservices/axis2/trunk/java/modules/integration/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/pom.xml?rev=635333&r1=635332&r2=635333&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/pom.xml Sun Mar 9 12:21:44 2008
@@ -356,9 +356,6 @@
<exclude>**org/apache/axis2/soap12testing/soap12testsuite/*.java</exclude>
<exclude>**/ScenarioST1Test.java</exclude>
<exclude>**/samples/wsdl/perf2/*.java</exclude>
- <exclude>**/RPCCallTest*.java</exclude>
- <exclude>**/ComplexDataTypesComplexDataTypesSOAP11Test*.java</exclude>
- <exclude>**/ComplexDataTypesDocLitBareTest*.java</exclude>
</excludes>
<systemProperties>
<property>
@@ -405,9 +402,6 @@
<exclude>**org/apache/axis2/soap12testing/soap12testsuite/*.java</exclude>
<exclude>**/ScenarioST1Test.java</exclude>
<exclude>**/samples/wsdl/perf2/*.java</exclude>
- <exclude>**/RPCCallTest*.java</exclude>
- <exclude>**/ComplexDataTypesComplexDataTypesSOAP11Test*.java</exclude>
- <exclude>**/ComplexDataTypesDocLitBareTest*.java</exclude>
</excludes>
<systemProperties>
<property>
@@ -454,9 +448,6 @@
<exclude>**org/apache/axis2/soap12testing/soap12testsuite/*.java</exclude>
<exclude>**/ScenarioST1Test.java</exclude>
<exclude>**/samples/wsdl/perf2/*.java</exclude>
- <exclude>**/RPCCallTest*.java</exclude>
- <exclude>**/ComplexDataTypesComplexDataTypesSOAP11Test*.java</exclude>
- <exclude>**/ComplexDataTypesDocLitBareTest*.java</exclude>
</excludes>
<systemProperties>
<property>
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java?rev=635333&r1=635332&r2=635333&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java Sun Mar 9 12:21:44 2008
@@ -52,7 +52,9 @@
import java.math.BigInteger;
import java.util.Calendar;
import java.util.Arrays;
+import java.util.TimeZone;
import java.rmi.RemoteException;
+import java.text.SimpleDateFormat;
import junit.framework.TestCase;
import junit.framework.Test;
@@ -347,15 +349,17 @@
assertTrue(ret==43.0f);
}
+ private SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+
/**
* Auto generated test method
*/
public void testretDateTime() throws java.lang.Exception {
-
+ zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
Calendar input = Calendar.getInstance();
Calendar ret = stub.retDateTime(input);
assertNotNull(ret);
- assertEquals(ret, input);
+ assertEquals(zulu.format(input.getTime()), zulu.format(ret.getTime()));
}
/**
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java?rev=635333&r1=635332&r2=635333&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java Sun Mar 9 12:21:44 2008
@@ -41,6 +41,8 @@
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Calendar;
+import java.util.TimeZone;
+import java.text.SimpleDateFormat;
/*
* ComplexDataTypesDocLitBareTest Junit test case
@@ -344,17 +346,19 @@
assertTrue(ret == 43.0f);
}
+ private SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+
/**
* Auto generated test method
*/
public void testretDateTime() throws java.lang.Exception {
-
+ zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
Calendar input = Calendar.getInstance();
ComplexDataTypesDocLitBareStub.InDateTime req = new ComplexDataTypesDocLitBareStub.InDateTime();
req.setInDateTime(input);
Calendar ret = stub.retDateTime(req).getRetDateTimeResult();
assertNotNull(ret);
- assertEquals(ret, input);
+ assertEquals(zulu.format(input.getTime()), zulu.format(ret.getTime()));
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org