GetTemp.php - First Example with SOAP

This section describes a tutorial example, GetTemp.php, on how to use PHP SOAP client interface.

To show you an example of how PHP SOAP Extension can be used in a SOAP client application, here is my first SOAP PHP program, GetTemp.php

<?php # GetTemp.php
# Copyright (c) 2005 by Dr. Herong Yang
#
   $client = new SoapClient
      ("http://www.xmethods.net/sd/2001/DemoTemperatureService.wsdl");
   echo("\nReturning value of getTemp() call: ".
      $client->getTemp("12345"));
?>

Run it while your connected to the Internet. You will get:

>php GetTemp.php

Returning value of getTemp() call: 52

Very nice. This confirms that:

Last update: 2007.

Table of Contents

 About This Book

 Introduction to Web Service

 Introduction to SOAP (Simple Object Access Protocol)

 SOAP Message Structure

 SOAP Message Transmission and Processing

 SOAP Data Model

 SOAP Encoding

 SOAP RPC Presentation

 SOAP Properties Model

 SOAP Message Exchange Patterns

 SOAP HTTP Binding

 SOAP Perl Implementations

 SOAP PHP Implementations

 SOAP Java Implementations

 Perl SOAP::Lite - SOAP Server-Client Communication Module

 Perl Socket Test Program for HTTP and SOAP

 Perl SOAP::Lite for GetSpeech SOAP 1.1 Web Service

 Perl SOAP::Lite 0.710 for SOAP 1.2 Web Services

 Perl SOAP::Lite 0.710 for WSDL

PHP SOAP Extension Client Programs

 What Is PHP SOAP Extension?

GetTemp.php - First Example with SOAP

 PHP SOAP Extension Functions for Client Programs

 GetTempDump.php - Dumping Debugging Information

 Whis Is WSDL (Web Services Definition Language)?

 Using SOAP Extension in non-WDSL Mode

 PHP SOAP Extension Server Programs

 Java Socket and HttpURLConnection for SOAP

 SAAJ - SOAP with Attachments API for Java

 SoapUI - SOAP Web Service Testing Tool

 WS-Security - SOAP Message Security Extension

 WS-Security X.509 Certificate Token

 Web Services and SOAP Terminology

 References

 PDF Printing Version