axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suriya Simsuwat <ssimsuwat2...@yahoo.com>
Subject It is a bug of ADB with xsd:decimal?
Date Wed, 26 Mar 2008 03:37:39 GMT
Hi all,

I have faced the strange problem that in my WSDL file I have xsd:simpleType for xsd:decimal
element like below (full details of WSDL can be found in the attached file). 

<xsd:simpleType name="number11_4">
                <xsd:restriction base="xsd:decimal">
                    <xsd:totalDigits value="11" />
                    <xsd:fractionDigits value="4" />
                </xsd:restriction>
</xsd:simpleType>

After I created a skeleton class, built .aar file, and then deploy it on Tomcat. Currently
I am using Axis2 version 1.3. 

When I used the client class to call this service by  setting the value as 1.0002 to UserNum1
parameter which having xsd:decimal type defined in the WSDL, the web service server always
got this value 1.000199999999999977973175191436894237995147705078125  instead of 1.0002. It
is a bug with ADB when it serializes and deserializes xsd:decimal element (BigDecimal object).

<ns1:WOLaborTimeRequest
    xmlns:ns1="http://www.test.com/WOLaborTime
Service" name="WOLaborTime"
    business_id="testTH03" create_date="2008-03-26Z" cre
    ate_time="03:19:48.000000866Z" source_reference="G1"
    destination_reference="G2">
    <WOLaborTimeHeader>
        <UserAlpha1>Alpha1</UserAlpha1>
        <UserAlpha2>Alpha2</UserAlpha2>
        <UserAlpha3>Alpha3</UserAlpha3>
        <UserNum1>
            1.000199999999999977973175191436894237995147705078125
        </UserNum1>
        <UserNUm2>2</UserNUm2>
        <UserNum3>3</UserNum3>
        <WOLaborTimeLines>
            <Sequence>0002</Sequence>
            <WorkOrder>TEST</WorkOrder>
            <WorkOrderLine>0001</WorkOrderLine>
            <EmployeeNumber>0123</EmployeeNumber>
            <LaborHours>8</LaborHours>
            <LaborHoursCode>T</LaborHoursCode>
            <LaborHoursType>T</LaborHoursType>
            <LaborShift>T</LaborShift>
            <TransactionDate>2008-03-26Z</TransactionDate>
        </WOLaborTimeLines>
    </WOLaborTimeHeader>
</ns1:WOLaborTimeRequest>
 
Can anyone suggest me how to solve this issue?

Best Regards,

Suriya


       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
Mime
View raw message