axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psw-axis-...@wisnovsky.net
Subject null indicators for <element nillable="true" minOccurs="0" ...>
Date Fri, 29 Jul 2005 00:34:40 GMT
I have a web service where I need to distinguish between "a value was not sent" and "a value
was sent and is nil", both to and from the server. If I have an element of a complex type
with a subelement where nillable="true" and minOccurs="0" AXIS generates the attribute of
the Java class, but there seems to be no way to indicate for

	<xs:complexType name="ResourceType">
		<xs:complexContent>
			<xs:extension base="pvOperational:PersonType">
				<xs:sequence>
..
					<xs:element name="employerRef" type="pvOperational:AgencyReferenceType" minOccurs="0"
nillable="true"/>

that I want no employerRef or a nil employerRef, e.g.

<resource>
<employerRef xsi:nil="true"/>
</resource>

versus

<resource/>

In either case all I see in the proxy is an attribute employerRef that might or might not
be null.

Is this supported? JaxRPC is admittedly unclear on the point but it seems pretty fundamental
if you are dealing with database-based services to have null indicators.

Peter


Mime
View raw message