hi same prob also occured to someone else in the mailing list. wsdl2java generate the sql.Date or util.date for the XSD_Date. see the class org.apache.axis.encoding.DefaultTypeMappingImpl.
prob might be in the regenerating the XSD type from the java Date type. vtpavan > Hi all, > > I have run into the following problem. I define a type "xsd:date" in my > wsdl, then generate code using wsdl2java and when I deploy it on axis > (on tomcat), the type in the published wsdl becomes "xsd:dateTime". > Quite annoying when generating client and server code as well using > wsdl2java. In case this is too cryptic, the example should speak for > itself: > > ============================ testdate.wsdl ==================== > > <wsdl:definitions name="testdate" ... > <wsdl:types> > <xsd:schema> > <xsd:complexType name="Date"> > <xsd:sequence> > <xsd:element name="StudyDate" type="xsd:date" > > minOccurs="0"/> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="echo_in_type" type="xsd:date" > nillable="true"/> > <xsd:element name="echo_out_type" type="tns:Date" > nillable="true"/> > [...] > > ============================================================ > > I put testdate.wsdl into an empty directory, run wsdl2java on it with > 'serverside' and deploy using the generated > wsdd. Then what I get is: > > ============ http://localhost:8080/axis/services/testdate?wsdl > ============ > > <wsdl:definitions > <wsdl:types> > <schema > > <complexType name="Study"> > <sequence> > <element maxOccurs="1" minOccurs="0" name="StudyDate" > nillable="true" type="xsd:dateTime"/> > </sequence> > </complexType> > <element name="echo_in_type" type="xsd:date"/> > <element name="echo_out_type" type="impl:Study"/> > </schema> > </wsdl:types> > > ==================================================================================== > > > Any suggestions? Is this a bug (maybe known?), or am I doing something > wrong? The full wsdl file is copied below. > > Notice that apparently this happens only when date is nested in a > complexType, "echo_in_type" survives nicely. > > Thanks, > > Tamas > > > > ============================================================ > ============ testdate.wsdl ============ > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions name="testdate" > targetNamespace="http://testdate/" > elementFormDefault="qualified" > xmlns:tns="http://testdate/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> > <wsdl:types> > <xsd:schema> > <xsd:complexType name="Date"> > <xsd:sequence> > <xsd:element name="StudyDate" type="xsd:date" > minOccurs="0"/> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="echo_in_type" type="xsd:date" > nillable="true"/> > <xsd:element name="echo_out_type" type="tns:Date" > nillable="true"/> > </xsd:schema> > </wsdl:types> > <wsdl:message name="echo_Request"> > <wsdl:part name="echo_in" element="tns:echo_in_type"/> > </wsdl:message> > <wsdl:message name="echo_Response"> > <wsdl:part name="echo_out" element="tns:echo_out_type"/> > </wsdl:message> > > <wsdl:portType name="Testdate"> > <wsdl:operation name="echo" parameterOrder=""> > <wsdl:input message="tns:echo_Request"/> > <wsdl:output message="tns:echo_Response"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="Testdate" type="tns:Testdate"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="echo"> > <soap:operation style="document"/> > <wsdl:input><soap:body > use="literal"/></wsdl:input> > <wsdl:output><soap:body > use="literal"/></wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="TestdateService"> > <wsdl:port name="testdate" binding="tns:Testdate"> > <soap:address > location="http://pcettmg03.cern.ch:8080/axis/services/testdate"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions>
