Hi Luca,
Dates aren't nillable by default because sometimes that can cause issues with .NET 1.1 (DateTimes can't be null in .NET). However, if you wish to override you can create a mapping file (see the aegis binding section of the manual) or specify the @Nillable annotation (see the javadocs).

- Dan
Luca Quarello wrote:
Hi,
by default dateTime elements haven't the property nillable="true" so when my service return null the element doesn't appear in the soap response.

<wsdl:definitions targetNamespace="http://services.anagui.model.oinweb.datasw.com";>
   <wsdl:types>
<xsd:schema targetNamespace="http://bo.anagui.model.oinweb.datasw.com"; elementFormDefault="qualified" attributeFormDefault="qualified">
       <xsd:complexType name="UnitaImmobiliare">
               <xsd:sequence>
<xsd:element name="codEnte" type="xsd:string" minOccurs="0" nillable="true"/> <xsd:element name="codEntePadre" type="xsd:string" minOccurs="0" nillable="true"/>
                          ...
<xsd:element name="dataFineLeasing" type="xsd:dateTime" minOccurs="0"/> <xsd:element name="dataFinePossesso" type="xsd:dateTime" minOccurs="0"/> <xsd:element name="dataInizioLeasing" type="xsd:dateTime" minOccurs="0"/> <xsd:element name="dataInizioPossesso" type="xsd:dateTime" minOccurs="0"/> <xsd:element name="dataModificaRecord" type="xsd:dateTime" minOccurs="0"/>
                         ...
<xsd:element name="percentualePossesso" type="xsd:int" minOccurs="0" nillable="true"/>
                        ...
               </xsd:sequence>
       </xsd:complexType>
        ...

Does anybody know if it is possible to set nillable="true" for dateTime elements and how?

Thanks,
Luca




--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog

Reply via email to