Author: jsdelfino
Date: Sat Dec 9 10:49:21 2006
New Revision: 485028
URL: http://svn.apache.org/viewvc?view=rev&rev=485028
Log:
Ported the RestCustomer sample to Windows. Adjusted HTTPD configuration to
configure the server document root. Added Windows scripts to the sample.
Added:
incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.bat
incubator/tuscany/cpp/sca/samples/RestCustomer/sample.customer.restclient/runrestclient.bat
Modified:
incubator/tuscany/cpp/sca/samples/RestCustomer/deploy.bat
incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/conf/httpd.conf
incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.sh
Modified: incubator/tuscany/cpp/sca/samples/RestCustomer/deploy.bat
URL:
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RestCustomer/deploy.bat?view=diff&rev=485028&r1=485027&r2=485028
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RestCustomer/deploy.bat (original)
+++ incubator/tuscany/cpp/sca/samples/RestCustomer/deploy.bat Sat Dec 9
10:49:21 2006
@@ -35,12 +35,25 @@
if not exist %samplesdir% mkdir %samplesdir%
if not exist %custdir% mkdir %custdir%
if not exist %destinationPath% mkdir %destinationPath%
+if not exist %destinationPath%\httpserver mkdir
%destinationPath%\httpserver
+if not exist %destinationPath%\httpserver\conf mkdir
%destinationPath%\httpserver\conf
+if not exist %destinationPath%\httpserver\htdocs mkdir
%destinationPath%\httpserver\htdocs
+
+if not exist %destinationPath%\sample.customer mkdir
%destinationPath%\sample.customer
+copy %sourcePath%\sample.customer\*.py %destinationPath%\sample.customer
+copy %sourcePath%\sample.customer\*.composite %destinationPath%\sample.customer
+copy %sourcePath%\sample.customer\2345.xml %destinationPath%\sample.customer
if not exist %destinationPath%\sample.customer.restclient mkdir
%destinationPath%\sample.customer.restclient
-copy %sourcePath%\sample.customer.restclient\CustomerRestClient.rb
%destinationPath%\sample.customer.restclient
-copy
%sourcePath%\sample.customer.restclient\sample.customer.restclient.composite
%destinationPath%\sample.customer.restclient
-copy %sourcePath%\sample.customer.wsclient\runrestclient.bat
%destinationPath%\sample.customer.restclient
+copy %sourcePath%\sample.customer.restclient\*.py
%destinationPath%\sample.customer.restclient
+copy %sourcePath%\sample.customer.restclient\*.composite
%destinationPath%\sample.customer.restclient
+copy %sourcePath%\sample.customer.restclient\runrestclient.bat
%destinationPath%\sample.customer.restclient
copy %sourcePath%\*.composite %destinationPath%
+
+copy %sourcePath%\httpserver\*.bat %destinationPath%\httpserver
+copy %sourcePath%\httpserver\conf\*.types %destinationPath%\httpserver\conf
+copy %sourcePath%\httpserver\conf\*.conf %destinationPath%\httpserver\conf
+copy %sourcePath%\httpserver\htdocs\*.html %destinationPath%\httpserver\htdocs
endlocal
Modified:
incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/conf/httpd.conf
URL:
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/conf/httpd.conf?view=diff&rev=485028&r1=485027&r2=485028
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/conf/httpd.conf
(original)
+++ incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/conf/httpd.conf
Sat Dec 9 10:49:21 2006
@@ -1,26 +1,27 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you 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.
-
-# This is the main Apache HTTP server configuration file. It contains the
-# configuration directives that give the server its instructions.
-# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
-
-Listen 9090
-
-# Generated by the startserver script
-Include conf/tuscany_sca_mod_rest.conf
-
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+# This is the main Apache HTTP server configuration file. It contains the
+# configuration directives that give the server its instructions.
+# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
+
+Listen 9090
+
+# Generated by the startserver script
+Include conf/base.conf
+Include conf/tuscany_sca_mod_rest.conf
+
Added: incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.bat
URL:
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.bat?view=auto&rev=485028
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.bat
(added)
+++ incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.bat
Sat Dec 9 10:49:21 2006
@@ -0,0 +1,74 @@
[EMAIL PROTECTED] off
+
[EMAIL PROTECTED] Licensed to the Apache Software Foundation (ASF) under one
[EMAIL PROTECTED] or more contributor license agreements. See the NOTICE file
[EMAIL PROTECTED] distributed with this work for additional information
[EMAIL PROTECTED] regarding copyright ownership. The ASF licenses this file
[EMAIL PROTECTED] to you under the Apache License, Version 2.0 (the
[EMAIL PROTECTED] "License"); you may not use this file except in compliance
[EMAIL PROTECTED] with the License. You may obtain a copy of the License at
[EMAIL PROTECTED]
[EMAIL PROTECTED] http://www.apache.org/licenses/LICENSE-2.0
[EMAIL PROTECTED]
[EMAIL PROTECTED] Unless required by applicable law or agreed to in writing,
[EMAIL PROTECTED] software distributed under the License is distributed on an
[EMAIL PROTECTED] "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
[EMAIL PROTECTED] KIND, either express or implied. See the License for the
[EMAIL PROTECTED] specific language governing permissions and limitations
[EMAIL PROTECTED] under the License.
+
+setlocal
+
+set APFULLDIR=%~d0%~p0
+echo Running from %APFULLDIR%
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+goto end
+)
+echo Using SCA installed at %TUSCANY_SCACPP%
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+echo Using SDO installed at %TUSCANY_SDOCPP%
+
+if "%HTTPD_HOME%" == "" (
+echo "HTTPD_HOME not set"
+goto end
+)
+echo Using HTTPD installed at %HTTPD_HOME%
+
+set
PATH=%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SCACPP%\extensions\rest\interface\bin;%TUSCANY_SCACPP%\extensions\rest\service\bin;%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%HTTPD_HOME%\bin;%PATH%
+set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin
+
+set TUSCANY_SCACPP_ROOT=%APFULLDIR%\..\
+
+set CUSTOMER_DIR=%TUSCANY_SCACPP_ROOT%\sample.customer
+
[EMAIL PROTECTED] Generate the tuscany_sca_mod_rest configuration
+if not exist %APFULLDIR%\conf\tuscany_sca_mod_rest.conf (
+ echo LoadModule sca_rest_module
%TUSCANY_SCACPP%/extensions/rest\service/bin/tuscany_sca_mod_rest.dll >
%APFULLDIR%\conf\tuscany_sca_mod_rest.conf
+ echo TuscanyHome %TUSCANY_SCACPP% >>
%APFULLDIR%\conf\tuscany_sca_mod_rest.conf
+ echo ^<Location /rest^> >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf
+ echo SetHandler sca_rest_module >>
%APFULLDIR%\conf\tuscany_sca_mod_rest.conf
+ echo TuscanyRoot %TUSCANY_SCACPP_ROOT% >>
%APFULLDIR%\conf\tuscany_sca_mod_rest.conf
+ echo ^</Location^> >> %APFULLDIR%\conf\tuscany_sca_mod_rest.conf
+)
+
[EMAIL PROTECTED] Generate the base HTTPD configuration
+if not exist %APFULLDIR%\conf\base.conf (
+ echo LoadModule mime_module %HTTPD_HOME%\modules\mod_mime.so >
%APFULLDIR%\conf\base.conf
+ echo LoadModule dir_module %HTTPD_HOME%\modules\mod_dir.so >>
%APFULLDIR%\conf\base.conf
+ echo DocumentRoot %APFULLDIR%\htdocs >> %APFULLDIR%\conf\base.conf
+)
+
[EMAIL PROTECTED] Create logs directory
+if not exist %APFULLDIR%\logs mkdir %APFULLDIR%\logs
+set TUSCANY_SCACPP_LOG=%APFULLDIR%\logs\tuscany-server.log
+set TUSCANY_SCACPP_LOGGING=9
+
[EMAIL PROTECTED] Start the HTTP server
+echo Starting Apache httpd
+httpd -d %APFULLDIR%
Modified:
incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.sh
URL:
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.sh?view=diff&rev=485028&r1=485027&r2=485028
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.sh
(original)
+++ incubator/tuscany/cpp/sca/samples/RestCustomer/httpserver/startserver.sh
Sat Dec 9 10:49:21 2006
@@ -54,6 +54,10 @@
echo "</Location>" >>conf/tuscany_sca_mod_rest.conf
fi
+if [ ! -f conf/base.conf ]; then
+ echo "DocumentRoot $APFULLDIR/htdocs" >conf/base.conf
+fi
+
# Create logs directory
if [ ! -d logs ]; then
mkdir logs
Added:
incubator/tuscany/cpp/sca/samples/RestCustomer/sample.customer.restclient/runrestclient.bat
URL:
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RestCustomer/sample.customer.restclient/runrestclient.bat?view=auto&rev=485028
==============================================================================
---
incubator/tuscany/cpp/sca/samples/RestCustomer/sample.customer.restclient/runrestclient.bat
(added)
+++
incubator/tuscany/cpp/sca/samples/RestCustomer/sample.customer.restclient/runrestclient.bat
Sat Dec 9 10:49:21 2006
@@ -0,0 +1,52 @@
[EMAIL PROTECTED] off
+
[EMAIL PROTECTED] Licensed to the Apache Software Foundation (ASF) under one
[EMAIL PROTECTED] or more contributor license agreements. See the NOTICE file
[EMAIL PROTECTED] distributed with this work for additional information
[EMAIL PROTECTED] regarding copyright ownership. The ASF licenses this file
[EMAIL PROTECTED] to you under the Apache License, Version 2.0 (the
[EMAIL PROTECTED] "License"); you may not use this file except in compliance
[EMAIL PROTECTED] with the License. You may obtain a copy of the License at
[EMAIL PROTECTED]
[EMAIL PROTECTED] http://www.apache.org/licenses/LICENSE-2.0
[EMAIL PROTECTED]
[EMAIL PROTECTED] Unless required by applicable law or agreed to in writing,
[EMAIL PROTECTED] software distributed under the License is distributed on an
[EMAIL PROTECTED] "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
[EMAIL PROTECTED] KIND, either express or implied. See the License for the
[EMAIL PROTECTED] specific language governing permissions and limitations
[EMAIL PROTECTED] under the License.
+
+setlocal
+
+if "%TUSCANY_SCACPP%" == "" (
+echo TUSCANY_SCACPP not set
+goto end
+)
+echo using SCA installed at %TUSCANY_SCACPP%
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo TUSCANY_SDOCPP not set
+goto end
+)
+echo using SDO installed at %TUSCANY_SDOCPP%
+
+if "%LIBCURL_HOME%" == "" (
+echo LIBCURL_HOME not set
+goto end
+)
+echo using Libcurl installed at %LIBCURL_HOME%
+
+set
PATH=%HTTPD_HOME%\bin;%LIBCURL_HOME%\lib;%TUSCANY_SCACPP%\extensions\rest\interface\bin;%TUSCANY_SCACPP%\extensions\rest\reference\bin;%TUSCANY_SCACPP%\extensions\python\bin;%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%PATH%
+set PYTHONPATH=%TUSCANY_SCACPP%\extensions\python\bin
+
+set TUSCANY_SCACPP_ROOT=%~d0%~p0\..\
+set TUSCANY_SCACPP_COMPONENT=sample.customer.CustomerRestClientComponent
+
+set CUSTOMER_DIR=%TUSCANY_SCACPP_ROOT%\sample.customer
+
+cd %TUSCANY_SCACPP_ROOT%\sample.customer.restclient
+python CustomerRestClient.py
+
+:end
+endlocal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]