diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-27 05:59:24 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-27 05:59:24 +0000 |
commit | fe9add6a09e833eb836325992571e1a874c18b18 (patch) | |
tree | 90782717c5af1cbd82743f45ccff6b7d45c9c8fd | |
parent | 349630f6763f44ceebc021b454376b2c97663c5e (diff) |
Simplify relay sample a bit.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1053003 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-cpp/trunk/samples/relay-python/Makefile.am | 2 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/relay-python/htdocs/test/index.html | 21 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/relay-python/html.py | 22 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/relay-python/json.py | 24 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/relay-python/relay.composite | 12 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/relay-python/relay.py (renamed from sca-cpp/trunk/samples/relay-python/xml.py) | 3 | ||||
-rw-r--r-- | sca-cpp/trunk/samples/relay-python/rss.py | 25 |
7 files changed, 7 insertions, 102 deletions
diff --git a/sca-cpp/trunk/samples/relay-python/Makefile.am b/sca-cpp/trunk/samples/relay-python/Makefile.am index 4e357eb330..57938aff69 100644 --- a/sca-cpp/trunk/samples/relay-python/Makefile.am +++ b/sca-cpp/trunk/samples/relay-python/Makefile.am @@ -20,6 +20,6 @@ if WANT_PYTHON dist_sample_SCRIPTS = start stop sampledir = $(prefix)/samples/relay-python -nobase_dist_sample_DATA = html.py json.py xml.py rss.py relay.composite htdocs/*.html htdocs/test/*.html +nobase_dist_sample_DATA = relay.py relay.composite htdocs/*.html endif diff --git a/sca-cpp/trunk/samples/relay-python/htdocs/test/index.html b/sca-cpp/trunk/samples/relay-python/htdocs/test/index.html deleted file mode 100644 index 1bfb3e30c2..0000000000 --- a/sca-cpp/trunk/samples/relay-python/htdocs/test/index.html +++ /dev/null @@ -1,21 +0,0 @@ -<!-- - 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. ---> - -<html><body><h1>It works!</h1></body></html> - diff --git a/sca-cpp/trunk/samples/relay-python/html.py b/sca-cpp/trunk/samples/relay-python/html.py deleted file mode 100644 index 87a94a35ba..0000000000 --- a/sca-cpp/trunk/samples/relay-python/html.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Content relay implementation -def get(id, target): - #return ("text/plain", ("It works!",)) - return target.get(id) - diff --git a/sca-cpp/trunk/samples/relay-python/json.py b/sca-cpp/trunk/samples/relay-python/json.py deleted file mode 100644 index 24f969d419..0000000000 --- a/sca-cpp/trunk/samples/relay-python/json.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -# Relay implementation -import uuid -import sys - -def get(id, target): - return target.get(id) - diff --git a/sca-cpp/trunk/samples/relay-python/relay.composite b/sca-cpp/trunk/samples/relay-python/relay.composite index 2f5b92dee0..7f7302955e 100644 --- a/sca-cpp/trunk/samples/relay-python/relay.composite +++ b/sca-cpp/trunk/samples/relay-python/relay.composite @@ -23,7 +23,7 @@ name="relay"> <component name="JSONTwit"> - <t:implementation.python script="json.py"/> + <t:implementation.python script="relay.py"/> <service name="Relay"> <t:binding.http uri="jsontwit"/> </service> @@ -33,7 +33,7 @@ </component> <component name="XMLTwit"> - <t:implementation.python script="xml.py"/> + <t:implementation.python script="relay.py"/> <service name="Relay"> <t:binding.http uri="xmltwit"/> </service> @@ -43,7 +43,7 @@ </component> <component name="RSSTwit"> - <t:implementation.python script="rss.py"/> + <t:implementation.python script="relay.py"/> <service name="Relay"> <t:binding.http uri="rsstwit"/> </service> @@ -53,17 +53,17 @@ </component> <component name="HTML"> - <t:implementation.python script="html.py"/> + <t:implementation.python script="relay.py"/> <service name="Relay"> <t:binding.http uri="html"/> </service> <reference name="target"> - <t:binding.http uri="http://localhost:8090/test"/> + <t:binding.http uri="http://people.apache.org/~jsdelfino/"/> </reference> </component> <component name="JSONFB"> - <t:implementation.python script="json.py"/> + <t:implementation.python script="relay.py"/> <service name="Relay"> <t:binding.http uri="jsonfb"/> </service> diff --git a/sca-cpp/trunk/samples/relay-python/xml.py b/sca-cpp/trunk/samples/relay-python/relay.py index 24f969d419..5fe99803c1 100644 --- a/sca-cpp/trunk/samples/relay-python/xml.py +++ b/sca-cpp/trunk/samples/relay-python/relay.py @@ -16,9 +16,6 @@ # under the License. # Relay implementation -import uuid -import sys - def get(id, target): return target.get(id) diff --git a/sca-cpp/trunk/samples/relay-python/rss.py b/sca-cpp/trunk/samples/relay-python/rss.py deleted file mode 100644 index 96e4491c1a..0000000000 --- a/sca-cpp/trunk/samples/relay-python/rss.py +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -import sys - -# Feed relay implementation -def get(id, target): - v = target.get(id) - print >> sys.stderr, v - return v - |