Pro PHP- Patterns, Frameworks, Testing and More

(vip2019) #1

(^300) CHAPTER 20 ■ ADVANCED WEB SERVICES
Listing 20-1 demonstrates creating two complex types: CallDetailRecord, to represent one
record of your calling information, and CallDetailRecordArray, to represent an array of records.
A complex type in WSDL is most closely analogous to a PHP class containing only properties.
Listing 20-1. Creating Complex Types (PhoneCompany.wsdl)
<?xml version="1.0" encoding="UTF-8" ?>
<definitions
name="PhoneCompany"
targetNamespace="http://localhost/PhoneCompany"
xmlns:tns="http://localhost/PhoneCompany"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"




targetNamespace="http://localhost/PhoneCompany"
xmlns:tns="http://localhost/PhoneCompany"











ref="soapenc:arrayType"
wsdl:arrayType="tns:CallDetailRecord[]"
/>






McArthur_819-9.book Page 300 Friday, February 29, 2008 8:03 AM
Free download pdf