The Web Services Engine cannot distinguish between null and empty arrays
 Technote (FAQ)
 
Problem
The Web Services Engine cannot distinguish between null arrays and empty arrays.
 
Cause
This is a limitation. This article describes why:


Array gotcha -- null array vs. empty array
http://www-128.ibm.com/developerworks/xml/library/ws-array/

 
Solution
The solution is to follow the example in the above link. For example, if your WSDL file looks like this:


<element name="foo">
<complexType>
<sequence>
<element name="arg1" type="xsd:int"/>
<element maxOccurs="unbounded" name="strings" type="xsd:string"/>
<element name="arg2" type="xsd:long"/>
</sequence>
</complexType>
</element>

It must be modified to this:

<element name="foo">
<complexType>
<sequence>
<element name="arg1" type="xsd:int"/>
<element name="strings" nillable="true" type="impl:ArrayOfStrings"/>
<element name="arg2" type="xsd:long"/>
</sequence>
</complexType>
</element>
<complexType name="ArrayOfStrings">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="strings nillable="true" type="xsd:string"/>
</sequence>
</complexType>

 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Web Services (for example: SOAP or UDDI or WSGW or WSIF)
Operating system(s): Windows
Software version: 5.1
Software edition:
Reference #: 1215895
IBM Group: Software Group
Modified date: Aug 31, 2005