Service Component Architecture Samples
Setting up the samples
Set up the SCA environment following the instructions in Installation.
This will install the samples in a subdirectory of SCA, for example /usr/local/lib/php/SCA/Samples.
Copy the samples into the root of your Web server. For example, on a windows machine with the Apache web server installed under "Program Files" and the default directory root, the samples should be copied to C:\Program Files\Apache Group\Apache2\htdocs\Samples.
Note: At present the samples that demonstrate remote interaction write a WSDL file to their own directory. This WSDL file is generated automatically from the service annotations that appear in the sample php files. SCA uses the WSDL file to advertise available interfaces and also to construct approrpriate parameters passing in and out of service interfaces. It is cached on disc so that it doesn't have to be generated on each call. The upshot of this is that the webserver must have access to write to each sample directory. If the samples don't appear to work in the first instance check the web server error log and see if it is reporting a failure to write a WSDL file.
Five samples are provided, which illustrate different aspects of the Service Component Architecture. For example, how to call SCA components from a PHP script or another SCA Component, how to expose SCA components as Web services, how to consume them as a Web service, and so on.
All the samples are based around a simple "Hello" service. The hello service takes a string name and responds with the text "Hello name".
To run the samples, simply browse to the Samples directory of your running web server, for example http://localhost/Samples/
.