To those of you that have used java.sql.Date: I am having problems sending in parameters that are defined in Java as java.sql.Date. Please forgive me if this is a question that has been answered before. I have searched the mailing list and the newsgroups to no avail. Hopefully someone will be able to help me.
I am currently using the latest axis 1.1 release version, j2sdk 1.4.2-03, on linux RedHat 9.0. In the following example jws file, I have three methods, echoString, currentDate, and echoDate. <start of code file="SoapTest.jws"> public class SoapTest { public String echoString( String s ) { return s; } public java.sql.Date currentDate() { return new java.sql.Date( System.currentTimeMillis() ); } public java.sql.Date echoDate( java.sql.Date d ) { return d; } } <end of code> When I call echoString: http://localhost:8080/axis/SoapTest.jws?method=echoString&s=teststring I get what I would expect back: ... <echoStringReturn xsi:type="xsd:string">teststring</echoStringReturn> ... When I call currentDate: http://localhost:8080/axis/SoapTest.jws?method=currentDate I get what I would expect back: ... <currentDateReturn xsi:type="xsd:date">2004-03-22</currentDateReturn> ... However, when I call echoDate: http://localhost:8080/axis/SoapTest.jws?method=echoDate&d=2004-03-22 I get what I don't expect back: <soapenv:Envelope> <soapenv:Body> <soapenv:Fault> <faultcode>Server.userException</faultcode> <faultstring>No such operation 'echoDate'</faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> It appears that I can't pass in a date??? Does anyone have any experience with this problem? Any help or advice would be greatly appreciated. Thanks, - Jake Other information: http://localhost:8080/axis/SoapTest.jws?wsdl Produces: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://localhost:8080/axis/SoapTest.jws" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/axis/SoapTest.jws" xmlns:intf="http://localhost:8080/axis/SoapTest.jws" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:message name="echoDateResponse"> <wsdl:part name="echoDateReturn" type="xsd:date"/> </wsdl:message> <wsdl:message name="echoDateRequest"> <wsdl:part name="d" type="xsd:date"/> </wsdl:message> <wsdl:message name="currentDateResponse"> <wsdl:part name="currentDateReturn" type="xsd:date"/> </wsdl:message> <wsdl:message name="echoStringResponse"> <wsdl:part name="echoStringReturn" type="xsd:string"/> </wsdl:message> <wsdl:message name="currentDateRequest"> </wsdl:message> <wsdl:message name="echoStringRequest"> <wsdl:part name="s" type="xsd:string"/> </wsdl:message> <wsdl:portType name="SoapTest"> <wsdl:operation name="currentDate"> <wsdl:input message="impl:currentDateRequest" name="currentDateRequest"/> <wsdl:output message="impl:currentDateResponse" name="currentDateResponse"/> </wsdl:operation> <wsdl:operation name="echoDate" parameterOrder="d"> <wsdl:input message="impl:echoDateRequest" name="echoDateRequest"/> <wsdl:output message="impl:echoDateResponse" name="echoDateResponse"/> </wsdl:operation> <wsdl:operation name="echoString" parameterOrder="s"> <wsdl:input message="impl:echoStringRequest" name="echoStringRequest"/> <wsdl:output message="impl:echoStringResponse" name="echoStringResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="SoapTestSoapBinding" type="impl:SoapTest"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="currentDate"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="currentDateRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/> </wsdl:input> <wsdl:output name="currentDateResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/SoapTest.jws" use="encoded"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="echoDate"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="echoDateRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/> </wsdl:input> <wsdl:output name="echoDateResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/SoapTest.jws" use="encoded"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="echoString"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="echoStringRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/> </wsdl:input> <wsdl:output name="echoStringResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/SoapTest.jws" use="encoded"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="SoapTestService"> <wsdl:port binding="impl:SoapTestSoapBinding" name="SoapTest"> <wsdlsoap:address location="http://localhost:8080/axis/SoapTest.jws"/> </wsdl:port> </wsdl:service> </wsdl:definitions> In searching the logs, the following dump occurs: No such operation 'echoDate' at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:301) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:1 84) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java: 71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323) at org.apache.axis.transport.http.AxisServlet.invokeEndpointFromGet(AxisServlet .java:544) at org.apache.axis.transport.http.AxisServlet.processMethodRequest(AxisServlet. java:466) at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:294) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java: 339) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrR ealm.java:220) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStat sValve.java:76) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci ationValve.java:65) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:677) at java.lang.Thread.run(Thread.java:534)