You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/12/09 19:49:22 UTC
svn commit: r485028 - in /incubator/tuscany/cpp/sca/samples/RestCustomer:
deploy.bat httpserver/conf/httpd.conf httpserver/startserver.bat
httpserver/startserver.sh sample.customer.restclient/runrestclient.bat
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 @@
+@echo off
+
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM 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
+
+@REM 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
+)
+
+@REM 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
+)
+
+@REM 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
+
+@REM 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 @@
+@echo off
+
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM 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: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org