i conducted my first experiment with php. php is widely used in the world of the web and in all likelihood there will dawn a day when dt is asked just for such an integration. as php4 development and support is soon going to be discontinued, i didn't bother with an example using php4 soap tools. php5 is on the market and it comes with a quick and stable soap library. the performance is many times better than in case of similar widgets written for php4.
i have apache and php5 running on windows and for soap support i have to use an extension named php_soap.dll. thus, i have to remove the comment mark in front of the appropriate php.ini line and restart apache.
as an example i will present a php code calling the service's add() method and writing the result on the screen. an example of wcf code can be found in our blog, in the posting wcf services ? let's get started.
x = 2.5;$obj->y = 3.5;$retval = $client->add($obj);echo 2.5 + 3.5 = . $retval->addresult;?>
if nothing went wrong, the result should be something like this:
wcf test 2.5 + 3.5 = 6
as you can see, using wcf services in php is very simple. the soap library provided along with php5 does a great deal of the work behind the curtains, leaving us with an easily readable brief code.
