[PHP] Kako nazvati webservice bez WSDL
Posted in PHP na 2009/04/26 22:11 by ycTINTako jednostavna, pogledajte u nastavku.
server.php
<?php class TestWebService { function hello ( $you_name = 'ycTIN' ) { return "hi, i am $you_name " ; } } $server = new SoapServer ( null , array ( 'uri' => '' ) ) ; $server -> setClass ( 'TestWebService' ) ; $server -> handle ( ) ; ?> |
client.php
<?php $options = array ( 'location' => 'http://www.yctin.com/webservice/TestWebService/server.php' , 'uri' => '' ) ; $client = new SoapClient ( null , $options ) ; echo $client -> hello ( 'ycTIN' ) ; ?> |
Related posts:
- Popular HTTP response status code in the web development The popular HTTP response code with simple description: 2xx Success...
- [PHP] Detect and handle execution timeout error Sometime php will throw unhandled exception, e.g. over maximum execution...
Tags: PHP , SOAP , WebService , WSDL

