summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/archetypes
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-09-04 08:43:06 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-09-04 08:43:06 +0000
commita29294f0f590b045a027325f77bcf14abc36a337 (patch)
tree7f678967a603437449f618d575bde61cdec11960 /sca-java-2.x/trunk/archetypes
parentd4682fb3995ea389b239dad11e7827e9e3c54c1f (diff)
Start of a maven archetype for creating a Tuscany binding extension
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@992562 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/archetypes')
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/pom.xml53
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml61
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF17
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/pom.xml83
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java102
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java35
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java50
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java58
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java56
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java60
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java43
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java47
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory20
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor20
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema19
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory20
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__bindingName__.xsd42
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java36
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java31
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java31
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/FooBindingTestCase.java57
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite39
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/archetype.properties6
-rw-r--r--sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/goal.txt0
24 files changed, 986 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/archetypes/binding/pom.xml b/sca-java-2.x/trunk/archetypes/binding/pom.xml
new file mode 100644
index 0000000000..6a4c9b9466
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/pom.xml
@@ -0,0 +1,53 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>tuscany-binding-archetype</artifactId>
+ <packaging>maven-archetype</packaging>
+ <name>Create a Tuscany binding extension project</name>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-5</version>
+ </extension>
+ </extensions>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-5</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000000..94f44feb00
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,61 @@
+<?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.
+-->
+<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="tuscany-binding-foo-runtime"
+ xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <requiredProperties>
+ <requiredProperty key="bindingName">
+ </requiredProperty>
+ </requiredProperties>
+
+ <fileSets>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>META-INF</directory>
+ <includes>
+ <include>MANIFEST.MF</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor>
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..f895a144e6
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+SCA-Version: 1.1
+Bundle-Name: Apache Tuscany SCA Foo Binding
+Bundle-Vendor: The Apache Software Foundation
+Bundle-Version: 2.0.0
+Bundle-ManifestVersion: 2
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-Description: Apache Tuscany SCA Foo Binding
+Import-Package: org.apache.tuscany.sca.assembly;version="2.0.0",
+ org.apache.tuscany.sca.core;version="2.0.0",
+ org.apache.tuscany.sca.interfacedef;version="2.0.0",
+ org.apache.tuscany.sca.invocation;version="2.0.0",
+ org.apache.tuscany.sca.provider;version="2.0.0",
+ org.apache.tuscany.sca.runtime;version="2.0.0"
+Bundle-SymbolicName: org.apache.tuscany.sca.binding.foo
+Bundle-DocURL: http://www.apache.org/
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000000..e2c8982762
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,83 @@
+<?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.
+--><project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-modules</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>${artifactId}</artifactId>
+ <groupId>${groupId}</groupId>
+ <name>Apache Tuscany SCA Foo Binding Runtime</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-assembly-xml</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-http</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <version>${version}</version>
+
+</project>
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java
new file mode 100644
index 0000000000..ea177ea446
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java
@@ -0,0 +1,102 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+package ${package}.binding.foo;
+
+import javax.xml.namespace.QName;
+
+import ${package}.assembly.Binding;
+import ${package}.assembly.OperationSelector;
+import ${package}.assembly.WireFormat;
+
+/**
+ * Represents a binding to an Foo service.
+ */
+public class FooBinding implements Binding {
+
+ QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.foo");
+
+ private String name;
+ private String uri;
+ private String bindingType;
+
+ public String getBindingType() {
+ return bindingType;
+ }
+
+ public void setBindingType(String bindingType) {
+ this.bindingType = bindingType;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getURI() {
+ return uri;
+ }
+
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean arg0) {
+ }
+
+ public QName getType() {
+ return TYPE;
+ }
+
+ public WireFormat getRequestWireFormat() {
+ return null;
+ }
+
+ public void setRequestWireFormat(WireFormat wireFormat) {
+ }
+
+ public WireFormat getResponseWireFormat() {
+ return null;
+ }
+
+ public void setResponseWireFormat(WireFormat wireFormat) {
+ }
+
+ public OperationSelector getOperationSelector() {
+ return null;
+ }
+
+ public void setOperationSelector(OperationSelector operationSelector) {
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java
new file mode 100644
index 0000000000..933d208588
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java
@@ -0,0 +1,35 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package}.binding.foo;
+
+
+/**
+ * Factory implementation to create Foo Models
+ */
+public class FooBindingFactory {
+
+ public FooBinding createFooBinding() {
+ return new FooBinding();
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java
new file mode 100644
index 0000000000..ec9e358b4d
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java
@@ -0,0 +1,50 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package}.binding.foo.runtime;
+
+import ${package}.binding.foo.FooBinding;
+import ${package}.core.ExtensionPointRegistry;
+import ${package}.provider.BindingProviderFactory;
+import ${package}.provider.ReferenceBindingProvider;
+import ${package}.provider.ServiceBindingProvider;
+import ${package}.runtime.RuntimeEndpoint;
+import ${package}.runtime.RuntimeEndpointReference;
+
+public class FooBindingProviderFactory implements BindingProviderFactory<FooBinding> {
+
+ public FooBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+ }
+
+ public Class<FooBinding> getModelType() {
+ return FooBinding.class;
+ }
+
+ public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) {
+ return new FooReferenceBindingProvider(endpoint);
+ }
+
+ public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
+ return new FooServiceBindingProvider(endpoint);
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java
new file mode 100644
index 0000000000..9615501203
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java
@@ -0,0 +1,58 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package}.binding.foo.runtime;
+
+import ${package}.assembly.EndpointReference;
+import ${package}.interfacedef.InterfaceContract;
+import ${package}.interfacedef.Operation;
+import ${package}.invocation.Invoker;
+import ${package}.provider.ReferenceBindingProvider;
+
+public class FooReferenceBindingProvider implements ReferenceBindingProvider {
+
+ private EndpointReference endpoint;
+ private InterfaceContract contract;
+
+ public FooReferenceBindingProvider(EndpointReference endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public Invoker createInvoker(Operation operation) {
+ return new FooReferenceInvoker(operation, endpoint);
+ }
+
+ public void start() {
+ }
+
+ public void stop() {
+ }
+
+ public InterfaceContract getBindingInterfaceContract() {
+ return contract;
+ }
+
+ public boolean supportsOneWayInvocation() {
+ return false;
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java
new file mode 100644
index 0000000000..8f8eabb5f6
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java
@@ -0,0 +1,56 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package}.binding.foo.runtime;
+
+import ${package}.assembly.EndpointReference;
+import ${package}.interfacedef.Operation;
+import ${package}.invocation.Invoker;
+import ${package}.invocation.Message;
+
+public class FooReferenceInvoker implements Invoker {
+
+ protected Operation operation;
+ protected EndpointReference endpoint;
+
+ public FooReferenceInvoker(Operation operation, EndpointReference endpoint) {
+ this.operation = operation;
+ this.endpoint = endpoint;
+ }
+
+ public Message invoke(Message msg) {
+ try {
+
+ return doInvoke(msg);
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public Message doInvoke(Message msg) {
+ // Add some code here to make an invocation over the foo binding protocol
+ // For this sample we'll just get it from the static stash
+ FooServiceInvoker fi = FooStash.getService(endpoint.getBinding().getURI());
+ return fi.invokeService(msg);
+ }
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java
new file mode 100644
index 0000000000..b33591e44d
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java
@@ -0,0 +1,60 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package}.binding.foo.runtime;
+
+import ${package}.binding.foo.FooBinding;
+import ${package}.interfacedef.InterfaceContract;
+import ${package}.provider.ServiceBindingProvider;
+import ${package}.runtime.RuntimeEndpoint;
+
+public class FooServiceBindingProvider implements ServiceBindingProvider {
+
+ private RuntimeEndpoint endpoint;
+ private InterfaceContract contract;
+
+ public FooServiceBindingProvider(RuntimeEndpoint endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public void start() {
+ // add some code here to start the service
+
+ // For this sample we'll just share it in a static
+ FooStash.addService(endpoint.getBinding().getURI(), new FooServiceInvoker(endpoint));
+
+ System.out.println("bindingType=" + ((FooBinding)endpoint.getBinding()).getBindingType());
+ }
+
+ public void stop() {
+ FooStash.removeService(endpoint.getBinding().getURI());
+ }
+
+ public InterfaceContract getBindingInterfaceContract() {
+ return contract;
+ }
+
+ public boolean supportsOneWayInvocation() {
+ return false;
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java
new file mode 100644
index 0000000000..bbadb9b6b0
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java
@@ -0,0 +1,43 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package}.binding.foo.runtime;
+
+import ${package}.invocation.Message;
+import ${package}.runtime.RuntimeEndpoint;
+
+public class FooServiceInvoker {
+
+ private RuntimeEndpoint wire;
+
+ public FooServiceInvoker(RuntimeEndpoint wire) {
+ this.wire = wire;
+ }
+
+ /**
+ * Send the request down the wire to invoke the service
+ */
+ public Message invokeService(Message msg) {
+ return wire.invoke(msg);
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java
new file mode 100644
index 0000000000..7271c08a83
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java
@@ -0,0 +1,47 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package}.binding.foo.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Simplistic static Map to share service endpoints with references
+ */
+public class FooStash {
+
+ private static Map<String, FooServiceInvoker> services = new HashMap<String, FooServiceInvoker>();
+
+ public static void addService(String uri, FooServiceInvoker fooServiceInvoker) {
+ services.put(uri, fooServiceInvoker);
+ }
+
+ public static FooServiceInvoker getService(String uri) {
+ return services.get(uri);
+ }
+
+ public static void removeService(String uri) {
+ services.remove(uri);
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory
new file mode 100644
index 0000000000..5de0163ece
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory
@@ -0,0 +1,20 @@
+# 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.
+
+# Implementation class for model factory
+org.apache.tuscany.sca.binding.foo.FooBindingFactory
+
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
new file mode 100644
index 0000000000..94b3a7e68a
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -0,0 +1,20 @@
+# 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.
+
+# Implementation class for the artifact processor extension
+org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.foo,model=${package}.${bindingName}Binding,factory={package}.${bindingName}BindingFactory
+
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
new file mode 100644
index 0000000000..2e1b0e53d7
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
@@ -0,0 +1,19 @@
+# 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.
+#
+binding-${bindingName}.xsd
+
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
new file mode 100644
index 0000000000..4e0ecf48e9
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
@@ -0,0 +1,20 @@
+# 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.
+
+# Implementation class for the binding extension
+{package}.runtime.${bindingName}BindingProviderFactory;model={package}.${bindingName}Binding
+
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__bindingName__.xsd b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__bindingName__.xsd
new file mode 100644
index 0000000000..9322aabd6d
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__bindingName__.xsd
@@ -0,0 +1,42 @@
+<?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.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ elementFormDefault="qualified">
+
+ <import namespace="http://docs.oasis-open.org/ns/opencsa/sca/200912" />
+
+ <element name="binding.foo" type="t:FooBinding" substitutionGroup="sca:binding"/>
+
+ <complexType name="FooBinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <!-- sequence>
+ <any namespace="##targetNamespace" processContents="lax" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </sequence -->
+ <!-- anyAttribute namespace="##other" processContents="lax"/-->
+ <attribute name="bindingType" type="string" use="optional"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..de982cefc1
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java
@@ -0,0 +1,36 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorldService {
+
+ @Reference
+ public HelloWorldService ref;
+
+ public String sayHello(String name) {
+ return ref.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..521f6828ce
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+package helloworld;
+
+
+public class HelloWorldImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..eca0df1543
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+package helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/FooBindingTestCase.java b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/FooBindingTestCase.java
new file mode 100644
index 0000000000..e9c92648e4
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/FooBindingTestCase.java
@@ -0,0 +1,57 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+package test;
+
+import helloworld.HelloWorldService;
+import junit.framework.Assert;
+
+import ${package}.http.jetty.JettyServer;
+import ${package}.node.Node;
+import ${package}.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class FooBindingTestCase {
+
+ private static Node node;
+
+ @Test
+ public void testSayHello() {
+ HelloWorldService service = node.getService(HelloWorldService.class, "HelloWorldClient/HelloWorldService");
+ Assert.assertEquals("Hello boo", service.sayHello("boo"));
+ }
+
+ @BeforeClass
+ public static void init() throws Exception {
+ JettyServer.portDefault = 8085;
+ node = NodeFactory.newInstance().createNode("helloworld.composite").start();
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite
new file mode 100644
index 0000000000..4dc3150697
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.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://itest"
+ name="HelloWorldComposite">
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.${bindingName} bindingType="ws" />
+ </service>
+ </component>
+
+ <component name="HelloWorldClient">
+ <implementation.java class="helloworld.HelloWorldClient"/>
+ <reference name="ref" >
+ <tuscany:binding.${bindingName} uri="HelloWorldComponent/HelloWorldService"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/archetype.properties b/sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/archetype.properties
new file mode 100644
index 0000000000..c5919ec925
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/archetype.properties
@@ -0,0 +1,6 @@
+#Sat Sep 04 08:10:22 BST 2010
+version=0.1-SNAPSHOT
+groupId=archetype.it
+artifactId=basic
+bindingName=Bar
+
diff --git a/sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/goal.txt b/sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/goal.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/sca-java-2.x/trunk/archetypes/binding/src/test/resources/projects/basic/goal.txt