[ http://issues.apache.org/jira/browse/AXIS2-1271?page=all ]

Davanum Srinivas updated AXIS2-1271:
------------------------------------

    Component/s: adb

> Decimal data type - WSDL2JAVA generated bad code (won't compile)
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1271
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1271
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>         Environment: Axis 2 nightly, Java 1.4.2, Tomcat 4
>            Reporter: Todd Doolittle
>         Attachments: AXIS2-1271.wsdl
>
>
> I generated a client using WSDL2JAVA from WSDL that specifies a decimal data 
> type (see WSDL below).  The generated stub code contains this line...
> object.setTemp(org.apache.axiom.om.OMElement.Factory.parse(reader));
> That causes this compile error:
> org.apache.axiom.om.OMElement.Factory cannot be resolved
> Also I noticed that the element that was defined as a decimal, it created as 
> an "OMElement" in the generated class.  I think it should be a BigDecimal or 
> something right?  Here is the member from the generated temperature class...
> protected org.apache.axiom.om.OMElement localTemp;
> The WSDL I was using was a bit complex.  So for clarity I wrote WSDL for a 
> simple service to look up the current temperature.  This WSDL also exhibits 
> the problem.  If for some reason there is any other problem with this WSDL 
> let me know, and I'll post up the original WSDL
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>    name="TemperatureService" targetNamespace="http://tempuri.org/";
>    xmlns:fjs="http://tempuri.org/";
>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>    <wsdl:types>
>       <xsd:schema elementFormDefault="qualified"
>          targetNamespace="http://tempuri.org/";
>          xmlns:s1="http://tempuri.org/";>
>          <xsd:complexType name="Location">
>             <xsd:sequence>
>                <xsd:element name="city" type="xsd:string" />
>                <xsd:element name="state" type="xsd:string" />
>             </xsd:sequence>
>          </xsd:complexType>
>          <xsd:complexType name="Temperature">
>             <xsd:sequence>
>                <xsd:element name="date" type="xsd:date"/>
>                <xsd:element name="temp" nillable="true">
>                   <xsd:simpleType>
>                      <xsd:restriction base="xsd:decimal">
>                         <xsd:totalDigits value="10" />
>                         <xsd:fractionDigits value="0" />
>                      </xsd:restriction>
>                   </xsd:simpleType>
>                </xsd:element>
>             </xsd:sequence>
>          </xsd:complexType>
>          <xsd:element name="getTemperatureRequest" type="Location" />
>          <xsd:element name="getTemperatureResponse"
>             type="Temperature" />
>       </xsd:schema>
>    </wsdl:types>
>    <wsdl:message name="GetTemperatureIn">
>       <wsdl:part element="fjs:getTemperatureRequest" name="parameters" />
>    </wsdl:message>
>    <wsdl:message name="GetTemperatureOut">
>       <wsdl:part element="fjs:GetTemperatureResponse" name="parameters" />
>    </wsdl:message>
>    <wsdl:portType name="TemperatureServicePortType">
>       <wsdl:operation name="GetTemperature">
>          <wsdl:input message="fjs:GetTemperatureIn" 
> name="getTemperatureRequest" />
>          <wsdl:output message="fjs:GetTemperatureOut"
>             name="GetTemperatureResponse" />
>       </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="TemperatureServiceBinding" 
> type="fjs:TemperatureServicePortType">
>       <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; />
>       <wsdl:operation name="GetTemperature">
>          <soap:operation soapAction="GetTemperature" style="document" />
>          <wsdl:input name="getTemperatureRequest">
>             <soap:body use="literal" />
>          </wsdl:input>
>          <wsdl:output name="getTemperatureResponse">
>             <soap:body use="literal" />
>          </wsdl:output>
>       </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="TemperatureService">
>       <wsdl:port binding="fjs:TemperatureServiceBinding" 
> name="TemperatureServicePortType">
>          <soap:address
>             location="http://151.149.158.136:6395/ws/r/poc"; />
>       </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to