I have a WSDL, with which I created Java Classes through WSDL2Java tool. But the problem is not all attributes that are returned from the response SOAP XML will have a value. Some may be null also. So when I construct back the objects from the response, it is not able to parse double object or Integer object as the nulls encounter NumberFormatException. Is there anyway I can specify to by pass null objects during Java Classes creation through the tool or do we have other good way to handle this.
Joined: Oct 04, 2006
If you have the opportunity to be able to edit the WSDL, then use minOccurs="0" for elements that are optional.
There is also a nillable attribute for elements that can be set to true to allow for null values: nillable="true"