phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


Web Services - WSDL Array: Sample WSDL Document

Tag:    Category: PHP Application
post: 14 Apr 2008 read: 811


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>


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

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting