Articles     Forum     Examples     Download     Open Source


PocoCapsule/C++ example: OASIS-OpenCSA Hello

Copyright(c) 2006 by Pocomatic Software. All rights reserved.

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).

This is a basic hello example. It consists of one composite which exports one web service (defined by Hello.wsdl), and contains one HelloServiceComponent components. The HelloServiceComponent component is merely a plain old C++ object (POCO) of MyHelloServiceImpl class, implemented in MyHelloServiceImpl.h (inline).

The assembly schema/model used in this example is OASIS-OpenCSA assembly model 0.96. PocoCapsule also comes with an equivalent non-OpenCSA version of hello example, in ${POCOCAPSULE_DIR}/examples/web-services/hello-ws directory, that uses POCO-WebServices assembly schema/model.

Source Files

server.C: This is a simple container, used to setup and assemble the OpenCSA composite. It is notable that this container itself neither contains code, nor links with application specific bean implementations.

Hello.wsdl: The definition of the web service provided by the hello server.

MyHelloServiceImpl.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.

server.composite: The OASIS-OpenCSA assembly descriptor that describes the wiring (connections) of components/ports in the OASIS-OpenCSA composite.

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 server.composite.

client.C: The client application.

Building this example

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.

Running this example

· 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/HelloWorld.

Back to the root page