Articles Forum Examples Download Open Source
Copyright(c) 2006 by Pocomatic Software. All rights reserved.
This is a simple example of PocoCapsule/OpenCSA. The OASIS-OpenCSA (Open Composite Services Architecture, formerly known as OpenSOA Service Component Architecture) is a component model for building applications and systems using a Service-Oriented Architecture (SOA). In PocoCapsule/C++, the OpenCSA framework is implemented as a domain specific framework (DSF) on top of the core PocoCapsule/C++ IoC+DSM framework. Therefore, the assembly schema/model used in this example is the OASIS OpenCSA assembly model (version 0.96).
This example is mainly to illustrate the use of <wire> elements in OpenCSA assembly to wire component together.
server.C: This is a simple container, used to setup and assemble the OASIS-OpenCSA composite. It is notable that this container itself neither contains code, nor links with application specific bean implementations.
Calculator.wsdl: The definition of the web service provided by the hello server.
MyCalculatorImpl.h: This file provides inline implementation of the POCO class MyHelloServiceImpl.
server.config: The Pococapsule Web Service application descriptor that describes this example's Web Service setup.
calculator-by-wire.composite and calculator-by-ref.composite: Two different flavors of OASIS-OpenCSA assembly descriptors that describes the wiring (connections) of components/ports in the OASIS-OpenCSA composite. The first one uses the <wire> elements to wire components, and the second one uses the <reference> elements.
setup.xml: The main setup descriptors that first loads the needed library (the one contains component implementation classes) and then instantiates the web service engine and wires (connects) the OASIS-OpenCSA composite by importing the server.config and calculator-by-wire.composite (can be replaced with calculator-by-ref.composite).
client.C: The client application.
To build this example, the environment variable POCOCAPSULE_DIR should point to the PocoCapsule/C++ installed directory. Also, this example assumes the Systinet server for C++ is installed and its runtime and development environment (such as WASPC_HOME environment variable pointing to its installation directory) are set properly according to its specification.
Once the environment is set and required Systinet server for C++ is installed and configured accordingly, this example can be built by simply invoking gmake/make on linux/unix or nmake on windows.
· Before starting the server, make sure the LD_LIBRARY_PATH (on linux and solaris) or the PATH (on windows) environment variable is set correctly to include the ${POCOCAPSULE_DIR}/lib directory and the ${WASPC_HOME}/lib directory.
· start the hello service server as:
prompt> server ...
The, start the client:
prompt> client [server-URL] ...
Here, the server URL is (optional, if client is on localhost): http://<server-address>:6070/CalculatorPort.