hooklift/gowsdl

nillable="true" attribute in WSDL not followed

moihn opened this issue · 1 comments

moihn commented

We have a SOAP service data defining an optional field using nillable="true" attribute, like below :

<sequence>
<element name="amountParamClassId" type="xsd:int" minOccurs="0" maxOccurs="1" nillable="true"/>
...
</sequence>

but the generated code has a definition of :
AmountParamClassId int32

so when the field is omitted from the returned value, our client program will still have a value of 0, and it cannot differentiate a real value of 0 or a missing field.

It seems for this nillable="true", the code generator should create a pointer type field instead, like:
AmountParamClassId *int32

moihn commented

I have created PR #193 for this issue, please feel free to comment. Thanks!