Please log a new bug report.
thanks,
dims
On 8/23/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The problem does seem to be resolved in the latest snapshot. The
> problem with the 1.2.1 release is it produced typeDesc code that looked
> like:
> elemField.setXmlName(new
> javax.xml.namespace.QName("http://test.axis.com/wsdl2java/",
> "testDate"));
> elemField.setXmlType(new
> javax.xml.namespace.QName("http://test.axis.com/wsdl2java/",
> "testDate"));
>
> The patch I submitted changed it to:
> elemField.setXmlName(new
> javax.xml.namespace.QName("http://test.axis.com/wsdl2java/",
> "testDate"));
> elemField.setXmlType(new
> javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "date"));
>
> The latest snapshot (ws-axis_20050823103951.tar.gz) seems to produce the
> same code as the patched version. I did find a new issue with the
> snapshot where a generated class calls super() with a string argument
> and the super class is java.lang.Object. A WSDL is below that generates
> the problem. Also, I am running WSDL2Java with the following args:
>
> 'org.apache.axis.wsdl.WSDL2Java -o <output_path> -O -1 -W -s'
>
> <wsdl:definitions xmlns="http://test.axis.com/wsdl2java/"
> xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://test.axis.com/wsdl2java/" name="axisTest">
> <wsdl:types>
> <xs:schema targetNamespace="http://test.axis.com/wsdl2java/"
> xmlns="http://test.axis.com/wsdl2java/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> <xs:element name="testString" type="xs:string"/>
> <xs:element name="testDate" type="xs:date"/>
> <xs:complexType name="WSDLTest_Type">
> <xs:sequence>
> <xs:element ref="testString" minOccurs="1"
> maxOccurs="1"/>
> </xs:sequence>
> </xs:complexType>
> <xs:simpleType name="TestSimpleType_Type">
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> <xs:complexType name="TestExtension_Type">
> <xs:simpleContent>
> <xs:extension base="TestSimpleType_Type">
> <xs:attribute name="description"
> type="xs:string" use="optional"/>
> </xs:extension>
> </xs:simpleContent>
> </xs:complexType>
> <xs:complexType name="WSDLTestResponse_Type">
> <xs:sequence>
> <xs:element ref="testDate" minOccurs="1"
> maxOccurs="1"/>
> <xs:element name="testExtension"
> type="TestExtension_Type" minOccurs="1" maxOccurs="1"/>
> </xs:sequence>
> </xs:complexType>
> <xs:element name="getWSDLTest" type="WSDLTest_Type"/>
> <xs:element name="getWSDLTestResponse"
> type="WSDLTestResponse_Type"/>
> </xs:schema>
> </wsdl:types>
> <wsdl:message name="GetWSDLTestRequestMessage">
> <wsdl:part name="getWSDLTestRequest" element="getWSDLTest"/>
> </wsdl:message>
> <wsdl:message name="GetWSDLTestResponseMessage">
> <wsdl:part name="getWSDLTestResponse"
> element="getWSDLTestResponse"/>
> </wsdl:message>
> <wsdl:portType name="GetWSDLTestPortType">
> <wsdl:operation name="getWSDLTest">
> <wsdl:input message="GetWSDLTestRequestMessage"/>
> <wsdl:output message="GetWSDLTestResponseMessage"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="GetWSDLTestSoapBinding"
> type="GetWSDLTestPortType">
> <soapbind:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="getWSDLTest" >
> <soapbind:operation style="document"
> soapAction="http://service.wellsfargo.com/provider/pcs/account/2004/"/>
> <wsdl:input>
> <soapbind:body parts="getWSDLTestRequest"
> use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <soapbind:body parts="getWSDLTestResponse"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="GetWSDLTestService">
> <wsdl:port name="getWSDLTest" binding="GetWSDLTestSoapBinding">
> <soapbind:address
> location="http://localhost:7001/services/getWSDLTest/"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
>
> -----Original Message-----
> From: Davanum Srinivas (JIRA) [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 22, 2005 9:33 PM
> To: [EMAIL PROTECTED]
> Subject: [jira] Resolved: (AXIS-2115) axis 1.2.1 fails to deserialize
> xs:date in responses
>
>
> [ http://issues.apache.org/jira/browse/AXIS-2115?page=all ]
>
> Davanum Srinivas resolved AXIS-2115:
> ------------------------------------
>
> Resolution: Fixed
>
> Please try latest CVS / nightly and let me know if you see the problem
> ASAP!. I see that the code in question (patch that you attached) is not
> being called when i execute wsdl2java. I also don't see any difference
> in the response to the axis1.2 client and axis1.2-fix client that you
> attached. So am confused thoroughly :) So please start with a clean
> slate (build from axis cvs or pick a nightly build) and let me know.
>
> thanks,
> dims
>
> > axis 1.2.1 fails to deserialize xs:date in responses
> > ----------------------------------------------------
> >
> > Key: AXIS-2115
> > URL: http://issues.apache.org/jira/browse/AXIS-2115
> > Project: Apache Axis
> > Type: Bug
> > Components: WSDL processing
> > Versions: 1.2, 1.2.1
> > Environment: windows xp pro
> > Reporter: Michael Ward
> > Priority: Blocker
>
> >
> > Axis 1.2.1, as a client, seems to be failing to deserialize responses
> > properly and completely fails when parsing a date returned from an
> Axis 1.1 document/literal service. Listed below are 3 scenarios where
> the same WSDL was used to generate the client and serverside bindings
> using WSDL2Java. I ended up making a change to one of the WSDL2Java
> classes to get this working. This may or may not need to be filed as a
> bug and I'm not sure if the change I made is safe or if it just solves
> my problem.
> >
> > I found through debugging that during deserialization that axis 1.2.1
> > would always end up stepping into lines 291-297 of the
> BeanDeserializer where the comment states that it is an error if the
> deserializer is not found at this point. After comparing the generated
> 1.1 and 1.2.1 binding classes I found that making the following change
> fixed my problem. I've also attached the WSDL used below.
> >
> > $ diff
> > ./axis-1_2_1/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java
> ./axis-1_2_1/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java.o
> rig
> > 363,369c363
> > < if (elemType != null &&
> > < elemType.getRefType() != null &&
> > < elemType.getRefType().getQName() != null)
> {
> > < pw.println("
> elemField.setXmlType("
> > < +
> Utils.getNewQName(elemType.getRefType().getQName()) + ");");
> > < } else {
> > < pw.println("
> elemField.setXmlType("
> > ---
> > > pw.println(" elemField.setXmlType("
> > 371d364
> > < }
> >
> > If someone could take a look and let me know if I should be doing
> > something else I would appreciate it. Unfortunately having everyone
> upgrade to 1.2.1 is not an option right now so I really need this type
> of interoperability to work.
> >
> > thanks,
> > -mike
> >
> >
> >
> > <wsdl:definitions xmlns="http://test.axis.com/wsdl2java/"
> xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://test.axis.com/wsdl2java/" name="axisTest">
> > <wsdl:types>
> > <xs:schema targetNamespace="http://test.axis.com/wsdl2java/"
> xmlns="http://test.axis.com/wsdl2java/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> > <xs:element name="testString" type="xs:string"/>
> > <xs:element name="testDate" type="xs:date"/>
> > <xs:complexType name="WSDLTest_Type">
> > <xs:sequence>
> > <xs:element ref="testString" minOccurs="1"
> maxOccurs="1"/>
> > </xs:sequence>
> > </xs:complexType>
> > <xs:complexType name="WSDLTestResponse_Type">
> > <xs:sequence>
> > <xs:element ref="testDate" minOccurs="1"
> maxOccurs="1"/>
> > </xs:sequence>
> > </xs:complexType>
> > <xs:element name="getWSDLTest" type="WSDLTest_Type"/>
> > <xs:element name="getWSDLTestResponse"
> type="WSDLTestResponse_Type"/>
> > </xs:schema>
> > </wsdl:types>
> > <wsdl:message name="GetWSDLTestRequestMessage">
> > <wsdl:part name="getWSDLTestRequest" element="getWSDLTest"/>
> > </wsdl:message>
> > <wsdl:message name="GetWSDLTestResponseMessage">
> > <wsdl:part name="getWSDLTestResponse"
> element="getWSDLTestResponse"/>
> > </wsdl:message>
> > <wsdl:portType name="GetWSDLTestPortType">
> > <wsdl:operation name="getWSDLTest">
> > <wsdl:input message="GetWSDLTestRequestMessage"/>
> > <wsdl:output message="GetWSDLTestResponseMessage"/>
> > </wsdl:operation>
> > </wsdl:portType>
> > <wsdl:binding name="GetWSDLTestSoapBinding"
> type="GetWSDLTestPortType">
> > <soapbind:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> > <wsdl:operation name="getWSDLTest" >
> > <soapbind:operation style="document"
> soapAction="http://service.wellsfargo.com/provider/pcs/account/2004/"/>
> > <wsdl:input>
> > <soapbind:body parts="getWSDLTestRequest"
> use="literal"/>
> > </wsdl:input>
> > <wsdl:output>
> > <soapbind:body parts="getWSDLTestResponse"
> use="literal"/>
> > </wsdl:output>
> > </wsdl:operation>
> > </wsdl:binding>
> > <wsdl:service name="GetWSDLTestService">
> > <wsdl:port name="getWSDLTest"
> binding="GetWSDLTestSoapBinding">
> > <soapbind:address
> location="http://localhost:7001/services/getWSDLTest/"/>
> > </wsdl:port>
> > </wsdl:service>
> > </wsdl:definitions>
> >
> >
> >
> >
> >
> >
> >
> > Axis 1.1 Client --> Axis 1.1 Service
> > Request:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <getWSDLTest xmlns="http://test.axis.com/wsdl2java/">
> > <testString>Test String</testString>
> > </getWSDLTest>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > Response:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <getWSDLTestResponse xmlns="http://test.axis.com/wsdl2java/">
> > <testDate>2005-07-12</testDate>
> > </getWSDLTestResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > Result: works!!
> >
> >
> >
> > Axis 1.2.1 Client --> Axis 1.1 Service
> > Request:
> > <?xml version="1.0" encoding="utf-8"?>
> > <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >
> > <soapenv:Body>
> > <getWSDLTest xmlns="http://test.axis.com/wsdl2java/">
> > <testString xsi:type="xsd:string">Test String</testString>
> > </getWSDLTest>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > Response:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <getWSDLTestResponse xmlns="http://test.axis.com/wsdl2java/">
> > <testDate>2005-07-12</testDate>
> > </getWSDLTestResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > Result: Client fails to deserialize with
> > `java.lang.NumberFormatException: Invalid date/time`
> >
> >
> >
> > Axis 1.2.1-fix Client --> Axis 1.1 Service
> > Request:
> > <?xml version="1.0" encoding="utf-8"?>
> > <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >
> > <soapenv:Body>
> > <getWSDLTest xmlns="http://test.axis.com/wsdl2java/">
> > <testString>Test String</testString>
> > </getWSDLTest>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > Response:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <getWSDLTestResponse xmlns="http://test.axis.com/wsdl2java/">
> > <testDate>2005-07-12</testDate>
> > </getWSDLTestResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > Result: works!!
>
> --
> 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
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
--
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform