Home arrow PHP arrow SOAP Servers and Web Services

SOAP Servers and Web Services

In this conclusion to a five-part article series on Web Services, you'll learn how to create a SOAP server, add server functions, and more. This article is excerpted from chapter 20 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 1590597702).

  1. SOAP Servers and Web Services
  2. Creating a SOAP Server
  3. Adding a Server Function
  4. Adding Class Methods
  5. SOAP Client and Server Interaction
By: Apress Publishing
Rating: starstarstarstarstar / 3
August 10, 2010

print this article



Retrieving the Exposed Methods

The __getFunctions() method returns an array consisting of all methods exposed by the service referenced by the SoapClient object. The prototype looks like this:

array SoapClient->__getFunctions()

The following example establishes a connection to the boxing quotation SOAP server and retrieves a list of available methods:

$ws = http://www.wjgilmore.com/boxing.wsdl;
   $client = new SoapClient($ws);

This example returns the following (formatted for readability):

array(1) {
[0]=> string(30) "string getQuote(string $boxer)"

One method is exposed,getQuote(), and it requires that you pass in the name of a boxer, returning a string (presumably a quotation).

In the following sections you’ll learn how the boxing quotation SOAP server was created and see it in action.

>>> More PHP Articles          >>> More By Apress Publishing

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: