Im currently working on an export using SOAP.
I imported the wsdl into delphi (XE7) en started working.
There are a couple of fields that are optional. The parent class inherits from TRemotable.
The property:
property ProblemField: Integer Index (IS_NLBL) read FProblemField write FProblemField;
I would assume that the problemfield has the flag IS_NLBL means its nillable. I dont call the property at all but when sending the file delphi creates it with that property value 0 which gives an error since 0 is not a valid value for that field.
How can I fix this? I have no idea about how to make an integer nil. In my experience delphi considers nil as 0 but my thought was that IS_NLBL would prevent delphi from giving this field a 0 value.
I didn't write this code, it was generated by Delphi.
Any thoughts?
Thanks in advance.
Try to use TXSInteger instead. It is a wrapper for the interger type that allows nillable elements. I use to code on XE2 and it is available when you are importing the WSDL, it is the last option in the menu.
More info at http://docwiki.embarcadero.com/Libraries/Seattle/en/Soap.XSBuiltIns.TXSInteger