Miscellaneous
  Home arrow Miscellaneous arrow Page 3 - Using SOAP with PHP
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Using SOAP with PHP
By: Matt Wade
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 40
    2004-06-22

    Table of Contents:
  • Using SOAP with PHP
  • Definitions
  • Define Our Goal
  • Create a SOAP server
  • The WSDL Document
  • Creating a SOAP Client
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using SOAP with PHP - Define Our Goal


    (Page 3 of 7 )

    Today we are going to build a Web Service that will return a stock price given a particular stock symbol. This is a classic example of where Web Services are of great use.

    You may be building an application that needs the data and could very easily just pull the data directly from your data source. Building a Web Service for it, however, allows you to give other applications easy access the same data in the future. It also separates the data extraction from the data source from the application itself. Say you were storing the data in a MySQL database but later decided to move it to a SQLite database... in this scenario your application wouldn't know the difference. Its calls to the Web Service remain unchanged.

    To provide a stock quote service you will have to have the stock prices and symbols stored in some fashion or another. This tutorial is not going to concentrate on the storage mechanism or how to obtain the prices. I will simply provide you will a table schema and some sample data to work with.

    CREATE TABLE `stockprices` (
    `stock_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
    `stock_symbol` CHAR( 3 ) NOT NULL ,
    `stock_price` DECIMAL(8,2) NOT NULL ,
    PRIMARY KEY ( `stock_id` )
    );
    INSERT INTO `stockprices` VALUES (1, 'ABC', '75.00');
    INSERT INTO `stockprices` VALUES (2, 'DEF', '45.00');
    INSERT INTO `stockprices` VALUES (3, 'GHI', '12.00');
    INSERT INTO `stockprices` VALUES (4, 'JKL', '34.00');

    More Miscellaneous Articles
    More By Matt Wade


       · Apparently, I live in a cave, but I did not know exactly what SOAP did prior to...
       · SOAP (and XML-RPC) are for doing remote procedure calls. Effectively, you call a...
       · Exactly. Pass off the values and get back values, but the function doing the actual...
       · Hello,this tutorial is very interesting and gives a good quickstart about SOAP...
       · Great tutorial Matt, the one thing I would recommend it a link to where a person...
       · Or I could follow along better :) Thanks for this.Laura
       · Not getting a value back from the server?Did you remember to change the...
       · I too am not getting a response for $stockprice.this is the $c->response...
       · I'm just intrested to know... can you view your WSDL from the server page?I had...
       · Hello,Im getting this error msg,Im using PHP5.Can anyone help me...
       · Hello,Im getting this error msg,Im using PHP5.Can anyone help me...
       · how to send parameter with more than one parameter...
       · yes that article unfortunatly don't give real example of real life of XML and SOAP...
       · hiya I am trying to get this soap example working to provide a est bed for a soap...
       · I think the problem may be with php5 soap class you will need to redefine the class...
       · i looked @ it and found if u change it to $c = new nusoap_client it will...
       · Is there anyone that have tried to make a java client that can communicate with a...
     

    MISCELLANEOUS ARTICLES

    - Using PHP to Stream MP3 Files and Prevent Il...
    - 10 Must Have Firefox Improvements
    - All About OpenOffice 3.0
    - Shell Script Writing
    - Loops in the UNIX Shell
    - The Test in the UNIX Shell
    - Data Streams and the UNIX Shell
    - Control Mechanisms of the UNIX Shell
    - Variables Within the UNIX Shell
    - The Shell and UNIX
    - In Detail: UNIX File Systems
    - Rights Management in UNIX
    - UNIX File Systems
    - The Terminal in UNIX
    - Operating Systems and UNIX





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT