PHPEveryday.com PHP and Web Development Tutorial
What are you looking for?


Web Services - WSDL Array: Array Type


Web Services WSDL Array Type Step By Step Tutorial - Part 1: We ever talk anatomy of wsdl document at here. At the post, we have simple practice use string type. Now, we will talk how about transmit array type.

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:

  • The name should be ArrayOfXXXX, where XXXX is the type of items contained in the array.
  • Specify the type of items contained and its dimensions using a default value for the soapenc:arrayType attribut.
  • Name space associated with the wsdl prefix in table below:
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: 6,306 Bookmark and Share

blog comments powered by Disqus


Database Tutorial
  • Learn PHP MySQL
  • Learn PHP ADOdb
  • Learn PHP Data Object/PDO
  • Learn PHP XML
  • Learn PHP SimpleXML
Security Tutorial
  • Learn PHP Security
  • Learn HTTP Authentication
  • Learn PHPSecureSite
Framework Tutorial
  • Learn CodeIgniter
  • Learn Joomla
  • Learn Smarty
  • Learn Zend Framework
Template Tutorial
  • Learn Joomla Template
  • Learn WordPress Template
API Tutorial
  • Learn Facebook
JS Framework Tutorial
  • Learn MooTools
  • Learn JQuery
AJAX Tutorial
  • Learn AJAX in 10 Minutes
  • Learn AJAX Client Side
  • Learn AJAX PHP
  • Learn AJAX Remote Server
  • Learn AJAX Repetitive
  • Learn AJAX MySQL
  • Learn AJAX Grid
Web Services Tutorial
  • Learn Web Services NuSOAP
  • Learn Web Services WSDL
  • Learn Web Services WSDL Array
  • Learn Web Services .NET Grid
  • Learn Web Services WDDX
Package Post
  • Joomla Intro
  • Joomla Component
  • Joomla Module
  • Joomla MVC
  • Joomla MVC Backend
  • PostNuke Intro
  • Zend Framework Intro
  • Zend Framework Action
  • Zend Framework Database
  • Zend Framework Registry
  • Zend Framework Config
  • Zend Framework Login
  • Zend Framework Session
  • PHP Array Tips
  • PHP File Tips
  • PHP Email
  • PHP Ms Excel
  • PHP Pattern
  • PHP SMS
  • Flash Database
  • PHP Multitier
  • jQuery Introduction
  • jQuery Selectors
  • Portable Web Server
  • Web Mobile Intro
  • Drupal Installation
  • Drupal Configuration