Web Services WSDL Array Type Step By Step Tutorial - Part 3: This is sample complete WSDL. In this services, we want to transmit array type. If you still confuse read this document, please read this before.
Create a file name "books.wsdl" within www/test/wsdl. Enter following code:
<?xml version="1.0"?>
<definitions name="MyBookSearch" targetNamespace="urn:MyBookSearch" xmlns:tns="urn:MyBookSearch" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:MyBookSearch">
<xsd:complexType name="MyBookSearchResponse">
<xsd:all>
<xsd:element name="bookTitle" type="xsd:string" />
<xsd:element name="bookYear" type="xsd:int" />
<xsd:element name="bookAuthor" type="xsd:string" />
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<message name="doMyBookSearch">
<part name="bookTitle" type="xsd:string" />
</message>
<message name="doMyBookSearchResponse">
<part name="return" type="tns:MyBookSearchResponse[]" />
</message>
<portType name="MyBookSearchPort">
<operation name="doMyBookSearch">
<input message="tns:doMyBookSearch" />
<output message="tns:doMyBookSearchResponse" />
</operation>
</portType>
<binding name="MyBookSearchBinding" type="tns:MyBookSearchPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="doMyBookSearch">
<soap:operation soapAction="urn:MyBookSearchAction" />
<input>
<soap:body use="encoded" namespace="urn:MyBookSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:MyBookSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="MyBookSearchService">
<port name="MyBookSearchPort" binding="tns:MyBookSearchBinding">
<soap:address location="http://localhost/test/wsdl/books.php" />
</port>
</service>
</definitions>