Problems with addFloats

Hello people. I’m using wM IS 4.6 and I have a problem.

I have to develop a service which receives an XML file thru http(a purchase order), generate an IDOC and deliver it to SAP.
One of the IDOC fields, must contain the addition of some of the XML values.

The problem is that, when the XML arrives and the service runs automatically, addFloats doesn’t recognize the decimal separator(neither “,” nor “.”). But when I copy the same XML to my service’s input and then run it manually: It works ok! (receives “,” as separator for the input, but gives “.” as separator for the output)

Thanks in advance to you all.

This is a shot in the dark but this seems like a possible locale issue. Can you share some more detail about how the service is invoked via HTTP and what the service signature is (inputs, outputs)?

You might want to reconsider the use addFloats (see


We have configured a http listener (5556). The package asociated with the port is the one which contains our service. This service is invoked by another application developed by another area of the company. The only thing we know is that every time a customer buy something, a PO arrives at our server in XML format. The only input for our service is this XML.
We have another service which parses the XML and returns a record structure containing the data for each item the customer bought.

The next step, is to add some value which repeats for every item (We do this with a loop structure). This is done by another service, which receive as input the record structure, and returns the addition result.
I placed a savePipeline at the begining of this service. When it runs “on demand”, it returns very huge values (because 12.23 is read as 1223), but when I disable savePipeline, enable restorePipeline and run the service again, the result is correct.

Anyway, I have read your article, it is great. I am going to implement your approach using the bigDecimal class. Thanks a lot for your time and advice. I will let you know how this evolves.