Author: pmacik(a)redhat.com
Date: 2010-03-22 06:51:24 -0400 (Mon, 22 Mar 2010)
New Revision: 11832
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDoc.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDocImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPC.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPCImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDoc.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDocImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPC.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPCImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringRPCTest.java
Log:
[JBQA-3163] Calendar changed to XMLGregorianCalenar
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDoc.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDoc.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDoc.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,9 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
-import java.io.IOException;
import java.math.BigDecimal;
-import java.util.Calendar;
+import javax.xml.datatype.XMLGregorianCalendar;
import java.util.Date;
import javax.jws.WebMethod;
@@ -38,45 +37,44 @@
*/
@WebService(name = "EndpointDoc", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
-public interface EndpointDoc
-{
+public interface EndpointDoc {
- @WebMethod(operationName = "sayHello", action = "urn:SayHello")
- public String sayHello(String toWhom);
+ @WebMethod(operationName = "sayHello", action = "urn:SayHello")
+ public String sayHello(String toWhom);
- @WebMethod(operationName = "increaseBigDecimal", action =
"urn:IncreaseBigDecimal")
- public BigDecimal increaseBigDecimal(BigDecimal value);
+ @WebMethod(operationName = "increaseBigDecimal", action =
"urn:IncreaseBigDecimal")
+ public BigDecimal increaseBigDecimal(BigDecimal value);
- @WebMethod(operationName = "negateBoolean", action =
"urn:NegateBoolean")
- public boolean negateBoolean(boolean value);
+ @WebMethod(operationName = "negateBoolean", action =
"urn:NegateBoolean")
+ public boolean negateBoolean(boolean value);
- @WebMethod(operationName = "increaseByte", action =
"urn:IncreaseByte")
- public byte increaseByte(byte value);
+ @WebMethod(operationName = "increaseByte", action =
"urn:IncreaseByte")
+ public byte increaseByte(byte value);
- @WebMethod(operationName = "reverseByteOrder", action =
"urn:ReverseByteOrder")
- public byte[] reverseByteOrder(byte[] data);
+ @WebMethod(operationName = "reverseByteOrder", action =
"urn:ReverseByteOrder")
+ public byte[] reverseByteOrder(byte[] data);
- @WebMethod(operationName = "getCalendarPlusDay", action =
"urn:GetCalendarPlusDay")
- public Calendar getCalendarPlusDay(Calendar calendar);
+ @WebMethod(operationName = "getCalendarPlusDay", action =
"urn:GetCalendarPlusDay")
+ public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar);
- @WebMethod(operationName = "getDatePlusDay", action =
"urn:GetDatePlusDay")
- public Date getDatePlusDay(Date date);
+ @WebMethod(operationName = "getDatePlusDay", action =
"urn:GetDatePlusDay")
+ public Date getDatePlusDay(Date date);
- @WebMethod(operationName = "increaseDouble", action =
"urn:IncreaseDouble")
- public double increaseDouble(double value);
+ @WebMethod(operationName = "increaseDouble", action =
"urn:IncreaseDouble")
+ public double increaseDouble(double value);
- @WebMethod(operationName = "increaseFloat", action =
"urn:IncreaseFloat")
- public float increaseFloat(float value);
+ @WebMethod(operationName = "increaseFloat", action =
"urn:IncreaseFloat")
+ public float increaseFloat(float value);
- @WebMethod(operationName = "increaseInt", action =
"urn:IncreaseInt")
- public int increaseInt(int value);
+ @WebMethod(operationName = "increaseInt", action =
"urn:IncreaseInt")
+ public int increaseInt(int value);
- @WebMethod(operationName = "increaseLong", action =
"urn:IncreaseLong")
- public long increaseLong(long value);
+ @WebMethod(operationName = "increaseLong", action =
"urn:IncreaseLong")
+ public long increaseLong(long value);
- @WebMethod(operationName = "modifyQName", action =
"urn:ModifyQName")
- public QName modifyQName(QName value);
+ @WebMethod(operationName = "modifyQName", action =
"urn:ModifyQName")
+ public QName modifyQName(QName value);
- @WebMethod(operationName = "increaseShort", action =
"urn:IncreaseShort")
- public short increaseShort(short value);
+ @WebMethod(operationName = "increaseShort", action =
"urn:IncreaseShort")
+ public short increaseShort(short value);
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDocImpl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDocImpl.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointDocImpl.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -24,9 +24,7 @@
import java.io.IOException;
import java.math.BigDecimal;
-import java.util.Calendar;
import java.util.Date;
-import java.util.GregorianCalendar;
import javax.jws.WebParam;
import javax.jws.WebService; //import javax.jws.soap.SOAPBinding;
@@ -35,6 +33,8 @@
//import org.jboss.logging.Logger;
import javax.ejb.Stateless;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
/**
* @author pmacik(a)redhat.com
@@ -78,11 +78,10 @@
return retVal;
}
- public Calendar getCalendarPlusDay(@WebParam(name = "calendar") Calendar
calendar)
+ public XMLGregorianCalendar getCalendarPlusDay(@WebParam(name = "calendar")
XMLGregorianCalendar calendar)
{
- Calendar retVal = new GregorianCalendar();
- retVal.setTimeInMillis(calendar.getTimeInMillis() + 86400000L);
- return retVal;
+ calendar.setDay(calendar.getDay() + 1);
+ return (XMLGregorianCalendar) calendar.clone();
}
public Date getDatePlusDay(@WebParam(name = "date") Date date)
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPC.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPC.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPC.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,10 +21,9 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
-import java.io.IOException;
import java.math.BigDecimal;
-import java.util.Calendar;
import java.util.Date;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.jws.WebMethod;
import javax.jws.WebService;
@@ -57,7 +56,7 @@
public byte[] reverseByteOrder(byte[] data);
@WebMethod(operationName = "getCalendarPlusDay", action =
"urn:GetCalendarPlusDay")
- public Calendar getCalendarPlusDay(Calendar calendar);
+ public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar);
@WebMethod(operationName = "getDatePlusDay", action =
"urn:GetDatePlusDay")
public Date getDatePlusDay(Date date);
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPCImpl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPCImpl.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointRPCImpl.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -23,12 +23,11 @@
import java.io.IOException;
import java.math.BigDecimal;
-import java.util.Calendar;
import java.util.Date;
-import java.util.GregorianCalendar;
-
import javax.jws.WebParam;
import javax.jws.WebService; //import javax.jws.soap.SOAPBinding;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
//import org.jboss.logging.Logger;
@@ -77,11 +76,10 @@
return retVal;
}
- public Calendar getCalendarPlusDay(@WebParam(name = "calendar") Calendar
calendar)
+ public XMLGregorianCalendar getCalendarPlusDay(@WebParam(name = "calendar")
XMLGregorianCalendar calendar)
{
- Calendar retVal = new GregorianCalendar();
- retVal.setTimeInMillis(calendar.getTimeInMillis() + 86400000L);
- return retVal;
+ calendar.setDay(calendar.getDay() + 1);
+ return (XMLGregorianCalendar) calendar.clone();
}
public Date getDatePlusDay(@WebParam(name = "date") Date date)
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDoc.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDoc.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDoc.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
import java.math.BigDecimal;
-import java.util.Calendar;
+import javax.xml.datatype.XMLGregorianCalendar;
import java.util.Date;
import javax.jws.WebMethod;
@@ -85,8 +85,8 @@
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
@RequestWrapper(localName = "GetCalendarPlusDay", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/", className =
"org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrappers.GetCalendarPlusDay")
@ResponseWrapper(localName = "GetCalendarPlusDayResponse", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/", className =
"org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrappers.GetCalendarPlusDayResponse")
- public Calendar getCalendarPlusDay(
- @WebParam(name = "Calendar", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Calendar calendar);
+ public XMLGregorianCalendar getCalendarPlusDay(
+ @WebParam(name = "Calendar", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") XMLGregorianCalendar
calendar);
@WebMethod(operationName = "getDatePlusDay", action =
"urn:GetDatePlusDay")
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
@@ -152,7 +152,7 @@
@WebParam(name = "StringValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") String stringValue,
@WebParam(name = "QNameValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") QName qNameValue,
@WebParam(name = "DateValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Date dateValue,
- @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Calendar
calendarValue);
+ @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") XMLGregorianCalendar
calendarValue);
@WebMethod(operationName = "valuesToComplexType", action =
"urn:ValuesToComplexType")
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
@@ -169,7 +169,7 @@
@WebParam(name = "StringValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") String stringValue,
@WebParam(name = "QNameValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") QName qNameValue,
@WebParam(name = "DateValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Date dateValue,
- @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Calendar
calendarValue);
+ @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") XMLGregorianCalendar
calendarValue);
@WebMethod(operationName = "modifyComplexType", action =
"urn:ModifyComplexType")
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDocImpl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDocImpl.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedDocImpl.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -26,17 +26,16 @@
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
-import java.util.GregorianCalendar;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService; //import javax.jws.soap.SOAPBinding;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
@@ -98,11 +97,10 @@
return retVal;
}
- public Calendar getCalendarPlusDay(Calendar calendar)
+ public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar)
{
- Calendar retVal = new GregorianCalendar();
- retVal.setTimeInMillis(calendar.getTimeInMillis() + 86400000L);
- return retVal;
+ calendar.setDay(calendar.getDay() + 1);
+ return (XMLGregorianCalendar) calendar.clone();
}
public Date getDatePlusDay(Date date)
@@ -147,7 +145,7 @@
public String valuesToString(byte byteValue, byte[] byteArrayValue, short shortValue,
int intValue, long longValue,
float floatValue, double doubleValue, String stringValue, QName qNameValue, Date
dateValue,
- Calendar calendarValue)
+ XMLGregorianCalendar calendarValue)
{
StringBuffer sb = new StringBuffer();
sb.append("[byteValue=" + byteValue);
@@ -167,7 +165,7 @@
public ComplexType valuesToComplexType(byte byteValue, byte[] byteArrayValue, short
shortValue, int intValue,
long longValue, float floatValue, double doubleValue, String stringValue, QName
qNameValue, Date dateValue,
- Calendar calendarValue)
+ XMLGregorianCalendar calendarValue)
{
return new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue,
floatValue, doubleValue,
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPC.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPC.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPC.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -22,9 +22,9 @@
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
import java.math.BigDecimal;
-import java.util.Calendar;
import java.util.Date;
+
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
@@ -34,6 +34,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
+import javax.xml.datatype.XMLGregorianCalendar;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -85,8 +86,8 @@
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
@RequestWrapper(localName = "GetCalendarPlusDay", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/", className =
"org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrappers.GetCalendarPlusDay")
@ResponseWrapper(localName = "GetCalendarPlusDayResponse", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/", className =
"org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrappers.GetCalendarPlusDayResponse")
- public Calendar getCalendarPlusDay(
- @WebParam(name = "Calendar", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Calendar calendar);
+ public XMLGregorianCalendar getCalendarPlusDay(
+ @WebParam(name = "Calendar", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") XMLGregorianCalendar
calendar);
@WebMethod(operationName = "getDatePlusDay", action =
"urn:GetDatePlusDay")
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
@@ -152,7 +153,7 @@
@WebParam(name = "StringValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") String stringValue,
@WebParam(name = "QNameValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") QName qNameValue,
@WebParam(name = "DateValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Date dateValue,
- @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Calendar
calendarValue);
+ @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") XMLGregorianCalendar
calendarValue);
@WebMethod(operationName = "valuesToComplexType", action =
"urn:ValuesToComplexType")
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
@@ -169,7 +170,7 @@
@WebParam(name = "StringValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") String stringValue,
@WebParam(name = "QNameValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") QName qNameValue,
@WebParam(name = "DateValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Date dateValue,
- @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") Calendar
calendarValue);
+ @WebParam(name = "CalendarValue", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/") XMLGregorianCalendar
calendarValue);
@WebMethod(operationName = "modifyComplexType", action =
"urn:ModifyComplexType")
@WebResult(name = "Response", targetNamespace =
"http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/")
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPCImpl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPCImpl.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointWrappedRPCImpl.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -25,14 +25,13 @@
import java.math.BigDecimal;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
-import java.util.GregorianCalendar;
import java.util.List;
import javax.jws.WebParam;
import javax.jws.WebService; //import javax.jws.soap.SOAPBinding;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
//import org.jboss.logging.Logger;
@@ -91,11 +90,10 @@
return retVal;
}
- public Calendar getCalendarPlusDay(Calendar calendar)
+ public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar)
{
- Calendar retVal = new GregorianCalendar();
- retVal.setTimeInMillis(calendar.getTimeInMillis() + 86400000L);
- return retVal;
+ calendar.setDay(calendar.getDay() + 1);
+ return (XMLGregorianCalendar) calendar.clone();
}
public Date getDatePlusDay(Date date)
@@ -140,7 +138,7 @@
public String valuesToString(byte byteValue, byte[] byteArrayValue, short shortValue,
int intValue, long longValue,
float floatValue, double doubleValue, String stringValue, QName qNameValue, Date
dateValue,
- Calendar calendarValue)
+ XMLGregorianCalendar calendarValue)
{
StringBuffer sb = new StringBuffer();
sb.append("[byteValue=" + byteValue);
@@ -160,7 +158,7 @@
public ComplexType valuesToComplexType(byte byteValue, byte[] byteArrayValue, short
shortValue, int intValue,
long longValue, float floatValue, double doubleValue, String stringValue, QName
qNameValue, Date dateValue,
- Calendar calendarValue)
+ XMLGregorianCalendar calendarValue)
{
return new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue,
floatValue, doubleValue,
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -23,10 +23,10 @@
import java.util.Arrays;
-import java.util.Calendar;
import java.util.Date;
import java.util.List;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
/**
@@ -58,7 +58,7 @@
private Date dateValue;
- private Calendar calendarValue;
+ private XMLGregorianCalendar calendarValue;
public ComplexType()
{
@@ -67,7 +67,7 @@
public ComplexType(byte byteValue, byte[] byteArrayValue, short shortValue, int
intValue, long longValue,
float floatValue, double doubleValue, String stringValue, List<String>
stringList, QName qNameValue,
- Date dateValue, Calendar calendarValue)
+ Date dateValue, XMLGregorianCalendar calendarValue)
{
super();
this.byteValue = byteValue;
@@ -194,12 +194,12 @@
this.dateValue = dateValue;
}
- public Calendar getCalendarValue()
+ public XMLGregorianCalendar getCalendarValue()
{
return calendarValue;
}
- public void setCalendarValue(Calendar calendarValue)
+ public void setCalendarValue(XMLGregorianCalendar calendarValue)
{
this.calendarValue = calendarValue;
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarDocTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarDocTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarDocTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,9 +21,12 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped;
-import java.util.Calendar;
import java.util.GregorianCalendar;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -34,22 +37,33 @@
*/
public class CalendarDocTest extends DataTypesDocTest implements BenchmarkTest
{
- private static final Calendar tested;
+ private static final XMLGregorianCalendar tested;
- private static final Calendar exp;
+ private static final XMLGregorianCalendar exp;
static
{
- tested = new GregorianCalendar();
- tested.setTimeInMillis(1234567890L);
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
- exp = new GregorianCalendar();
- exp.setTimeInMillis(tested.getTimeInMillis() + 86400000L);
+ e.printStackTrace();
+ }
+ tested = dtFactory.newXMLGregorianCalendar(calendar);
+
+ exp = dtFactory.newXMLGregorianCalendar(calendar);
+ exp.setDay(exp.getDay() + 1);
+
}
public void performIteration(Object port) throws Exception
{
- Calendar ret = ((EndpointDoc) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointDoc) port).getCalendarPlusDay(tested);
if (!ret.equals(exp))
{
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarRPCTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarRPCTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/CalendarRPCTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,8 +21,10 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
+import java.util.GregorianCalendar; //import java.util.GregorianCalendar;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesRPCTest;
@@ -35,22 +37,33 @@
public class CalendarRPCTest extends DataTypesRPCTest implements BenchmarkTest
{
- private static final Calendar tested;
+ private static final XMLGregorianCalendar tested;
- private static final Calendar exp;
+ private static final XMLGregorianCalendar exp;
static
{
- tested = new GregorianCalendar();
- tested.setTimeInMillis(1234567890L);
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
- exp = new GregorianCalendar();
- exp.setTimeInMillis(tested.getTimeInMillis() + 86400000L);
+ e.printStackTrace();
+ }
+ tested = dtFactory.newXMLGregorianCalendar(calendar);
+
+ exp = dtFactory.newXMLGregorianCalendar(calendar);
+ exp.setDay(exp.getDay() + 1);
+
}
public void performIteration(Object port) throws Exception
{
- Calendar ret = ((EndpointRPC) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointRPC) port).getCalendarPlusDay(tested);
if (!ret.equals(exp))
{
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarDocTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarDocTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarDocTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,8 +21,10 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
-import java.util.Calendar;
import java.util.GregorianCalendar;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesWrappedDocTest;
@@ -34,22 +36,33 @@
*/
public class CalendarDocTest extends DataTypesWrappedDocTest implements BenchmarkTest
{
- private static final Calendar tested;
+ private static final XMLGregorianCalendar tested;
- private static final Calendar exp;
+ private static final XMLGregorianCalendar exp;
static
{
- tested = new GregorianCalendar();
- tested.setTimeInMillis(1234567890L);
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
- exp = new GregorianCalendar();
- exp.setTimeInMillis(tested.getTimeInMillis() + 86400000L);
+ e.printStackTrace();
+ }
+ tested = dtFactory.newXMLGregorianCalendar(calendar);
+
+ exp = dtFactory.newXMLGregorianCalendar(calendar);
+ exp.setDay(exp.getDay() + 1);
+
}
public void performIteration(Object port) throws Exception
{
- Calendar ret = ((EndpointWrappedDoc) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointWrappedDoc) port).getCalendarPlusDay(tested);
if (!ret.equals(exp))
{
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarRPCTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarRPCTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/CalendarRPCTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,9 +21,12 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
-import java.util.Calendar;
import java.util.GregorianCalendar;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -35,22 +38,33 @@
public class CalendarRPCTest extends DataTypesWrappedRPCTest implements BenchmarkTest
{
- private static final Calendar tested;
+ private static final XMLGregorianCalendar tested;
- private static final Calendar exp;
+ private static final XMLGregorianCalendar exp;
static
{
- tested = new GregorianCalendar();
- tested.setTimeInMillis(1234567890L);
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
- exp = new GregorianCalendar();
- exp.setTimeInMillis(tested.getTimeInMillis() + 86400000L);
+ e.printStackTrace();
+ }
+ tested = dtFactory.newXMLGregorianCalendar(calendar);
+
+ exp = dtFactory.newXMLGregorianCalendar(calendar);
+ exp.setDay(exp.getDay() + 1);
+
}
public void performIteration(Object port) throws Exception
{
- Calendar ret = ((EndpointWrappedRPC) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointWrappedRPC) port).getCalendarPlusDay(tested);
if (!ret.equals(exp))
{
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeDocTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeDocTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeDocTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -22,11 +22,13 @@
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
@@ -63,7 +65,7 @@
private static final Date dateValue = new Date();
- private static final Calendar calendarValue, modifiedCalendarValue;
+ private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
private static final ComplexType tested, exp;
@@ -84,12 +86,22 @@
modifiedByteArrayValue[i] = byteArrayValue[length - i - 1];
}
- calendarValue = new GregorianCalendar();
- calendarValue.setTimeInMillis(System.currentTimeMillis());
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
- modifiedCalendarValue = new GregorianCalendar();
- modifiedCalendarValue.setTimeInMillis(calendarValue.getTimeInMillis() +
86400000L);
+ e.printStackTrace();
+ }
+ calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+ modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+ modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
+
tested = new ComplexType(byteValue, byteArrayValue, shortValue, intValue,
longValue, floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeRPCTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeRPCTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ComplexTypeRPCTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -22,11 +22,13 @@
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
@@ -63,7 +65,7 @@
private static final Date dateValue = new Date();
- private static final Calendar calendarValue, modifiedCalendarValue;
+ private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
private static final ComplexType tested, exp;
@@ -84,12 +86,22 @@
modifiedByteArrayValue[i] = byteArrayValue[length - i - 1];
}
- calendarValue = new GregorianCalendar();
- calendarValue.setTimeInMillis(System.currentTimeMillis());
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
- modifiedCalendarValue = new GregorianCalendar();
- modifiedCalendarValue.setTimeInMillis(calendarValue.getTimeInMillis() +
86400000L);
+ e.printStackTrace();
+ }
+ calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+ modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+ modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
+
tested = new ComplexType(byteValue, byteArrayValue, shortValue, intValue,
longValue, floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeDocTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeDocTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeDocTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -22,11 +22,13 @@
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
@@ -45,7 +47,7 @@
private static final byte byteValue = (byte) 1;
private static final byte[] byteArrayValue =
"!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
+ .getBytes();
private static final short shortValue = (short) 3;
@@ -61,7 +63,7 @@
private static final Date dateValue = new Date();
- private static final Calendar calendarValue;
+ private static final XMLGregorianCalendar calendarValue;
private static final ComplexType exp;
@@ -74,9 +76,19 @@
stringList.add("item " + i);
}
- calendarValue = new GregorianCalendar();
- calendarValue.setTimeInMillis(System.currentTimeMillis());
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ e.printStackTrace();
+ }
+ calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+
exp = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue,
floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeRPCTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeRPCTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToComplexTypeRPCTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -22,11 +22,13 @@
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
@@ -61,7 +63,7 @@
private static final Date dateValue = new Date();
- private static final Calendar calendarValue, modifiedCalendarValue;
+ private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
private static final ComplexType exp;
@@ -74,12 +76,22 @@
stringList.add("item " + i);
}
- calendarValue = new GregorianCalendar();
- calendarValue.setTimeInMillis(System.currentTimeMillis());
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
- modifiedCalendarValue = new GregorianCalendar();
- modifiedCalendarValue.setTimeInMillis(calendarValue.getTimeInMillis() +
86400000L);
+ e.printStackTrace();
+ }
+ calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+ modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+ modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
+
exp = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue,
floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringDocTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringDocTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringDocTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,10 +21,12 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
-import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
@@ -58,15 +60,25 @@
private static final Date dateValue = new Date();
- private static final Calendar calendarValue;
+ private static final XMLGregorianCalendar calendarValue;
private static final String exp;
static
{
- calendarValue = new GregorianCalendar();
- calendarValue.setTimeInMillis(System.currentTimeMillis());
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ e.printStackTrace();
+ }
+ calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+
StringBuffer sb = new StringBuffer();
sb.append("[byteValue=" + byteValue);
sb.append(" byteArrayValue=" + new String(byteArrayValue));
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringRPCTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringRPCTest.java 2010-03-22
06:36:43 UTC (rev 11831)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ValuesToStringRPCTest.java 2010-03-22
10:51:24 UTC (rev 11832)
@@ -21,10 +21,12 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped;
-import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
@@ -58,15 +60,25 @@
private static final Date dateValue = new Date();
- private static final Calendar calendarValue;
+ private static final XMLGregorianCalendar calendarValue;
private static final String exp;
static
{
- calendarValue = new GregorianCalendar();
- calendarValue.setTimeInMillis(System.currentTimeMillis());
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ e.printStackTrace();
+ }
+ calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
+
StringBuffer sb = new StringBuffer();
sb.append("[byteValue=" + byteValue);
sb.append(" byteArrayValue=" + new String(byteArrayValue));