axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Closed: (AXIS-1139) dateTime not parsed properly in the SOAP message
Date Mon, 22 Mar 2004 11:47:58 GMT
Message:

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Mon, 22 Mar 2004 3:47 AM

Pleast try latest cvs and reopen bug ONLY if you can recreate it with latest cvs.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1139

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1139
    Summary: dateTime not parsed properly in the SOAP message
       Type: Bug

     Status: Closed
 Resolution: FIXED

    Project: Axis
 Components: 
             Serialization/Deserialization
   Fix Fors:
             current (nightly)
   Versions:
             1.1

   Assignee: 
   Reporter: zenosh

    Created: Wed, 26 Nov 2003 12:14 PM
    Updated: Mon, 22 Mar 2004 3:47 AM
Environment: Operating System: Windows NT/2K
Platform: All

Description:
The WSDL file contains :
**************************
<xs:complexType name="ChangeRequestAdjustment">
	<xs:sequence>
		<xs:element minOccurs="0" name="orderDate" 
type="bo:orderDateDT"/>
	</xs:sequence>
</xs:complexType>

<xs:simpleType name="orderDateDT">
	<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
**************************

The java proxies are generated properly without any errors using the 
command "java org.apache.axis.wsdl.WSDL2Java".
Then on top of the generated proxies I make a Java client to run the webService.

I try to set the orderDate by the following code:
**************************
	Calendar cal = Calendar.getInstance();
	cal.set(2003, 10, 20, 13, 56, 00);
	adjustment.setOrderDate(new OrderDateDT (cal));
**************************

But in the SOAP Message the date goes as shown below:
**************************

<orderDate>java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllF
ieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=&quot;GMT+05:30&qu
ot;,offset=19800000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],
firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2003,MONTH=10,WEEK_OF_YEAR=
48,WEEK_OF_MONTH=5,DAY_OF_MONTH=20,DAY_OF_YEAR=330,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_
MONTH=4,AM_PM=1,HOUR=5,HOUR_OF_DAY=13,MINUTE=56,SECOND=0,MILLISECOND=813,ZONE_OF
FSET=19800000,DST_OFFSET=0]</orderDate> 

***************************


I tried to change the wsdl by doing the folowing :
**************************
	<xs:element minOccurs="0" name="orderDate" type="xs:dateTime"/>
**************************

Then regenerated the proxies.So in the client the code changed as follows:
**************************
	Calendar cal = Calendar.getInstance();
	cal.set(2003, 10, 20, 13, 56, 00);
	adjustment.setOrderDate(cal);
**************************

In this case the date was passed properly and there was no error. The problem 
here is we need to go with the first defination  of "orderDate" with the 
restriction since the wsdl is auto generated and uses a template .


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message