Book Image

SOA and WS-BPEL

By : Yuli Vasiliev
Book Image

SOA and WS-BPEL

By: Yuli Vasiliev

Overview of this book

<p>When utilized within a Service-oriented Architecture (SOA), Web Services are part of a business process determining the logical order of service activities &acirc;&euro;&ldquo; logical units of work performed by one or more services. Today, the most popular tool for organizing service activities into business processes is Web Services Business Process Execution Language (WS-BPEL), a language defining an execution format for business processes operating on Web Services. While it is not a trivial task to define a business process definition with WS-BPEL from scratch, using a graphical WS-BPEL tool can significantly simplify this process.<br /><br />Examples and practice are much more valuable than theory when it comes to building applications using specific development tools. Unlike many other books on SOA in the market, this book is not focused on architecture. Instead, through numerous examples, it discusses practical aspects of SOA and WS-BPEL development, showing you how to apply architecture in practice with the help of PHP, ActiveBPEL open-source engine, and ActiveBPEL Designer &acirc;&euro;&ldquo; powerful development tools available for free.</p>
Table of Contents (13 chapters)
SOA and WS-BPEL
Credits
About the Author
About the Reviewer
Preface
Free Chapter
1
Web Services, SOA, and WS‑BPEL Technologies

Installing PHP


The current recommended releases of PHP are available for download from the downloads page of the php.net site at:

http://www.php.net/downloads.php

From this page, you can download the latest stable release of PHP 5 and then follow the steps shown below to install PHP in your system. For further assistance along the way, you may consult the Installation and Configuration manual available on the php.net website at: http://www.php.net/manual/install.php. Alternatively, you might read the install.txt file that is shipped with PHP.

Installing PHP on Windows

Here are the basic installation steps for PHP 5 on Windows:

  • Extract the distribution file into the c:\php directory.

  • Add the C:\php directory to the PATH to make php5ts.dll available to the Web server modules.

  • Rename php.ini-recommended to php.ini.

  • In php.ini, set the doc_root to your Apache htdocs directory. For example:

doc_root = c:\Program Files\Apache Group\Apache2\htdocs
  • In php.ini, uncomment the SOAP extension line in the Windows Extensions section:

extension=php_soap.dll
  • In php.ini, uncomment the OCI8 extension line:

extension=php_oci8.dll

Note

It is assumed here that you will be using an Oracle database when following the book examples. If you're going to use MySQL, you need to uncomment the extension=php_mysql.dll and extension=php_mysqli.dll lines in php.ini instead.

  • In php.ini, set the extension_dir directive to the directory in which the extention DLLs reside:

extension_dir= c:\php\ext
  • In the Apache httpd.conf configuration file, to install PHP as an Apache module, insert two lines that lookslike this:

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
  • In the Apache httpd.conf configuration file, configure the path to php.ini:

PHPIniDir "C:/php"
  • Restart Apache.

As an alternative to the above manual installation, you might use the Windows PHP installer that is also available from the downloads page of the php.net website.

Note

Although the Windows PHP installer is the fastest way to make PHP work, it doesn't allow you to set every option as you might want to. So, using the installer isn't the recommended method for installing PHP.

Once you have PHP installed on your Windows system, you might want to set some extensions for added functionality. It is important to note that many extensions are built into the Windows version of PHP. To use these extensions, you just uncomment them in the php.ini configuration file—no additional DLLs are required. However, some of the extensions require extra DLLs to work. For example, the PHP OCI8 extension needs the Oracle Client libraries if you have your Oracle database and Web server running on different machines. The above steps assume that you have both the database and Web server installed on the same computer. In this case, you already have all the required Oracle components, and no Instant Client is required.

Installing PHP on Unix-Like Systems

Here are basic installation steps for PHP 5 on Unix-like systems:

  • Extract the distribution file:

# gunzip php-5xx.tar.gz
# tar -xvf php-5xx.tar
  • Change dir to the directory containing the PHP sources:

# cd php-5xx
  • Set the ORACLE_HOME environment variable:

# export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
  • Configure your PHP installation:

# ./configure \
--with-oci8=$ORACLE_HOME \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/usr/local/apache2/conf \
--enable-sigchild
--enable-soap

Note

It is assumed here that you will be using an Oracle database XE when following the book examples. However, if you're going to use MySQL, you must use --with-mysql and --with-mysqli=mysql_config_path/mysql_config configuration options, where mysql_config_path is the path to the mysql_config program that comes with MySQL.

  • Compile and then install PHP:

# make
# make install
  • Set up php.ini:

# cp php.ini-dist /usr/local/lib/php.ini

  • Edit the httpd.conf Apache configuration file to load the PHP module into Apache:

LoadModule php5_module modules/libphp5.so
  • In httpd.conf, add handlers for files with the .php and .phps extensions:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
  • Restart Apache:

# usr/local/apache2/bin/apachectl start

By now you should have a working Apache/PHP Web server.