Sunday, May 30, 2010

Tutorial: Using PHP, SOAP and WSDL Technology

Tutorial: Using PHP, SOAP and WSDL Technology to access a public ...Tutorial: Using PHP, SOAP and WSDL Technology to access a public web service. ** Created by Snehal Monteiro for CIS 764 ** In this small tutorial we will access the Kansas Department of Revenue's web service to get sales tax information for a particular area in Kansas. We just send the Zip Code of a particular area in Kansas to the web service and it returns the sales tax for that region. Pre-requisites: 1)The server should support PHP. Since the server for the CIS Department supports PHP scripts, this would not be a problem for us. 2)All our html and php documents will be saved in the public_html folder in the U drive. 3)A text editor like notepad where we write html and php code. Tutorial Steps: There are 4 major steps involved: 1) Creating a simple HTML page , which has just one text box to enter the Zip

Code. 2) Download the nusoap.php document and save it the public_html folder. 3)Create the getTax.php which will access the web service using WSDL(Web Service Desription Language) file published by the Kansas Department of Revenue. 4)Run the web application. 1)Creating a simple HTML page , which has just one text box to enter the Zip Code: Copy paste or type the following code in a note-pad and save the file as getTax.html in the public_html folder. Get Tax Details Enter Zip Code of a region in Kansas and hit submit to get sales tax details for that particular region:

Enter Zip Code:

After opening the getTax.html page in the browser you can see the following web page: 2)Download the nusoap.php document and save it the public_html folder: Here we access nusoap.php which is open-source and available freely. We reference the nusoap.php document in our getTaxDetails.php. 1] Click on this link: http://dietrich.ganx4.com/nusoap/index.php 2] Navigate through the web-site. Click on the nusoap-0.7.3.zip file and download it. 3] Unzip the nusoap-0.7.3.zip file. 4]Then open the folder nusoap-0.7.3. Then open the lib...

Website: people.cis.ksu.edu | Filesize: 210kb
No of Page(s): 7
Download Tutorial: Using PHP, SOAP and WSDL Technology to access a public ....pdf

No comments:

Post a Comment