summaryrefslogtreecommitdiffstats
path: root/tags/cpp-1.0-incubating-M2-RC1/sca/doc
diff options
context:
space:
mode:
Diffstat (limited to 'tags/cpp-1.0-incubating-M2-RC1/sca/doc')
-rw-r--r--tags/cpp-1.0-incubating-M2-RC1/sca/doc/Axis2CWSService.html364
-rw-r--r--tags/cpp-1.0-incubating-M2-RC1/sca/doc/CPPComponents.html321
-rw-r--r--tags/cpp-1.0-incubating-M2-RC1/sca/doc/PythonExtension.html288
-rw-r--r--tags/cpp-1.0-incubating-M2-RC1/sca/doc/RubyExtension.html279
-rw-r--r--tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-base.css147
-rw-r--r--tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-theme.css145
6 files changed, 0 insertions, 1544 deletions
diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/Axis2CWSService.html b/tags/cpp-1.0-incubating-M2-RC1/sca/doc/Axis2CWSService.html
deleted file mode 100644
index 7b32633b6a..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/Axis2CWSService.html
+++ /dev/null
@@ -1,364 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
- Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<HTML>
-<HEAD>
- <META CONTENT="text/html; charset=iso-8859-1" HTTP-EQUIV="Content-Type">
- <META CONTENT="text/css" HTTP-EQUIV="Content-Style-Type">
- <STYLE MEDIA="all" TYPE="text/css">
-@import url("css/maven-base.css");
-@import url("css/maven-theme.css");
- </STYLE>
-
- <LINK HREF="css/maven-theme.css" MEDIA="print" REL="stylesheet"
- TYPE="text/css">
- <TITLE>Tuscany SCA for C++ - Creating C++ SCA Components</TITLE>
-</HEAD>
-
-<BODY>
-<DIV ID="bodyColumn">
- <DIV ID="contentBox">
- <DIV CLASS="section">
- <H2>Tuscany SCA for C++ - Creating C++ SCA Components</H2>
-
- <P>This document describes the deployment and use of the Axis2C Web Service
- (binding.ws) service support in the Apache Tuscany SCA C++ runtime.
- </P>
- <P>The WS service code is based on <A HREF="http://ws.apache.org/axis2/c">Apache
- Axis2C version 0.94</A> and allows SCA components to be invoked via Web
- Service calls.
- </P>
- <P>WS service currently supports Document/literal Wrapped style Web Services
- only. There are also restrictions about the parameter and return types of the
- operations in SCA components that can be exposed as Web Services, see below
- for more details.
- </P>
- <P>See the <A HREF="http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications">SCA
- Web Service binding specification</A> for more details about SCA Web
- Service support.
- </P>
- <P>Also, see the <A HREF="../samples/GettingStarted.html">samples</A> for various
- demonstrations of the use of the binding.ws service support.
- </P>
- </DIV>
-
- <DIV CLASS="section">
- <H2>Contents</H2>
- <OL>
- <LI><A HREF="#deploy">Deploying the Tuscany Web Service support to Axis2C..</A>
- <UL>
- <LI><A HREF="#autodeploy">..automatically via scripts</A></LI>
- <LI><A HREF="#mandeploy">..manually</A></LI>
- </UL></LI>
- <LI><A HREF="#use">Defining an SCA Composite with a WS service</A></LI>
- <LI><A HREF="#maptable">XML Schema Type to C++ Type Mapping</A></LI>
- <LI><A HREF="#creatingwsdl">Notes on creating WSDL</A></LI>
- </OL>
- </DIV>
-
-
- <DIV CLASS="section">
- <A NAME="deploy"><H2>Deploying the Tuscany Web Service support to Axis2C</H2></A>
- <A NAME="autodeploy"><H3>Deploying via scripts</H3></A>
- <P>Tuscany provides simple shell scripts to deploy the Web Service support to Axis2C.
- However, the script <STRONG>will overwrite your Axis2C axis.xml file</STRONG>, so if you
- have altered your axis2.xml from the default provided by the Axis2C distribution, it is
- recommended that you follow the <A HREF="#mandeploy">manual deployment</A> steps
- outlined below.
- </P>
- <P>To automatically deploy Tuscany Web Service support to Axis2C on Linux:
- <OL>
- <LI>The AXIS2C_HOME environment variable is required:
- <UL>
- <LI>set AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
- </UL></LI>
- <LI>Use the following command sequence to run the deploy script:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;/extensions/ws/service</LI>
- <LI>./deploy.sh</LI>
- </UL>
- </LI>
- </OL>
- </P>
- <P>To automatically deploy Tuscany Web Service support to Axis2C on Windows:
- <OL>
- <LI>The AXIS2C_HOME environment variable is required:
- <UL>
- <LI>export AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
- </UL></LI>
- <LI>Use the following command sequence to run the deploy script:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;/extensions/ws/service</LI>
- <LI>./deploy.cmd</LI>
- </UL>
- </LI>
- </OL>
- </P>
-
-
- <A NAME="mandeploy"><H3>Deploying manually</H3></A>
- <P>To deploy Tuscany Web Service support to Axis2C manually, use the following steps:
- </P>
- <OL>
- <LI>Create a &lt;axis2c version 0.94&gt;/services/tuscany directory
- </LI>
- <LI>Copy all the files in &lt;tuscany_sca_install_dir&gt;/extensions/ws/service/services/tuscany/
- to the directory created above
- </LI>
- <LI>Create a &lt;axis2c version 0.94&gt;/modules/tuscany directory
- </LI>
- <LI>Copy all the files in &lt;tuscany_sca_install_dir&gt;/extensions/ws/service/modules/tuscany/
- to the directory created above
- </LI>
- <LI>Edit the &lt;axis2c version 0.94&gt;/axis2.xml file to add a &lt;ref module="tuscany"&gt;
- element. This will register the above module. E.g.:
- <PRE>...
- &lt;!-- ================================================= --&gt;
- &lt;!-- Global Modules --&gt;
- &lt;!-- ================================================= --&gt;
- &lt;!-- Comment this to disable Addressing --&gt;
- &lt;module ref="addressing"/&gt;
-
- &lt;module ref="tuscany"/&gt;
-
-... </PRE>
- </LI>
- </OL>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="use"><H2>Defining an SCA Composite with a WS service</H2></A>
-
- <P>In this section we will use the Calculator sample as a worked example.
- The Calculator code and files can be found at
- &lt;tuscany_sca_install_dir&gt;samples/Calculator.
- </P>
- <P>Pre-requisites:
- <UL>
- <LI>A working component within a composite and solution composite,
- with SCAGEN generated Proxy and Wrapper classes and a .dll or
- .so library compiled from these and the component class files.
- The *.composite and *.componentType files must also be available
- and working
- </LI>
- </UL>
- </P>
- <OL>
- <LI>Create the WSDL that defines the interface of your SCA component. See the
- table <A HREF="#maptable">XML Schema Type to C++ Type Mapping</A> and
- <A HREF="#creatingwsdl">Notes on creating WSDL</A> below
- for mapping the parameters and return types of the component operations to XML
- schema types in the WSDL. This file needs to be accessible from the component,
- so place it in the same directory as the component or in a subdirectory.
- <BR/>
- See the &lt;tuscany_sca_install_dir&gt;/samples/Calculator/sample.calculator/Calculator.wsdl
- file as an example.
- </LI>
- <LI>Add a service definition to the component .composite file, setting the
- interface.wsdl interface attribute to the namespace, port name specified in the
- WSDL, in the form: "&lt;namespace&gt;#wsdl.interface(&lt;port-name&gt;)".
- Link a reference from this service definition to your
- component, give the service a name and set the multiplicity if required.
- <BR/>
- E.g. for the Calculator component, based on the Calculator.wsdl file:
- <PRE>&lt;service name="CalculatorService"&gt;
- &lt;interface.wsdl interface="http://sample/calculator#wsdl.interface(Calculator)"/&gt;
- &lt;binding.ws/&gt;
- &lt;reference&gt;CalculatorComponent/CalculatorService&lt;/reference&gt;
-&lt;/service&gt;</PRE>
- </LI>
- <LI>You are now ready to start the Axis2C HTTP server. Remember you will need to have the
- TUSCANY_SCACPP, TUSCANY_SDOCPP and AXIS2C_HOME environment variables set,
- as well as the SCA and SDO bin directories and the Axis2C lib directory on
- your PATH on Windows or the SCA, SDO and Axis2C lib directories on
- your LD_LIBRARY_PATH on Linux. You will also need to set the TUSCANY_SCACPP_SYSTEM_ROOT
- and TUSCANY_SCACPP_DEFAULT_COMPONENT environment variables to the
- path to your SCA component directory structure and the default component respectively.
- E.g. on Windows run the following commands:
- <UL>
- <LI>set TUSCANY_SCACPP=C:/tuscany_sca </LI>
- <LI>set TUSCANY_SDOCPP=C:/tuscany_sdo </LI>
- <LI>set AXIS2C_HOME=C:/axis2c-bin-0.94-win32 </LI>
- <LI>set PATH=%PATH%;C:/tuscany_sca/bin;C:/tuscany_sdo/bin;C:/axis2c-bin-0.94-win32/lib</LI>
- <LI>set TUSCANY_SCACPP_SYSTEM_ROOT=C:/tuscany_sca/samples/Calculator/deploy </LI>
- <LI>set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent </LI>
- <LI>cd %AXIS2C_HOME%/bin/ </LI>
- <LI>./axis2_http_server.exe </LI>
- </UL>
- </LI>
- <LI>Optionally, enable Tuscany logging by setting the TUSCANY_SCACPP_LOGGING
- environment variable with the level you wish to log at (0 for minimal
- logging, up to 9 for more detailed logging) and the TUSCANY_SCACPP_LOG
- environment variable to define the file to log to (if this is not set,
- logging will go to the console). E.g. on Windows run the following
- commands:
- <UL>
- <LI>set TUSCANY_SCACPP_LOGGING=5 </LI>
- <LI>set TUSCANY_SCACPP_LOG=C:/tuscany/mylogfile.txt</LI>
- </UL>
- </LI>
- </OL>
- <P>Your component should now be exposed as an Axis2C Web Service, via the WS
- service you created. See the Axis2C documentation for writing clients to
- invoke the Web Service, or you can use any other Web Service client platform
- (e.g. <A HREF="http://ws.apache.org/axis2">Axis2 for Java</A>), or you can invoke your
- component from another Tuscany runtime by using Tuscany's WS reference
- support.
- </P>
-
- </DIV>
-
- <DIV CLASS="section">
- <A name="maptable"><H2>XML Schema Type to C++ Type Mapping</H2></A>
- <P>To help define the WSDL that describes the interface of your component, the
- table below lists how incoming XML data in Web Service messages is mapped to
- C++ types used in the parameters and return types of your component operations.
- </P>
- <P>This lists the only C++ types that can currently be used on the operations of a
- component exposed as a Web Service. For other types, use an SDO DataObject to
- wrap the data, and define that wrapping as a complexType in the WSDL. See the
- <A HREF="http://www.osoa.org/display/Main/SDO+-+Previously+Published+Specifications">SDO
- specifications</A> for the C++ types that SDO supports.
- </P>
- <TABLE CLASS="bodyTable">
- <TBODY>
- <TR CLASS="a">
- <TD><STRONG>XML Schema Type</STRONG></TD>
- <TD><STRONG>C++ Type</STRONG></TD>
- </TR>
- <TR CLASS="b">
- <TD>string</TD>
- <TD>std::string</TD>
- </TR>
- <TR CLASS="a">
- <TD>int</TD>
- <TD>long</TD>
- </TR>
- <TR CLASS="b">
- <TD>integer</TD>
- <TD>long</TD>
- </TR>
- <TR CLASS="a">
- <TD>short</TD>
- <TD>short</TD>
- </TR>
- <TR CLASS="b">
- <TD>float</TD>
- <TD>float</TD>
- </TR>
- <TR CLASS="a">
- <TD>double</TD>
- <TD>long double</TD>
- </TR>
- <TR CLASS="b">
- <TD>boolean</TD>
- <TD>bool</TD>
- </TR>
- <TR CLASS="a">
- <TD>hexBinary</TD>
- <TD>char*</TD>
- </TR>
- <TR CLASS="b">
- <TD>base64Binary</TD>
- <TD>char*</TD>
- </TR>
- <TR CLASS="a">
- <TD>byte</TD>
- <TD>char</TD>
- </TR>
- <TR CLASS="b">
- <TD>complexType</TD>
- <TD>commonj::sdo::DataObjectPtr</TD>
- </TR>
- <TR CLASS="a">
- <TD>any</TD>
- <TD>commonj::sdo::DataObjectPtr with OpenDataObjectType</TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
-
- <DIV CLASS="section">
- <A name="creatingwsdl"><H2>Notes on creating WSDL</H2></A>
- <P>Currently only Document/literal Wrapped style Web Services are supported by
- WS EntryPoint, support for RPC style Web Services is planned for future
- releases.
- </P>
- <P>See <A HREF="http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/">this article</A>
- for an explanation of Document/literal Wrapped style WSDL and Web Services
- </P>
- <P>Operation parameter and return messages that are defined in the WSDL must be
- XML Schema elements containing a complexType - there is currently no
- support for simpleTypes or single-level elements. Also, Document/literal
- Wrapped services require that the operation name is used as the name of the
- incoming element that wraps the operation parameters.
- </P>
- <P>For example, a component operation defined in C++ as:
- <PRE>long myOperation(std::string arg1, short arg2, DataObjectPtr arg3);</PRE>
- will need to be described in WSDL with messages like:
- <PRE>&lt;wsdl:message name="myOperationRequestMsg"&gt;
- &lt;wsdl:part element="tns:myOperation" name="myOperationRequestPart"/&gt;
-&lt;/wsdl:message&gt;
-&lt;wsdl:message name="myOperationResponseMsg"&gt;
- &lt;wsdl:part element="tns:myOperationResponse" name="myOperationResponsePart"/&gt;
-&lt;/wsdl:message&gt;</PRE>
- and will need an XML schema to define the types like:
- <PRE>&lt;xsd:element name="myOperation"&gt;
- &lt;xsd:complexType&gt;
- &lt;xsd:sequence&gt;
- &lt;xsd:element name="arg1" type="xsd:string" minOccurs="1"/&gt;
- &lt;xsd:element name="arg2" type="xsd:short" minOccurs="1"/&gt;
- &lt;xsd:element name="arg3" minOccurs="1"&gt;
- &lt;xsd:complexType&gt;
- &lt;xsd:sequence&gt;
- &lt;xsd:element name="dataObjectFloatData" type="xsd:float"/&gt;
- &lt;xsd:element name="dataObjectStringData" type="xsd:string"/&gt;
- &lt;xsd:element name="dataObjectIntData" type="xsd:int"/&gt;
- &lt;/xsd:sequence&gt;
- &lt;/xsd:complexType&gt;
- &lt;/xsd:element&gt;
- &lt;/xsd:sequence&gt;
- &lt;/xsd:complexType&gt;
-&lt;/xsd:element&gt;
-
-&lt;xsd:element name="myOperationResponse"&gt;
- &lt;xsd:complexType&gt;
- &lt;xsd:sequence&gt;
- &lt;xsd:element name="result" type="xsd:int" minOccurs="1"/&gt;
- &lt;/xsd:sequence&gt;
- &lt;/xsd:complexType&gt;
-&lt;/xsd:element&gt;</PRE>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="help"><H2>Getting Help</H2></A>
-
- <P>First place to look is at the Tuscany FAQ at
- <A HREF="http://incubator.apache.org/tuscany/faq.html"
- TARGET="_blank">http://incubator.apache.org/tuscany/faq.html</A> </P>
-
- <P>Any problem with this release can be reported to the Tuscany
- <A HREF="http://incubator.apache.org/tuscany/mail-lists.html"
- TARGET="_blank">mailing lists</A> or create a JIRA issue at&nbsp;<A HREF="http://issues.apache.org/jira/browse/Tuscany"
- TARGET="_blank">http://issues.apache.org/jira/browse/Tuscany</A>.</P>
- </DIV>
- </DIV>
-</DIV>
-</BODY>
-
-</HTML>
-
diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/CPPComponents.html b/tags/cpp-1.0-incubating-M2-RC1/sca/doc/CPPComponents.html
deleted file mode 100644
index a21036a377..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/CPPComponents.html
+++ /dev/null
@@ -1,321 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
- Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<HTML>
-<HEAD>
- <META CONTENT="text/html; charset=iso-8859-1" HTTP-EQUIV="Content-Type">
- <META CONTENT="text/css" HTTP-EQUIV="Content-Style-Type">
- <STYLE MEDIA="all" TYPE="text/css">
-@import url("css/maven-base.css");
-@import url("css/maven-theme.css");
- </STYLE>
-
- <LINK HREF="css/maven-theme.css" MEDIA="print" REL="stylesheet"
- TYPE="text/css">
- <TITLE>Tuscany SCA for C++ - Creating C++ SCA Components</TITLE>
-</HEAD>
-
-<BODY>
-<DIV ID="bodyColumn">
- <DIV ID="contentBox">
- <DIV CLASS="section">
- <H2>Tuscany SCA for C++ - Creating C++ SCA Components</H2>
-
- <P>This document describes how to create and run SCA components in Tuscany SCA C++
- milestone release 2.
- </P>
- <P>See the <A HREF="http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications">SCA
- C++ Client and Implementation specification</A> for more details about the SCA C++
- programming model.
- </P>
- <P>See <A HREF="../samples/Calculator/README.html">Calculator</A> or
- <A HREF="../samples/BigBank/README.html">BigBank</A> for samples that
- demonstrate the use of C++ components
- </P>
- </DIV>
- <DIV CLASS="section">
- <H2>Creating and deploying an SCA C++ Component</H2>
-
- <P>Each SCA C++ component needs:
- </P>
- <UL>
- <LI>A service header file that defines the operations that can be invoked on the
- component
- </LI>
- <LI>An implementation header file that defines the implementation and extends
- the service header file
- </LI>
- <LI>A C++ implementation of the service that implements the operations defined
- in the service header file
- </LI>
- <LI>Proxy and wrapper header and implementation files generated by the Tuscany
- C++ SCAGEN tool
- </LI>
- <LI>A component definition in a composite file
- </LI>
- <LI>A service definition in a .componentType file
- </LI>
- <LI>A composite describing the configuration of the composite definition above
- </LI>
- </UL>
- <P>In this section we will use the Calculator sample as a worked example.
- The Calculator code and files can be found at samples/Calculator and has been
- developed further than the details specified below. In the interests of
- readability, the example used below takes the simplest path.
- </P>
- <OL>
- <LI>Create the service header file that defines the operations your component
- will implement. E.g. Calculator.h contains the following:<BR/>
- <PRE>#ifndef CALCULATOR_H
-#define CALCULATOR_H
-class Calculator
-{
-public:
- virtual float add(float arg1, float arg2) = 0;
- virtual float sub(float arg1, float arg2) = 0;
- virtual float mul(float arg1, float arg2) = 0;
- virtual float div(float arg1, float arg2) = 0;
-};
-
-#endif</PRE>
- </LI>
- <LI>Create the implementation header file that extends the service header file.
- E.g. CalculatorImpl.h contains the following:<BR/>
- <PRE>#ifndef CALCULATORIMPL_H
-#define CALCULATORIMPL_H
-
-#include "Calculator.h"
-
-class CalculatorImpl : public Calculator
-{
-public:
- CalculatorImpl();
- virtual ~CalculatorImpl();
-
- // Calculator interface
- virtual float add(float arg1, float arg2);
- virtual float sub(float arg1, float arg2);
- virtual float mul(float arg1, float arg2);
- virtual float div(float arg1, float arg2);
-};
-
-#endif</PRE>
- </LI>
- <LI>Create the implementation for the component based on the implementation
- header file. E.g. CalculatorImpl.cpp contains the following code:<BR/>
- <PRE>#include "CalculatorImpl.h"
-#include <stdio.h>
-
-CalculatorImpl::CalculatorImpl()
-{
-}
-
-CalculatorImpl::~CalculatorImpl()
-{
-}
-
-// Calculator interface
-float CalculatorImpl::add(float arg1, float arg2)
-{
- float result = arg1 + arg2;
-
- printf("CalculatorImpl::add %f + %f = %f\n", arg1, arg2, result);
- return result;
-}
-
-float CalculatorImpl::sub(float arg1, float arg2)
-{
- float result = arg1 - arg2;
- printf("CalculatorImpl::sub %f - %f = %f\n", arg1, arg2, result);
- return result;
-}
-
-float CalculatorImpl::div(float arg1, float arg2)
-{
- float result = arg1 / arg2;
- printf("CalculatorImpl::div %f / %f = %f\n", arg1, arg2, result);
- return result;
-}
-
-float CalculatorImpl::mul(float arg1, float arg2)
-{
- float result = arg1 * arg2;
- printf("CalculatorImpl::mul %f * %f = %f\n", arg1, arg2, result);
- return result;
-}</PRE>
- </LI>
- <LI>Create the componentType file for your component to define the service that
- your component provides. The file must be named after your implementation
- class and specifies the name of the service and the service header file
- (which describes the service operations). E.g. CalculatorImpl.componentType
- contains the following XML:<BR/>
- <PRE>&lt;componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"&gt;
-
- &lt;service name="CalculatorService"&gt;
- &lt;interface.cpp header="Calculator.h"/&gt;
- &lt;/service&gt;
-
-&lt;/componentType&gt;</PRE>
- </LI>
- <LI>Create a sample.calculator.composite file for your composite and define your
- component within it. The component definition specifies the implementation
- library to use (a .dll file on Windows and a .so file on Linux) and the
- implementation header file (which describes the implementation class). Component
- properties and references to other services can also be specified here. E.g. the
- Calculator sample.calculator.composite file contains the following XML:<BR/>
- <PRE>&lt;composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- name="sample.calculator"&gt;
-
- &lt;component name="CalculatorComponent"&gt;
- &lt;implementation.cpp library="Calculator" header="CalculatorImpl.h"/&gt;
- &lt;/component&gt;
-
-&lt;/composite&gt;</PRE>
- </LI>
- <LI>Generate the proxy and wrapper classes and header files using the SCAGEN
- tool. These classes are used by the Tuscany SCA C++ runtime to enable
- service implementations to be invoked from a client or another component.
- Run the SCAGEN tool, specifying the directory where your header files,
- sca.composite and componentType file are and the directory where you
- want the generated files to be placed. E.g. on Windows, the
- following command is run from the directory where Tuscany SCA is deployed:<BR/>
- <PRE>./bin/scagen.cmd -dir ./samples/Calculator/sample.calculator -output ./samples/Calculator/sample.calculator</PRE>
- which produces the following files:
- <UL>
- <LI>CalculatorImpl_CalculatorService_Proxy.h</LI>
- <LI>CalculatorImpl_CalculatorService_Proxy.cpp</LI>
- <LI>CalculatorImpl_CalculatorService_Wrapper.h</LI>
- <LI>CalculatorImpl_CalculatorService_Wrapper.cpp</LI>
- </UL>
- </LI>
- <LI>Compile and link the code that has been written and generated. This will
- produce a .dll or .so library file. The name should match the library name
- specified in the sample.calculator.composite file.
- </LI>
- <LI>Create the sample.calculator.solution.composite file and define your composite
- component within it. The composite component definition should specify the service
- name used in the componentType file and the composite name used in the
- sample.calculator.composite file. E.g. the Calculator sample.calculator.solution.composite
- file contains the following XML:<BR/>
- <PRE>&lt;composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- name="sample.calculator.solution"&gt;
-
- &lt;component name="sample.calculator.CalculatorComponent"&gt;
- &lt;implementation.composite name="sample.calculator" /&gt;
- &lt;/component&gt;
-
-&lt;/composite&gt;</PRE>
- </LI>
- <LI>Deploy the various files into the SCA directory structure, as follows:
- <UL>
- <LI>&lt;deploy_root&gt;/CompositeName/ServiceHeader.h</LI>
- <LI>&lt;deploy_root&gt;/CompositeName/ImplementationHeader.h </LI>
- <LI>&lt;deploy_root&gt;/CompositeName/CompositeName.composite </LI>
- <LI>&lt;deploy_root&gt;/CompositeName/Implementation.componentType </LI>
- <LI>&lt;deploy_root&gt;/CompositeName/Implementation.dll (or .so on Linux) </LI>
- <LI>&lt;deploy_root&gt;/SolutionName.composite </LI>
- </UL>
- E.g. for the Calculator sample the structure is:
- <UL>
- <LI>samples/Calculator/deploy/sample.calculator/Calculator.h </LI>
- <LI>samples/Calculator/deploy/sample.calculator/CalculatorImpl.h </LI>
- <LI>samples/Calculator/deploy/sample.calculator/sample.calculator.composite </LI>
- <LI>samples/Calculator/deploy/sample.calculator/CalculatorImpl.componentType</LI>
- <LI>samples/Calculator/deploy/sample.calculator/Calculator.dll </LI>
- <LI>samples/Calculator/deploy/sample.calculator.solution.composite</LI>
- </UL>
- </LI>
- <LI>Your component, composite and subsystem are now ready to be invoked. Create a
- client that will call the service. E.g. the Calculator client (in the
- CalculatorClient.cpp file) contains code similar to the following:<BR/>
- <PRE>try
-{
- // Locate the service
- CompositeContext myContext = CompositeContext::getCurrent();
- Calculator *calcService = (Calculator*) myContext.locateService("CalculatorComponent/CalculatorService");
- if (calcService == 0)
- {
- cout &lt;&lt; "calculator_client: Unable to find Calculator service" &lt;&lt; endl;
- }
- else
- {
- float result = calcService-&gt;add(arg1, arg2);
- cout &lt;&lt; "calculator_client add(" &lt;&lt; arg1 &lt;&lt; "," &lt;&lt; arg2 &lt;&lt; ") = " &lt;&lt; result &lt;&lt; endl;
- }
-}
-catch (ServiceRuntimeException& ex)
-{
- cout &lt;&lt; "calculator_client: Error whilst invoking Tuscany: " &lt;&lt;
- ex.getMessageText() &lt;&lt; endl;
-}
-</PRE>
- </LI>
- <LI>Compile, link and run the client that has been created. You should
- (hopefully!) see your component invoked. Remember you will need to have the
- TUSCANY_SCACPP, TUSCANY_SDOCPP and AXIS2C_HOME environment variables set,
- as well as the SCA and SDO bin directories and the Axis2C lib directory on
- your PATH on Windows or the SCA, SDO and Axis2C lib directories on
- your LD_LIBRARY_PATH on Linux. You will also need to set the TUSCANY_SCACPP_SYSTEM_ROOT
- and TUSCANY_SCACPP_DEFAULT_COMPONENT environment variables to the
- path to your SCA component directory structure and the default component respectively.
- E.g. on Windows run the following commands:
- <UL>
- <LI>set TUSCANY_SCACPP=C:/tuscany_sca </LI>
- <LI>set TUSCANY_SDOCPP=C:/tuscany_sdo </LI>
- <LI>set AXIS2C_HOME=C:/axis2c-bin-0.94-win32 </LI>
- <LI>set PATH=%PATH%;C:/tuscany_sca/bin;C:/tuscany_sdo/bin;C:/axis2c-bin-0.94-win32/lib</LI>
- <LI>set TUSCANY_SCACPP_SYSTEM_ROOT=C:/tuscany_sca/samples/Calculator/deploy </LI>
- <LI>set TUSCANY_SCACPP_DEFAULT_COMPONENT=sample.calculator.CalculatorComponent </LI>
- <LI>./calculator_client.exe </LI>
- </UL>
- </LI>
- <LI>Optionally, enable Tuscany logging by setting the TUSCANY_SCACPP_LOGGING
- environment variable with the level you wish to log at (0 for minimal
- logging, up to 9 for more detailed logging) and the TUSCANY_SCACPP_LOG
- environment variable to define the file to log to (if this is not set,
- logging will go to the console). E.g. on Windows run the following
- commands:
- <UL>
- <LI>set TUSCANY_SCACPP_LOGGING=5 </LI>
- <LI>set TUSCANY_SCACPP_LOG=C:/tuscany/mylogfile.txt</LI>
- </UL>
- </LI>
- </OL>
- <P>The Calculator sample has been developed further than the details specified
- above. In particular, it demonstrates how two services can be wired together
- such that one references and invokes the other. It also demonstrates how to
- expose the Calculator component service as an Axis2C Web Service.
- </P>
- </DIV>
- <DIV CLASS="section">
- <A NAME="help"><H2>Getting Help</H2></A>
-
- <P>First place to look is at the Tuscany FAQ at
- <A HREF="http://incubator.apache.org/tuscany/faq.html"
- TARGET="_blank">http://incubator.apache.org/tuscany/faq.html</A> </P>
-
- <P>Any problem with this release can be reported to the Tuscany
- <A HREF="http://incubator.apache.org/tuscany/mail-lists.html"
- TARGET="_blank">mailing lists</A> or create a JIRA issue at&nbsp;<A HREF="http://issues.apache.org/jira/browse/Tuscany"
- TARGET="_blank">http://issues.apache.org/jira/browse/Tuscany</A>.</P>
- </DIV>
- </DIV>
-</DIV>
-</BODY>
-
-</HTML>
-
diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/PythonExtension.html b/tags/cpp-1.0-incubating-M2-RC1/sca/doc/PythonExtension.html
deleted file mode 100644
index 696e41da8e..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/PythonExtension.html
+++ /dev/null
@@ -1,288 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
- Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<HTML>
-<HEAD>
- <META CONTENT="text/html; charset=iso-8859-1" HTTP-EQUIV="Content-Type">
- <META CONTENT="text/css" HTTP-EQUIV="Content-Style-Type">
- <STYLE MEDIA="all" TYPE="text/css">
-@import url("css/maven-base.css");
-@import url("css/maven-theme.css");
- </STYLE>
-
- <LINK HREF="css/maven-theme.css" MEDIA="print" REL="stylesheet"
- TYPE="text/css">
- <TITLE>Tuscany SCA for C++ - Python Extension</TITLE>
-</HEAD>
-
-<BODY>
-<DIV ID="bodyColumn">
- <DIV ID="contentBox">
- <DIV CLASS="section">
- <H2>Tuscany SCA for C++ - Python Extension</H2>
-
- <P>The Tuscany Python extension allows Python scripts to be used as components in
- SCA composites and as clients that can invoke SCA services.
- </P>
- <P>See <A HREF="../samples/PythonCalculator/README.html">PythonCalculator</A> for
- a sample that demonstrates the use of the Python extension.
- </P>
- </DIV>
- <DIV CLASS="section">
- <H2>Contents</H2>
- <OL>
- <LI><A HREF="#requirements">System Requirements</A></LI>
- <LI><A HREF="#install">Installing the Tuscany SCA Python Extension..</A>
- <UL>
- <LI><A HREF="#linuxbin">..from the binary release on Linux</A></LI>
- <LI><A HREF="#linuxsrc">..from the source release on Linux</A></LI>
- <LI><A HREF="#winbin">..from the binary release on Windows</A></LI>
- <LI><A HREF="#winsrc">..from the source release on Windows</A></LI>
- </UL></LI>
- <LI><A HREF="#pm">The Tuscany Python Programming Model</A></LI>
- <UL>
- <LI><A HREF="#clients">Clients</A></LI>
- <LI><A HREF="#components">SCA Components</A></LI>
- <LI><A HREF="#references">Component references</A></LI>
- <LI><A HREF="#properties">Component properties</A></LI>
- </UL>
- <LI><A HREF="#help">Getting help</A></LI>
- </OL>
- </DIV>
- <DIV CLASS="section">
- <A NAME="requirements"><H2>System Requirements</H2></A>
-
- <P>In order to install and use the Tuscany SCA Python Extension there are some
- extra requirements in addition to the <A HREF="../GettingStarted.html#requirements">Tuscany
- SCA requirements</A>:</P>
- <TABLE CLASS="bodyTable">
-
- <TBODY>
- <TR CLASS="a">
- <TD><B>Software</B></TD>
- <TD><B>Download Link</B></TD>
- </TR>
- <TR CLASS="b">
- <TD>Python version 2.3 or higher</TD>
-
- <TD>
- <A HREF="http://www.python.org/download/"
- TARGET="_blank">http://www.python.org/download/</A><BR/>
- Please download and follow the installation instructions
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="install"><H2>Installing the Tuscany SCA Python Extension</H2></A>
- <A NAME="linuxbin"><H3>Getting the Tuscany SCA Python Extension working with the binary release on Linux</H3></A>
- <OL>
- <LI>Extract the binary tar package to a folder</LI>
- <LI>Set the TUSCANY_SCACPP environment variable to point to the directory that was just extracted</LI>
- <LI>Add the &lt;tuscany_sca_install_dir&gt;/lib directory to the LD_LIBRARY_PATH <!--(Linux) or DYLD_LIBRARY_PATH (MacOS X)--> environment variable</LI>
- <LI>Add the &lt;tuscany_sca_install_dir&gt;/extensions/python/lib directory to the PYTHONPATH environment variable</LI>
- </OL>
- <A NAME="linuxsrc"><H3>Getting the Tuscany SCA Python Extension working with the source release on Linux</H3></A>
- <OL>
- <LI>You will need the Tuscany SCA and SDO libraries - follow the instructions
- <A HREF="../GettingStarted.html">here</A> to build the SCA libraries and default extensions</LI>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to built Tuscany SCA&gt;
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
- <LI>PYTHON_LIB=&lt;path to Python libraries&gt;</LI>
- <LI>PYTHON_INCLUDE=&lt;path to Python includes&gt;</LI>
- <LI>PYTHON_VERSION=&lt;name of the Python version&gt;<BR/>
- Note: If you are using a default installation of Python 2.3 these are usually:<BR/>
- PYTHON_LIB=/usr/lib<BR/>
- PYTHON_INCLUDE=/usr/include/python2.3<BR/>
- PYTHON_VERSION=python2.3<BR/></LI>
- </UL></LI>
- <LI>Build the Python source only with the following command sequence:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;</LI>
- <LI>./configure --prefix=$TUSCANY_SCACPP --enable-python --enable-cpp=no</LI>
- <LI>make</LI>
- <LI>make install</LI>
- </UL>
- NOTE: If you don't provide a --prefix configure option, it will by default install into
- /usr/local/tuscany/sca</LI>
- </OL>
-
- <A NAME="winbin"><H3>Getting the Tuscany SCA Python Extension working with the binary release on Windows</H3></A>
- <OL>
- <LI>Unzip the supplied zip file to a folder</LI>
- <LI>Set the TUSCANY_SCACPP environment variable to point to the directory that was just unzipped</LI>
- <LI>Add the &lt;tuscany_sca_install_dir&gt;\bin directory to the PATH environment variable</LI>
- <LI>Add the &lt;tuscany_sca_install_dir&gt;\extensions\python\bin directory to the PYTHONPATH environment variable</LI>
- </OL>
- <A NAME="winsrc"><H3>Getting the Tuscany SCA Python Extension working with the source release on Windows</H3></A>
- <OL>
- <LI>Unzip the supplied source zip file</LI>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to built Tuscany SCA&gt;
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
- <LI>PYTHON_HOME=&lt;path to installed Python&gt;
- </UL></LI>
- <LI>You must have set up the environment for Microsoft Visual C++ tools. The build command
- will call vcvars32 to set the environment. Ensure the directory containing this is on your path.
- This will be where you installed the compiler.</LI>
- <LI>Build the source:
- <UL>
- <LI>cd &lt;to where you unzipped the source&gt;</LI>
- <LI>build</LI>
- </UL>
- This will build all the projects and put the required output into the 'deploy' directory<BR/><BR/>
- Alternatively, open the workspace at &lt;tuscany_sca_install_dir&gt;/projects/tuscany_sca/tuscany_sca.dsw
- in Visual Studio 6 or at at &lt;tuscany_sca_install_dir&gt;/projectsvc7/tuscany_sca/tuscany_sca.sln
- in Visual Studio 7.1 - you can build projects individually
- <LI>Set the TUSCANY_SCACPP environment variable to point to the 'deploy' directory that was just created</LI>
- </OL>
- </DIV>
-
-
- <DIV CLASS="section">
- <A NAME="pm"><H2>The Tuscany Python Programming Model</H2></A>
- <P>This section will explain
- the Tuscany Python programming model to help you to write your own Python
- components and clients.
- </P>
- <P>The Tuscany Python component and client support comes from a Python extension
- package that is built in the &lt;tuscany_sca_install_dir&gt;/extensions/python/bin
- directory on Windows and &lt;tuscany_sca_install_dir&gt;/extensions/python/lib on
- Linux. This package must be made available to your Python environment by
- adding this directory to your PYTHONPATH environment variable. This makes the sca
- module available for use by clients and allows references and properties to be
- used in your Python components
- </P>
- <A NAME="clients"><H3>Clients</H3></A>
- <P>Using the sca module, a Python client can search for an SCA service with:
- </P>
-<PRE>import sca
-
-calculator = sca.locateservice("CalculatorComponent/CalculatorService")
-</PRE>
- <P>This finds the component and service as defined in the composite and componentType
- side files and returns a proxy object that can call the SCA service. You can then
- simply call a business method on "calculator", like this:
- </P>
-<PRE>result = calculator.add(12.3, 45.6)</PRE>
- </P>
- <A NAME="components"><H3>Components</H3></A>
- <P>Python component implementations are standard Python scripts, where class-level
- functions or module-level functions can be invoked by the Tuscany runtime. To
- use a Python component implementation, use the implementation.python element in
- your .composite file. For example, the following snippet will use the Python script
- at path/to/module/PythonModuleName.py, where the path is relative to the location of
- the composite file:
- </P>
-<PRE>&lt;implementation.python module="PythonModuleName" path="path/to/module"/&gt;
-</PRE>
- <P>To instantiate a class instance and use a class-level function, the Python class must
- have a default constructor (an __init__ method that takes no arguments besides
- 'self') and the class attribute must be defined in the implementation.python element
- in your composite, like so:
- </P>
-<PRE>&lt;implementation.python module="PythonModuleName" path="relative/path/to/module" class="PythonClassName"/&gt;
-</PRE>
- <P>Additionally, Tuscany currently requires a componentType file that corresponds to the
- name of the Python module, e.g. for the Python Calculator sample, the module name is
- 'CalculatorImpl' and the componentType file is 'CalculatorImpl.componentType'. The
- componentType file specifies what services are available on the component and which
- references are called by the component. For example, CalculatorImpl.componentType
- contains the following:
- </P>
-<PRE>&lt;componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"&gt;
- &lt;service name="CalculatorService"&gt;
- &lt;interface.python/&gt;
- &lt;/service&gt;
- &lt;reference name="divideService"&gt;
- &lt;interface.python/&gt;
- &lt;/reference&gt;
-&lt;/componentType&gt;
-</PRE>
- <A NAME="references"><H3>References</H3></A>
- <P>References are automatically added to your Python component implementation when
- the runtime loads the implementation script, so they can be used like so:
- </P>
-<PRE># The module-level div function
-def div(val1, val2):
- # Use the divideService reference
- result = divideService.divide(val1, val2)
- return result
-</PRE>
- <P>and in your composite file:
- </P>
-<PRE>&lt;component name="CalculatorComponent"&gt;
- &lt;implementation.python module="CalculatorImpl"/&gt;
- &lt;reference name="divideService"&gt;DivideComponent/DivideService&lt;/reference&gt;
-&lt;/component&gt;
-</PRE>
- <A NAME="properties"><H3>Properties</H3></A>
- <P>A composite with a property defined for a component like so:
- </P>
-<PRE>&lt;component name="DivideComponent"&gt;
- &lt;implementation.python module="DivideImpl"/&gt;
- &lt;property name="doRounding"&gt;true&lt;/property&gt;
-&lt;/component&gt;
-</PRE>
- <P>and in the associated .componentType file like so:
- </P>
-<PRE>&lt;componentType ...
-...
- &lt;property name="doRounding" type="xsd:boolean"/&gt;
-&lt;/componentType&gt;
-</PRE>
- <P>means the property is automatically instantiated and assigned the
- property value in the Python component implementation, so it can be
- used like so:
- </P>
-<PRE>def divide(val1, val2):
- result = float(val1) / float(val2)
- print "Python - DivideImpl.divide " + str(val1) + " / " + str(val2) + " = " + str(result)
-
- # Use the doRounding property
- if doRounding:
- result = round(result)
- print "Python - DivideImpl.divide is rounding the result to " + str(result)
-
- return result
-</PRE>
-</P>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="help"><H2>Getting Help</H2></A>
-
- <P>First place to look is at the Tuscany FAQ at
- <A HREF="http://incubator.apache.org/tuscany/faq.html"
- TARGET="_blank">http://incubator.apache.org/tuscany/faq.html</A> </P>
-
- <P>Any problem with this release can be reported to the Tuscany
- <A HREF="http://incubator.apache.org/tuscany/mail-lists.html"
- TARGET="_blank">mailing lists</A> or create a JIRA issue at&nbsp;<A HREF="http://issues.apache.org/jira/browse/Tuscany"
- TARGET="_blank">http://issues.apache.org/jira/browse/Tuscany</A>.</P>
- </DIV>
- </DIV>
-</DIV>
-</BODY>
-
-</HTML>
-
diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/RubyExtension.html b/tags/cpp-1.0-incubating-M2-RC1/sca/doc/RubyExtension.html
deleted file mode 100644
index 2ab8601ec5..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/RubyExtension.html
+++ /dev/null
@@ -1,279 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
- Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<HTML>
-<HEAD>
- <META CONTENT="text/html; charset=iso-8859-1" HTTP-EQUIV="Content-Type">
- <META CONTENT="text/css" HTTP-EQUIV="Content-Style-Type">
- <STYLE MEDIA="all" TYPE="text/css">
-@import url("css/maven-base.css");
-@import url("css/maven-theme.css");
- </STYLE>
-
- <LINK HREF="css/maven-theme.css" MEDIA="print" REL="stylesheet"
- TYPE="text/css">
- <TITLE>Tuscany SCA for C++ - Ruby Extension</TITLE>
-</HEAD>
-
-<BODY>
-<DIV ID="bodyColumn">
- <DIV ID="contentBox">
- <DIV CLASS="section">
- <H2>Tuscany SCA for C++ - Ruby Extension</H2>
-
- <P>The Tuscany Ruby extension allows Ruby scripts to be used as components in
- SCA composites and as clients that can invoke SCA services.
- </P>
- <P>See <A HREF="../samples/RubyCalculator/README.html">RubyCalculator</A> and
- <A HREF="../samples/RubyBank/README.html">RubyBank</A> for
- two samples that demonstrate the use of the Ruby extension.
- </P>
- </DIV>
- <DIV CLASS="section">
- <H2>Contents</H2>
- <OL>
- <LI><A HREF="#requirements">System Requirements</A></LI>
- <LI><A HREF="#install">Installing the Tuscany SCA Ruby Extension..</A>
- <UL>
- <LI><A HREF="#linuxbin">..from the binary release on Linux</A></LI>
- <LI><A HREF="#linuxsrc">..from the source release on Linux</A></LI>
- <LI><A HREF="#winbin">..from the binary release on Windows</A></LI>
- <LI><A HREF="#winsrc">..from the source release on Windows</A></LI>
- </UL></LI>
- <LI><A HREF="#pm">The Tuscany Ruby Programming Model</A></LI>
- <UL>
- <LI><A HREF="#clients">Clients</A></LI>
- <LI><A HREF="#components">SCA Components</A></LI>
- <LI><A HREF="#references">Component references</A></LI>
- <LI><A HREF="#properties">Component properties</A></LI>
- </UL>
- <LI><A HREF="#help">Getting help</A></LI>
- </OL>
- </DIV>
- <DIV CLASS="section">
- <A NAME="requirements"><H2>System Requirements</H2></A>
-
- <P>In order to install and use the Tuscany SCA Ruby Extension there are some
- extra requirements in addition to the <A HREF="../GettingStarted.html#requirements">Tuscany
- SCA requirements</A>:</P>
- <TABLE CLASS="bodyTable">
-
- <TBODY>
- <TR CLASS="a">
- <TD><B>Software</B></TD>
- <TD><B>Download Link</B></TD>
- </TR>
- <TR CLASS="b">
- <TD>Ruby version 1.8.4 or higher</TD>
-
- <TD>
- <A HREF="http://www.ruby-lang.org"
- TARGET="_blank">http://www.ruby-lang.org</A><BR/>
- Please download and follow the installation instructions
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="install"><H2>Installing the Tuscany SCA Ruby Extension</H2></A>
- <A NAME="linuxbin"><H3>Getting the Tuscany SCA Ruby Extension working with the binary release on Linux</H3></A>
- <OL>
- <LI>Extract the binary tar package to a folder</LI>
- <LI>Set the TUSCANY_SCACPP environment variable to point to the directory that was just extracted</LI>
- <LI>Add the &lt;tuscany_sca_install_dir&gt;/lib directory to the LD_LIBRARY_PATH <!--(Linux) or DYLD_LIBRARY_PATH (MacOS X)--> environment variable</LI>
- </OL>
- <A NAME="linuxsrc"><H3>Getting the Tuscany SCA Ruby Extension working with the source release on Linux</H3></A>
- <OL>
- <LI>You will need the Tuscany SCA and SDO libraries - follow the instructions
- <A HREF="../GettingStarted.html">here</A> to build the SCA libraries and default extensions</LI>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to built Tuscany SCA&gt;
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
- <LI>RUBY_LIB=&lt;path to Ruby libraries&gt;</LI>
- <LI>RUBY_INCLUDE=&lt;path to Ruby includes&gt;<BR/>
- Note: If you are using a default installation of Ruby these are usually:<BR/>
- RUBY_LIB=/usr/lib<BR/>
- RUBY_INCLUDE=/usr/lib/ruby/1.8/i386-linux</LI>
- </UL></LI>
- <LI>Build the Ruby source only with the following command sequence:
- <UL>
- <LI>cd &lt;tuscany_sca_install_dir&gt;</LI>
- <LI>./configure --prefix=$TUSCANY_SCACPP --enable-ruby --enable-cpp=no</LI>
- <LI>make</LI>
- <LI>make install</LI>
- </UL>
- NOTE: If you don't provide a --prefix configure option, it will by default install into
- /usr/local/tuscany/sca</LI>
- </OL>
-
- <A NAME="winbin"><H3>Getting the Tuscany SCA Ruby Extension working with the binary release on Windows</H3></A>
- <OL>
- <LI>Unzip the supplied zip file to a folder</LI>
- <LI>Set the TUSCANY_SCACPP environment variable to point to the directory that was just unzipped</LI>
- <LI>Add the &lt;tuscany_sca_install_dir&gt;\bin directory to the PATH environment variable</LI>
- </OL>
- <A NAME="winsrc"><H3>Getting the Tuscany SCA Ruby Extension working with the source release on Windows</H3></A>
- <OL>
- <LI>Unzip the supplied source zip file</LI>
- <LI>The following environment variables are required:
- <UL>
- <LI>TUSCANY_SCACPP=&lt;path to built Tuscany SCA&gt;
- <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
- <LI>RUBY_HOME=&lt;path to installed Ruby&gt;
- </UL></LI>
- <LI>You must have set up the environment for Microsoft Visual C++ tools. The build command
- will call vcvars32 to set the environment. Ensure the directory containing this is on your path.
- This will be where you installed the compiler.</LI>
- <LI>Build the source:
- <UL>
- <LI>cd &lt;to where you unzipped the source&gt;</LI>
- <LI>build</LI>
- </UL>
- This will build all the projects and put the required output into the 'deploy' directory<BR/><BR/>
- Alternatively, open the workspace at &lt;tuscany_sca_install_dir&gt;/projects/tuscany_sca/tuscany_sca.dsw
- in Visual Studio 6 or at at &lt;tuscany_sca_install_dir&gt;/projectsvc7/tuscany_sca/tuscany_sca.sln
- in Visual Studio 7.1 - you can build projects individually
- or build the samples to rebuild all the projects</LI>
- <LI>Set the TUSCANY_SCACPP environment variable to point to the 'deploy' directory that was just created</LI>
- </OL>
- </DIV>
-
-
- <DIV CLASS="section">
- <A NAME="pm"><H2>The Tuscany Ruby Programming Model</H2></A>
- <P>This section will explain the Tuscany Ruby programming model to help you to
- write your own Ruby components and clients.
- </P>
- <P>The Tuscany Ruby component and client support comes from a Ruby extension
- library that is built in the &lt;tuscany_sca_install_dir&gt;/extensions/ruby/bin
- directory on Windows and &lt;tuscany_sca_install_dir&gt;/extensions/ruby/lib on
- Linux.
- </P>
- <A NAME="clients"><H3>Clients</H3></A>
- <P>Using the Ruby SCA extension library, a Ruby client can search for an SCA service with:
- </P>
-<PRE>require("libtuscany_sca_ruby")
-
-calculator = SCA::locateService("CalculatorComponent/CalculatorService")
-</PRE>
- <P>This finds the component and service as defined in the composite and componentType
- side files and returns a proxy object that can call the SCA service. You can then
- simply call a business method on "calculator", like this:
- </P>
-<PRE>result = calculator.add(12.3, 45.6)</PRE>
- </P>
- <A NAME="components"><H3>Components</H3></A>
- <P>Ruby component implementations are standard Ruby scripts, where class-level
- functions or module-level functions can be invoked by the Tuscany runtime. To
- use a Ruby component implementation, use the implementation.ruby element in
- your .composite file. For example:
- </P>
-<PRE>&lt;implementation.ruby script="CalculatorImpl.rb"/&gt;
-</PRE>
- <P>To instantiate a class instance and use a class-level function, the Ruby class must
- have a default constructor (an initialize() method that takes no arguments) and the
- class attribute must be definde in the implementation.ruby element
- in your composite, like so:
- </P>
-<PRE>&lt;implementation.ruby script="CalculatorImpl.rb" class="CalculatorImpl"/&gt;
-</PRE>
- <P>You can write a componentType file for your Ruby component, but you don't have to, the Ruby
- extension introspects Ruby component implementation classes for you and binds public
- attributes to references and properties.
- </P>
- <A NAME="references"><H3>References</H3></A>
- <P>References can be invoked from Ruby component implementations by the use of public
- attributes in the component implementation classes, like this:
- </P>
-<PRE>class CalculatorImpl
-
- # Define the public attribute that corresponds to the divideService reference
- attr_writer :divideService
-
-...
-
- def div(arg1, arg2)
- print "Ruby - CalculatorImpl.div\n"
- # Invoke the divideService reference
- @divideService.divide(arg1.to_f, arg2.to_f)
- end
-
-...
-end
-</PRE>
- <P>and in your composite file:
- </P>
-<PRE>&lt;component name="CalculatorComponent"&gt;
- &lt;implementation.ruby script="CalculatorImpl.rb"/&gt;
- &lt;reference name="divideService"&gt;DivideComponent/DivideService&lt;/reference&gt;
-&lt;/component&gt;
-</PRE>
- <A NAME="properties"><H3>Properties</H3></A>
- <P>A composite with a property defined for a component like so:
- </P>
-<PRE>&lt;component name="DivideComponent"&gt;
- &lt;implementation.ruby script="DivideImpl.rb" class="DivideImpl"/&gt;
- &lt;property name="round"&gt;true&lt;/property&gt;
-&lt;/component&gt;
-</PRE>
- <P>allows a public attribute of a Ruby component implementation class to be
- assigned the property value, so it can be used like so:
- </P>
-<PRE>class DivideImpl
-
- # Define the public attribute that corresponds to the round property
- attr_writer :round
-
-...
-
- def divide(arg1, arg2)
- print "Ruby - DivideImpl.divide ", arg1, " / ", arg2, "\n"
- res = arg1.to_f / arg2.to_f
- # Use the round property
- if @round then
- res = res.round
- print "DivideImpl.divide rounding\n"
- end
- print "DivideImpl.divide ", res, "\n"
- res
- end
-end
-</PRE>
-</P>
- </DIV>
-
- <DIV CLASS="section">
- <A NAME="help"><H2>Getting Help</H2></A>
-
- <P>First place to look is at the Tuscany FAQ at
- <A HREF="http://incubator.apache.org/tuscany/faq.html"
- TARGET="_blank">http://incubator.apache.org/tuscany/faq.html</A> </P>
-
- <P>Any problem with this release can be reported to the Tuscany
- <A HREF="http://incubator.apache.org/tuscany/mail-lists.html"
- TARGET="_blank">mailing lists</A> or create a JIRA issue at&nbsp;<A HREF="http://issues.apache.org/jira/browse/Tuscany"
- TARGET="_blank">http://issues.apache.org/jira/browse/Tuscany</A>.</P>
- </DIV>
- </DIV>
-</DIV>
-</BODY>
-
-</HTML>
-
diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-base.css b/tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-base.css
deleted file mode 100644
index 314da3a272..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-base.css
+++ /dev/null
@@ -1,147 +0,0 @@
-body {
- margin: 0px;
- padding: 0px;
-}
-img {
- border:none;
-}
-table {
- padding:0px;
- width: 100%;
- margin-left: -2px;
- margin-right: -2px;
-}
-acronym {
- cursor: help;
- border-bottom: 1px dotted #feb;
-}
-table.bodyTable th, table.bodyTable td {
- padding: 2px 4px 2px 4px;
- vertical-align: top;
-}
-div.clear{
- clear:both;
- visibility: hidden;
-}
-div.clear hr{
- display: none;
-}
-#bannerLeft, #bannerRight {
- font-size: xx-large;
- font-weight: bold;
-}
-#bannerLeft img, #bannerRight img {
- margin: 0px;
-}
-.xleft, #bannerLeft img {
- float:left;
- text-shadow: #7CFC00;
-}
-.xright, #bannerRight img {
- float:right;
- text-shadow: #7CFC00;
-}
-#banner {
- padding: 0px;
-}
-#banner img {
- border: none;
-}
-#breadcrumbs {
- padding: 3px 10px 3px 10px;
-}
-#leftColumn {
- width: 150px;
- float:left;
-}
-#bodyColumn {
- margin-right: 1.5em;
- margin-left: 177px;
-}
-#legend {
- padding: 8px 0 8px 0;
-}
-#navcolumn {
- padding: 8px 4px 0 8px;
-}
-#navcolumn h5 {
- margin: 0;
- padding: 0;
- font-size: small;
-}
-#navcolumn ul {
- margin: 0;
- padding: 0;
- font-size: small;
-}
-#navcolumn li {
- list-style-type: none;
- background-image: none;
- background-repeat: no-repeat;
- background-position: 0 0.4em;
- padding-left: 16px;
- list-style-position: ouside;
- line-height: 1.2em;
- font-size: smaller;
-}
-#navcolumn li.expanded {
- background-image: url(../images/expanded.gif);
-}
-#navcolumn li.collapsed {
- background-image: url(../images/collapsed.gif);
-}
-#poweredBy {
- text-align: center;
-}
-#navcolumn img {
- margin-top: 10px;
- margin-bottom: 3px;
-}
-#poweredBy img {
- display:block;
- margin: 20px 0 20px 17px;
- border: 1px solid black;
- width: 90px;
- height: 30px;
-}
-#search img {
- margin: 0px;
- display: block;
-}
-#search #q, #search #btnG {
- border: 1px solid #999;
- margin-bottom:10px;
-}
-#search form {
- margin: 0px;
-}
-#lastPublished {
- font-size: x-small;
-}
-.navSection {
- margin-bottom: 2px;
- padding: 8px;
-}
-.navSectionHead {
- font-weight: bold;
- font-size: x-small;
-}
-.section {
- padding: 4px;
-}
-#footer {
- padding: 3px 10px 3px 10px;
- font-size: x-small;
-}
-#breadcrumbs {
- font-size: x-small;
- margin: 0pt;
-}
-.source {
- padding: 12px;
- margin: 1em 7px 1em 7px;
-}
-.source pre {
- margin: 0px;
- padding: 0px;
-}
diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-theme.css b/tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-theme.css
deleted file mode 100644
index c77cb695dd..0000000000
--- a/tags/cpp-1.0-incubating-M2-RC1/sca/doc/css/maven-theme.css
+++ /dev/null
@@ -1,145 +0,0 @@
-body {
- padding: 0px 0px 10px 0px;
-}
-body, td, select, input, li{
- font-family: Verdana, Helvetica, Arial, sans-serif;
- font-size: 13px;
- padding: 4px 4px 4px 4px;
- line-height: 1.5em;
-}
-code{
- font-family: Courier, monospace;
- font-size: 13px;
-}
-a {
- text-decoration: none;
-}
-a:link {
- color:#36a;
-}
-a:visited {
- color:#47a;
-}
-a:active, a:hover {
- color:#69c;
-}
-#legend li.externalLink {
- background: url(../images/external.png) left top no-repeat;
- padding-left: 18px;
-}
-a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
- background: url(../images/external.png) right center no-repeat;
- padding-right: 18px;
-}
-#legend li.newWindow {
- background: url(../images/newwindow.png) left top no-repeat;
- padding-left: 18px;
-}
-a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
- background: url(../images/newwindow.png) right center no-repeat;
- padding-right: 18px;
-}
-h2 {
- padding: 4px 4px 4px 6px;
- border: 1px solid #999;
- color: #900;
- background-color: #ddd;
- font-weight:900;
- font-size: x-large;
-}
-h3 {
- padding: 4px 4px 4px 6px;
- border: 1px solid #aaa;
- color: #900;
- background-color: #eee;
- font-weight: normal;
- font-size: large;
-}
-h4 {
- padding: 4px 4px 4px 6px;
- border: 1px solid #bbb;
- color: #900;
- background-color: #fff;
- font-weight: normal;
- font-size: large;
-}
-h5 {
- padding: 4px 4px 4px 6px;
- color: #900;
- font-size: normal;
-}
-p {
- line-height: 1.5em;
- font-size: small;
-}
-#breadcrumbs {
- border-top: 1px solid #aaa;
- border-bottom: 1px solid #aaa;
- background-color: #ccc;
-}
-#leftColumn {
- margin: 10px 0 0 5px;
- border: 1px solid #999;
- background-color: #eee;
-}
-#navcolumn h5 {
- font-size: smaller;
- border-bottom: 1px solid #aaaaaa;
- padding-top: 2px;
- color: #000;
-}
-
-table.bodyTable th {
- color: white;
- background-color: #bbb;
- text-align: left;
- font-weight: bold;
-}
-
-table.bodyTable th, table.bodyTable td {
- font-size: 1em;
-}
-
-table.bodyTable tr.a {
- background-color: #ddd;
-}
-
-table.bodyTable tr.b {
- background-color: #eee;
-}
-
-.source {
- border: 1px solid #999;
-}
-dl {
- padding: 4px 4px 4px 6px;
- border: 1px solid #aaa;
- background-color: #ffc;
-}
-dt {
- color: #900;
-}
-#organizationLogo img, #projectLogo img, #projectLogo span{
- margin: 8px;
-}
-#banner {
- border-bottom: 1px solid #fff;
-}
-.sourcecode {
- border: 1px solid #999;
- font-family: Courier, monospace;
- font-size: 13px;
- white-space: pre;
- padding: 4px 4px 4px 6px;
- margin: 4px 4px 4px 6px;
-}
-pre {
- border: 1px solid #999;
- font-family: Courier, monospace;
- font-size: 13px;
- white-space: pre;
- padding: 4px 4px 4px 6px;
- margin: 4px 4px 4px 6px;
-}
-
-