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 "Larry Johnson (JIRA)" <ji...@apache.org> on 2007/02/15 14:49:05 UTC

[jira] Created: (AXIS2-2189) Incorrect Mapping For java.sql.Date

Incorrect Mapping For java.sql.Date
-----------------------------------

                 Key: AXIS2-2189
                 URL: https://issues.apache.org/jira/browse/AXIS2-2189
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: wsdl
    Affects Versions: 1.1
         Environment: Windows XP
Java v1.5
Axis2 1.1
Tomcat 5.5.20
            Reporter: Larry Johnson


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)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-2189) Incorrect Mapping For java.sql.Date

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494323 ] 

Deepal Jayasinghe commented on AXIS2-2189:
------------------------------------------

issues is fixe in Axis2 1.2 please try and confirm

Thanks
Deepal

> Incorrect Mapping For java.sql.Date
> -----------------------------------
>
>                 Key: AXIS2-2189
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2189
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.1
>         Environment: Windows XP
> Java v1.5
> Axis2 1.1
> Tomcat 5.5.20
>            Reporter: Larry Johnson
>
> 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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-2189) Incorrect Mapping For java.sql.Date

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe resolved AXIS2-2189.
--------------------------------------

    Resolution: Fixed

> Incorrect Mapping For java.sql.Date
> -----------------------------------
>
>                 Key: AXIS2-2189
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2189
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.1
>         Environment: Windows XP
> Java v1.5
> Axis2 1.1
> Tomcat 5.5.20
>            Reporter: Larry Johnson
>
> 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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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