Hi I'm using CXF 2.2.5 to generate some simple webservices.
One of my webservice methods takes this object as parameter:
<xs:complexType name="absenceRegistrationForm">
<xs:sequence>
<xs:element minOccurs="0" name="absence_reason" nillable="true"
type="xs:string"/>
<xs:element minOccurs="0" name="absent" type="xs:boolean"/>
<xs:element name="courseParticipantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
The request is:
<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:d="http://www.w3.org/2001/XMLSchema"
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
<v:Header />
<v:Body>
<n0:registerAbsence id="o0" c:root="1"
xmlns:n0="http://absence.foo2.foo.com/">
<AbsenceRegistrationForms i:type="d:anyType">
<courseParticipantId
i:type="d:int">1</courseParticipantId>
<absent i:null="true" />
<absence_reason i:null="true" />
</AbsenceRegistrationForms>
</n0:registerAbsence>
</v:Body>
</v:Envelope>
Now, I set both absent and absence_reason to null.
for absent (boolean) i get null as I expected, but for absence_reason
(String) I get an emphty string!
If I change <absence_reason i:null="true" /> to <absence_reason i:nil="true"
/> it works fine.
why????
--
View this message in context:
http://old.nabble.com/xsi%3Anull-generates-%22%22-tp26998085p26998085.html
Sent from the cxf-user mailing list archive at Nabble.com.