Formatting BigDecimal element in response
"T. Allen" <[email protected]>
| Newsgroups | gmane.text.xml.axis.user |
|---|---|
| Message-ID | <[email protected]> |
I have an element defined as: <xsd:simpleType name="ShipmentType"> <xsd:restriction base="decimal"> <xsd:enumeration value="50" /> <xsd:enumeration value="60" /> <xsd:enumeration value="77.5" /> </xsd:restriction> </xsd:simpleType> The class generated by the wsdl2java tool expects a BigDecimal parameter: public void setShipment(java.math.BigDecimal ship) The problem is that passing a value of 50 to the method produces a value of "50.0" (no quotes) in the response. How can I get the value formatted as in the enumeration? I want the values to appear as 50, 60 or 77.5. Any advice or tips are much appreciated! Thanks, T