One morning of phpsca's learning, the php sca team even came to helloworld. on the VISITA in the unit, they were puzzled, so they went home at night.
On WIN2003, the same APACHE version was used, and PHP was successfully completed with 5.2.1. the following process is recorded. after all, this information is rare in China.
1. install pear first
In your PHP Directory, enter go-pear and press enter to complete the installation.
2 install SCA-SDO with PECL, because it is very convenient
Input pecl install-B SCA_SDO, which will be automatically downloaded later
The relevant library files of the SCA-SDO will be placed under your pear Directory
3. download a php_sdo.sll file and
Add extension = php_sdo.dll to php. ini.
4. place any example under pear \ sca \ examples \ in the directory where you run PHP and you can run it,
5. let's come to helloworld.
Include 'sca/SCA. php ';
/**
* @ Service
* @ Binding. soap
*/
Class Greeting
{
/**
* @ Param string $ name
* @ Return string
*/
Public function greet ($ name)
{
Return 'hello'. $ name;
}
}
?>
Here the tag is used. then IE browses http: // localhost: 8082/myphp/Greeting. php? Wsdl
You can see the WSDL.
Usage:
Include 'sca/SCA. php ';
$ Greeting_service = SCA: getService ('http: // localhost: 8082/myphp5/helloworldscawsservice/Greeting. php? Wsdl ');
$ Name = "jackyrong ";
$ Greeting = $ greeting_service-> greet ($ name );
Echo "Name:". $ name ."
";
Then you can use it. The first HELLOWOLRD came out.
Note: I am running correctly on visita and running correctly on win2003.
References:
Http://www.osoa.org/display/PHP/SCA+with+PHP
Http://www.ibm.com/developerworks/webservices/library/ws-soa-scasdo/