Phpsca Learning 1

Source: Internet
Author: User
Tags sca sdo
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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.