summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/binary.composite33
-rw-r--r--sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/content/test.html21
-rw-r--r--sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/customer.composite39
-rw-r--r--sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/echo.composite36
-rw-r--r--sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/store.composite41
-rw-r--r--sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/test.composite40
-rw-r--r--sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/testCache.composite33
7 files changed, 243 insertions, 0 deletions
diff --git a/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/binary.composite b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/binary.composite
new file mode 100644
index 0000000000..821ae7fcbf
--- /dev/null
+++ b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/binary.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://binary"
+ name="Binary">
+
+ <component name="BinaryService">
+ <implementation.java class="services.binary.BinaryServiceImpl"/>
+ <service name="BinaryService">
+ <tuscany:binding.rest uri="http://localhost:8085/Binary">
+ <tuscany:operationSelector.jaxrs />
+ </tuscany:binding.rest>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/content/test.html b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/content/test.html
new file mode 100644
index 0000000000..f4b79d7f01
--- /dev/null
+++ b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/content/test.html
@@ -0,0 +1,21 @@
+<html>
+<!--
+ * 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.
+-->
+<body><p>hello</body>
+</html> \ No newline at end of file
diff --git a/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/customer.composite b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/customer.composite
new file mode 100644
index 0000000000..7b33145afd
--- /dev/null
+++ b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/customer.composite
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://customer"
+ name="customer">
+
+ <component name="CustomerService">
+ <implementation.java class="services.customer.CustomerServiceImpl"/>
+ <service name="CustomerService">
+ <tuscany:binding.rest uri="http://localhost:8085/Customer">
+ <tuscany:wireFormat.xml />
+ <tuscany:operationSelector.jaxrs />
+ <tuscany:http-headers>
+ <tuscany:header name="Cache-Control" value="no-cache"/>
+ <tuscany:header name="Expires" value="-1"/>
+ <tuscany:header name="X-Tuscany" value="tuscany"/>
+ </tuscany:http-headers>
+ </tuscany:binding.rest>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/echo.composite b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/echo.composite
new file mode 100644
index 0000000000..b69107834a
--- /dev/null
+++ b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/echo.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://echo"
+ xmlns:echo="http://echo"
+ name="Echo">
+
+ <component name="EchoComponent">
+ <implementation.java class="services.echo.EchoImpl"/>
+ <service name="Echo">
+ <tuscany:binding.rest uri="http://localhost:8085/EchoService">
+ <tuscany:wireFormat.json />
+ <tuscany:operationSelector.rpc />
+ </tuscany:binding.rest>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/store.composite b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/store.composite
new file mode 100644
index 0000000000..7a87929985
--- /dev/null
+++ b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/store.composite
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://store"
+ name="store">
+
+ <component name="Catalog">
+ <implementation.java class="services.store.FruitsCatalogImpl"/>
+ <property name="currencyCode">USD</property>
+ <service name="Catalog">
+ <tuscany:binding.rest uri="http://localhost:8085/Catalog">
+ <tuscany:wireFormat.json />
+ <tuscany:operationSelector.jaxrs />
+ </tuscany:binding.rest>
+ </service>
+ <reference name="currencyConverter" target="CurrencyConverter"/>
+ </component>
+
+ <component name="CurrencyConverter">
+ <implementation.java class="services.store.CurrencyConverterImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/test.composite b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/test.composite
new file mode 100644
index 0000000000..835633ac6d
--- /dev/null
+++ b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/test.composite
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample/test"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sr="http://sample/test"
+ name="test">
+
+ <component name="HTTPServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.rest.TestServiceImpl"/>
+ <service name="Servlet">
+ <tuscany:binding.rest uri="http://localhost:8085/httpservice"/>
+ </service>
+ </component>
+
+ <component name="HTTPGetComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.rest.TestGetImpl"/>
+ <service name="TestGetImpl">
+ <tuscany:binding.rest uri="http://localhost:8085/httpget"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/testCache.composite b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/testCache.composite
new file mode 100644
index 0000000000..3401608c51
--- /dev/null
+++ b/sca-java-2.x/branches/sca-java-2.0-M5/modules/binding-rest-runtime/src/test/resources/testCache.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample/test"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sr="http://sample/test"
+ name="testCache">
+
+ <component name="HTTPBindingComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.rest.TestBindingCacheImpl"/>
+ <service name="TestBindingCacheImpl">
+ <tuscany:binding.rest uri="http://localhost:8085/httpbinding"/>
+ </service>
+ </component>
+
+</composite>