server-webapi-code-12-soapSample.php / php
<?php server->configureWSDL('basicwsdl', 'urn:ratingwsdl'); // Service Method array('name' => 'xsd:string'), // Expected parameters array('return' => 'tns:MovieReview'), 'urn:ratingwsdl', // Namespace 'urn:ratingwsdl#movieRate', // Soap Action 'rpc', // Style 'encoded', // Use 'Returns a rating for the movie specified' // Description of the service ); server->wsdl->addComplexType( 'MovieReview', // Type Name 'complexType', // What we are adding 'struct', // Given 'all', // Given '', // array( 'rating' => array('name' => 'rating', 'type' => 'xsd:string'), 'reviewer' => array('name' => 'reviewer', 'type' => 'xsd:string'), 'stars' => array('name' => 'stars', 'type' => 'xsd:int') ) ); HTTP_RAW_POST_DATA) ? server->service(name) { review; } ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.