P.S : I have looked at similar questions but haven\'t been able to understand what to do. They talk about using a marshal class, which I can\'t seem to unde
Implement a Marshal for the Double
public class MarshalDouble implements Marshal
{
@Override
public Object readInstance(XmlPullParser parser, String namespace, String name,
PropertyInfo expected) throws IOException, XmlPullParserException {
return Double.parseDouble(parser.nextText());
}
public void register(SoapSerializationEnvelope cm) {
cm.addMapping(cm.xsd, "double", Double.class, this);
}
@Override
public void writeInstance(XmlSerializer writer, Object obj) throws IOException {
writer.text(obj.toString());
}
}
Then call There register method in your code.
new MarshalDouble().register(envelope);