phpeveryday.com

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


Web Services - WSDL Array: Sample Soap Server

Tag: web service, wsdl, service, soap, server   Category: PHP Application
post: 14 Apr 2008 read: 1,096


Web Services WSDL Array Type Step By Step Tutorial - Part 4: Now, we will test our WSDL use SOAP. Below is code of server side:

Create a file name "books_server.php" within www/test/wsdl. Enter following code:


<?php
if(!extension_loaded("soap")){
  dl("php_soap.dll");
}

ini_set("soap.wsdl_cache_enabled","0");
$server = new SoapServer("books.wsdl");

function doMyBookSearch($bookTitle){

  $arr[] = array(
           "bookTitle" => "MyBook",
		   "bookYear"  => 2005,
		   "bookAuthor"=> "oke"
         );
  $arr[] = array(
           "bookTitle" => "YourBook",
		   "bookYear"  => 2005,
		   "bookAuthor"=> "oke"
         );		 

  return $arr;
}

$server->AddFunction("doMyBookSearch");
$server->handle();
?>


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)
Joomla: Fast Road to Understand Component Programming
Chart: How to Build Cool Animation Real Time Chart
Email: Send Attachement Mail
SMS : Sending SMS with PHP and ActiveXperts (Part 1)

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


624
posting