axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Snigdha Pandit <Snigd...@NIIT.com>
Subject Deserializing Calendar class
Date Fri, 12 Jul 2002 07:52:59 GMT
I am trying to call a .net WebService

The classes generated using WSDL2Java tool look like this

	public class MyTask implements java.io.Serializable
	{
		private MyTaskDateTime startTime;
		...
	}

	public class MyTaskDateTime implements java.io.Serializable,
org.apache.axis.encoding.SimpleType 
	{
		private java.util.Calendar value;
		private boolean isEditable;  // attribute
		...
	}

The generated SoapStub class has the following entry for MyTaskDateTime in
the constructor

	Class beansf =
org.apache.axis.encoding.ser.BeanSerializerFactory.class;
	Class beandf =
org.apache.axis.encoding.ser.BeanDeserializerFactory.class;

	Class simplesf =
org.apache.axis.encoding.ser.SimpleNonPrimitiveSerializerFactory.class;
	Class simpledf =
org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;

	qName = new
javax.xml.rpc.namespace.QName("http://localhost/unity/exchange/webservice/",
"MyTaskDateTime");
	cachedSerQNames.add(qName);
	cls = com.engenia.unity.app.exchange.common.MyTaskDateTime.class;
	cachedSerClasses.add(cls);
	cachedSerFactories.add(simplesf);
	cachedDeserFactories.add(simpledf);


I changed the Serializer and Deserializer entries as follows

	cachedSerFactories.add(beansf);
	cachedDeserFactories.add(beandf); 


But, the Calendar class is still not deserialized sucessfully. The
deserialized value looks like this 

	<StartTime
isEditable="false">java.util.GregorianCalendar[time=?,areFieldsSet=false,are
AllFieldsSet=true,lenient=true,zone=java.util.SimpleTimeZone[id=Asia/Calcutt
a,offset=19800000,dstSavings=3600000,useDaylight=false,startYear=0,startMode
=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endM
ode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0],firstDayOf
Week=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2002,MONTH=6,WEEK_OF_YEAR=28,WEEK
_OF_MONTH=2,DAY_OF_MONTH=12,DAY_OF_YEAR=?,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH
=2,AM_PM=1,HOUR=1,HOUR_OF_DAY=14,MINUTE=43,SECOND=50,MILLISECOND=748,ZONE_OF
FSET=19800000,DST_OFFSET=0]</StartTime>


Can anyone please guide me as to how can I get the properly deserialized
Calendar value?


Thanks and Regards
Snigdha

NIIT Technologies 'Trust Us to Find the Way'. For details visit our website
http://www.niit.com 

___________________NOTICE____________________________ 
This electronic mail transmission contains confidential information intended
only for the person(s) named.  Any use, distribution, copying or disclosure
by any other person is strictly prohibited. If you received this
transmission in error, please notify the sender by reply e-mail and then
destroy the message.  Opinions, conclusions, and other information in this
message that do not relate to the official business of NIIT shall be
understood to be neither given nor endorsed by NIIT When addressed to NIIT
clients, any information contained in this e-mail is subject to the terms
and conditions in the governing client contract.

Mime
View raw message