This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Jboss decimal conversion - Very urgent - Please help if possible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss decimal conversion - Very urgent - Please help if possible" Watch "Jboss decimal conversion - Very urgent - Please help if possible" New topic
Author

Jboss decimal conversion - Very urgent - Please help if possible

Karthik Krishnamurthy
Ranch Hand

Joined: Feb 04, 2005
Posts: 118
Yesterday, in our company we moved all our webservices from Weblogic to JBoss.
There is a wierd error that we are seeing.
A response:
<Amount>0.000000000000000</Amount>

is being rendered in jboss as :
<Amount>0E-15</Amount>
As a result, our clients are unable to p[rocess this.
Does anyone know why, or what can be done to rectify.

Type is decimal - <element name="Amount" type="decimal" minOccurs="0" nillable="true"/>

Thank you
Karthik
Karthik Krishnamurthy
Ranch Hand

Joined: Feb 04, 2005
Posts: 118
I believe this is a Java 5.0 issue now.
Still waiting to figure out a work around

Thanks
Karthik
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Can't you restrict your decimal element like

<element name="Amount" minOccurs="0" nillable="true"/>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="10" />
<xsd:fractionDigits value="0" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Jboss decimal conversion - Very urgent - Please help if possible
 
Similar Threads
javax.jms.JMSSecurityException: User null is NOT authenticated
JNDI lookups
How to remove all EJB security | WAS-to-JBOSS migration
ejb2 beans from jboss4 to jboss5 need different naming lookup patterns
stuck up in the problem