PHP

You are here home > know-how > php > SOAP > Autogenerate PHP Code from WSDL

6.1 Autogenerate PHP Code from WSDL

Date: 09.09.2006

6 SOAP [  up  ] - [ top ] - [ A - Z ] 6.2 Get Weather information with SOAP and WSDL

File: soap-autogen.php

Download → files/soap autogen php.txt

<?php

	require_once 'SOAP/Client.php';

	$wsdl = new SOAP_WSDL(
		'http://www.webservicex.net/globalweather.asmx?WSDL');

	$proxy = $wsdl->generateProxyCode('', 'StationInfo');

	echo '<pre>';
	echo htmlspecialchars($proxy);
	echo '</pre>';

?>

files/soap weather class php.txt

Requirements


Download SOAP Package from pear.php.net.

There are dependencies of that package:
pear.php.net/package/Net_URL↑, pear.php.net/package/HTTP_Request↑, pear.php.net/package/Net_Socket

You might have to uninstall following packages first since Net_Socket has to have at least version 1.0.6
# pear uninstall Net_Socket Net_POP3 Net_SMTP
then
# pear install Net_Socket
# pear install HTTP_Request
# pear install SOAP-0.9.4



See also:

Google
infoCopter   Web  

copyright by reto - created with mytexi