Actually, arrays have no native built-in type under XML Schemas. At WSDL, when you work with array, you can use the soapenc:Array type. But not directly. First, you create a custom complex type by extending the soapenc:Array type. Example, you want to say:
array("Ali", "Baba");
You can use such as:
<xsd:complexType name="ArrayOfstring">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]">
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
We should follow rule in WSDL 1.1:
| Prefix | Namespace URI | Description |
|---|---|---|
| wsdl | http://schemas.xmlsoap.org/wsdl/ | WSDL namespace for the WSDL framework |
| soap | http://schemas.xmlsoap.org/wsdl/soap/ | WSDL namespace for the WSDL SOAP Binding |
| http | http://schemas.xmlsoap.org/http/ | WSDL namespace for the WSDL HTTP GET and POST Binding |
| mime | http://schemas.xmlsoap.org/wsdl/mime/ | WSDL namespace for the WSDL MIME Binding |
| soapenc | http://schemas.xmlsoap.org/wsdl/encoding/ | Encoding namespace as defined by SOAP 1.1 |
| soapenv | http://schemas.xmlsoap.org/wsdl/envelope/ | Enveloping namespace as defined by SOAP 1.1 |
| xsd | http://www.w3.org/2001/XMLSchema | Schema namespace as defined by XSD |
| tnsc | various | The "this namespace" (tns) prefix is used as a convention to refer to the current document |
| Series this article: Web Services - WSDL Array: Array Type Web Services - WSDL Array: Object Type Web Services - WSDL Array: Sample WSDL Document Web Services - WSDL Array: Sample Soap Server Web Services - WSDL Array: Testing with SOAP Client Tag: web services, wsdl, array, type Category: PHP Application Post : April 14th 2008 Read: 5,454 blog comments powered by Disqus |