Hi,
I am developing a WSDL first web service. There is a method, getNames which
return a List<String>. I would like to return null, but failed to do so.
What I got on the client side was an empty list. Is nillable = "true" in
XMLSchema work for a list ?? Please take a look at <s:element
name="getNamesResult"
nillable="true" type="s:string" maxOccurs="unbounded" minOccurs="0">.
Thanks.

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:tns="http://avid.com/xena";
xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"; targetNamespace="http://my.com/FIG";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>

 <wsdl:types>

   <s:schema elementFormDefault="qualified" targetNamespace="
http://my.com/FIG";>

   <s:element name="getNames">

           <s:complexType>

                 <s:sequence>

                       <s:element name="handle" type="s:string" maxOccurs="1"
minOccurs="0"></s:element>

                 </s:sequence>

           </s:complexType>

     </s:element>

     <s:element name="getNamesResponse">

           <s:complexType>

                 <s:sequence>

                       <s:element name="getNamesResult" nillable="true"
type="s:string" maxOccurs="unbounded" minOccurs="0">

                       </s:element>

                 </s:sequence>

           </s:complexType>

     </s:element>

   </s:schema>

 </wsdl:types>





 <wsdl:message name="getNamesRequest">

     <wsdl:part name="parameters" element="tns:getNames"></wsdl:part>

 </wsdl:message>

 <wsdl:message name="getNamesResponse">

     <wsdl:part name="parameters" element="tns:getNamesResponse"></
wsdl:part>

 </wsdl:message>





 <wsdl:portType name="ServerSoap">

   <wsdl:operation name="getNames">

     <wsdl:input message="tns:getNamesRequest"></wsdl:input>

     <wsdl:output message="tns:getNamesResponse"></wsdl:output>

   </wsdl:operation>

 </wsdl:portType>





 <wsdl:binding name="ServerSoap" type="tns:ServerSoap">

   <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; />

   <wsdl:operation name="getNames">

     <soap:operation soapAction="http://my.com/FIG/getNames"; style="document"
/>

     <wsdl:input>

       <soap:body use="literal" />

     </wsdl:input>

     <wsdl:output>

       <soap:body use="literal" />

     </wsdl:output>

   </wsdl:operation>

 </wsdl:binding>



 <wsdl:service name="Server">

   <wsdl:port name="ServerSoap" binding="tns:ServerSoap">

     <soap:address location="http://localhost:8080/fig/FIG"; />

   </wsdl:port>

 </wsdl:service>

</wsdl:definitions>

Reply via email to