axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: Incorrect Mapping For java.sql.Date
Date Thu, 15 Feb 2007 06:29:39 GMT
Hi Johnson;

JIRA please , we handle java.util.Date but not java.sql.Date at the moment.

Thanks
Deepal

> It seems the WSDL java.sql.Date object is not being generated properly
> within Axis2 v1.1. The generate WSDL, viewed from the deployment of
> the service, shows a date definition as follows:
>
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://sql.java/xsd">
>
> <xs:import namespace="http://calendar.util.sun/xsd"/>
>
> <xs:element name="Date" type="ax23:Date"/>
>
> <xs:complexType name="Date">
>
> <xs:sequence>
>
> <xs:element name="hours" type="xs:int"/>
>
> <xs:element name="minutes" type="xs:int"/>
>
> <xs:element name="seconds" type="xs:int"/>
>
> <xs:element name="time" type="xs:long"/>
>
> <xs:element name="calendarDate" nillable="true"
> type="ax27:BaseCalendar$Date"/>
>
> <xs:element name="date" type="xs:int"/>
>
> <xs:element name="day" type="xs:int"/>
>
> <xs:element name="hours" type="xs:int"/>
>
> <xs:element name="julianCalendar" nillable="true"
> type="ax27:BaseCalendar"/>
>
> <xs:element name="minutes" type="xs:int"/>
>
> <xs:element name="month" type="xs:int"/>
>
> <xs:element name="seconds" type="xs:int"/>
>
> <xs:element name="time" type="xs:long"/>
>
> <xs:element name="timeImpl" type="xs:long"/>
>
> <xs:element name="timezoneOffset" type="xs:int"/>
>
> <xs:element name="year" type="xs:int"/>
>
> </xs:sequence>
>
> </xs:complexType>
>
> </xs:schema>
>
> Seems reasonable and note the type attribute “ax23:Date”. Now the
> definition of the complex type that uses the Date object is as follows:
>
> <xs:complexType name="RegisterPassportData">
>
> <xs:sequence>
>
> <xs:element name="poolName" nillable="true" type="xs:string"/>
>
> <xs:element name="sessionID" nillable="true" type="xs:string"/>
>
> <xs:element name="dateOfBirth" nillable="true" type="ax28:Date"/>
>
> <xs:element name="firstName" nillable="true" type="xs:string"/>
>
> <xs:element name="gender" nillable="true" type="xs:string"/>
>
> <xs:element name="issuingCountry" nillable="true" type="xs:string"/>
>
> <xs:element name="lastName" nillable="true" type="xs:string"/>
>
> <xs:element name="nationality" nillable="true" type="xs:string"/>
>
> <xs:element name="passengerType" nillable="true" type="xs:string"/>
>
> <xs:element name="passportNumber" nillable="true" type="xs:string"/>
>
> <xs:element name="referenceNumber" nillable="true" type="xs:string"/>
>
> </xs:sequence>
>
> </xs:complexType>
>
> Also looks reasonable except for one thing. The type specified for the
> Date object is defined as “ax28:Date”. There is no match within the
> generated WSDL for this type.
>
> When populating the complex type, I use the Date object provided as
> part of the generated stub for the dateOfBirth value. When this is
> deserialized into the java.sql.Data object on the server side (keep in
> mind the java.sql.Date object was used to generate the WSDL) I receive
> the following error on the server side:
>
> org.apache.axis2.AxisFault: java.sql.Date; nested exception is:
>
> _java.lang.InstantiationException_: java.sql.Date
>
> at
> org.apache.axis2.engine.DefaultObjectSupplier.getObject(_DefaultObjectSupplier.java:28_)
>
> at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(_BeanUtil.java:261_)
>
> at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(_BeanUtil.java:291_)
>
> at
> org.apache.axis2.databinding.utils.BeanUtil.processObject(_BeanUtil.java:549_)
>
> at
> org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(_BeanUtil.java:499_)
>
> at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(_BeanUtil.java:438_)
>
> at
> org.apache.axis2.rpc.receivers.RPCUtil.processRequest(_RPCUtil.java:109_)
>
> at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(_RPCMessageReceiver.java:116_)
>
> at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(_AbstractInOutSyncMessageReceiver.java:39_)
>
> at org.apache.axis2.engine.AxisEngine.receive(_AxisEngine.java:493_)
>
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(_HTTPTransportUtils.java:319_)
>
> at
> org.apache.axis2.transport.http.AxisServlet.doPost(_AxisServlet.java:247_)
>
> at javax.servlet.http.HttpServlet.service(_HttpServlet.java:709_)
>
> at javax.servlet.http.HttpServlet.service(_HttpServlet.java:802_)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(_ApplicationFilterChain.java:252_)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(_ApplicationFilterChain.java:173_)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(_StandardWrapperValve.java:213_)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(_StandardContextValve.java:178_)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(_StandardHostValve.java:126_)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(_ErrorReportValve.java:105_)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(_StandardEngineValve.java:107_)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(_CoyoteAdapter.java:148_)
>
> at
> org.apache.coyote.http11.Http11Processor.process(_Http11Processor.java:869_)
>
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(_Http11BaseProtocol.java:664_)
>
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(_PoolTcpEndpoint.java:527_)
>
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(_LeaderFollowerWorkerThread.java:80_)
>
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(_ThreadPool.java:684_)
>
> at java.lang.Thread.run(Unknown Source)
>
> Is the above correct? Am I doing something wrong? Is there a trick
> that I am not seeing?
>
> Regards,
>
> Larry Johnson
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message