The xsi:nil attribute is part of XML Schema. As such, is not in scope of
either the SOAP or WSDL specifications per se.
What this allows you to do is pass in an empty element as part of an XML
Schema instance where the element is otherwise required. It is the
equivelant of passing in null in Java, or undef in Perl.
So, for example, you could specify a Contact element as:
<contact>
<firstName>John</firstName>
<lastName>Doe</lastName>
<dayPhone/>
</contact>
What you could not do is:
<contact>
<firstName>John</firstName>
<lastName>Doe</lastName>
</contact>
HTH,
Ian
Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure & Operations
[EMAIL PROTECTED]
(614) 213-6100
"Pascale, Peter H." <[EMAIL PROTECTED]> on 05/29/2003 04:33:45 PM
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: SOAP validation - help me defend Axis!
A customer of ours exposes some web services for app integration. We use
Axis, they use Weblogic. In their WSDL, some fields are required, and some
aren't. For the most part, we've done our homework to make sure that we're
always populating required fields. In at least one case we're not, so when
we fail to populate a required field, the WSDL looks like this:
<dayPhone xsi:nil="true"/>
Now for the questions:
1) Is this valid SOAP according to the SOAP spec? I assume yes but want to
confirm.
2) If the WSDL indicates that DayPhone is a required field, then can it be
said that this is NOT valid SOAP according to the WSDL?
3) The client uses Weblogic, so they've got all sort of tools and features.
They question whether we should even be sending this message to them. It
sounded like they expected us to be able to validate the SOAP message
(against the WSDL I assume). In this case, the validation would detect that
this is not valid SOAP and the request could be avoided. Does Axis provide
this validation? If so, how do I configure it? If not, has anyone written
open source or commercial validation handlers for Axis?
Thanks all, loving Axis and want to stay that way.
Peter
****************************************************************************
This email may contain confidential material.
If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************
This transmission may contain information that is privileged, confidential and/or
exempt from disclosure under applicable law. If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution, or use of the
information contained herein (including any reliance thereon) is STRICTLY PROHIBITED.
If you received this transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard copy format. Thank
you.