isNilItem

isNilItem(obj:          Object;
          propertyName: String;
          indx:         Integer): Boolean;

The isNilItem method of the JadeWebService class returns true if the item defined in the method parameters was specified as having a nil state in the XML message that is being processed.

The isNilItem method parameters are listed in the following table.

Parameters Description
obj The JADE object containing the property to be examined or an array containing the index to be examined
propertyName The JADE name of the property in the object to be examined or null ("") when examining the object itself
indx The array index of the entry to be examined when an array is specified by the other parameters

In a JadeWebServiceConsumer method, call this method to determine whether an item received in response to a Web service request is specified as having a nil state, as shown in the following code fragment.

if myWebServiceConsumer.isNilItem(employee, 'spouse', null) then
    // employee has no spouse
endif;
if myWebServiceConsumer.isNilItem(addressArray, null, 3) then
    // addressArray[3] is empty
endif;

In a JadeWebServiceProvider method, call this method to determine whether an item received in the Web service request is specified as having a nil value, as shown in the following code fragment.

if isNilItem(employee, 'spouse', null) then
    // employee has no spouse
endif;
if isNilItem(addressArray, null, 3) then
    // addressArray[3] is empty
endif;

For both Web service consumer and Web service provider calls, the item received will have a JADE value of null.

The nil state of an element applies only to element values and not to attribute values. (An element whose nil value is true may not have any element content, but it may still carry attributes.)