tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1003421 - in /tuscany/sca-java-2.x/trunk/samples/extending-tuscany: ./ binding-sample/ binding-sample/META-INF/ binding-sample/src/ binding-sample/src/main/ binding-sample/src/main/java/ binding-sample/src/main/java/sample/ binding-sample/...
Date Fri, 01 Oct 2010 07:56:19 GMT
Author: antelder
Date: Fri Oct  1 07:56:18 2010
New Revision: 1003421

URL: http://svn.apache.org/viewvc?rev=1003421&view=rev
Log:
Add a binding extension sample

Added:
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/META-INF/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/META-INF/MANIFEST.MF
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/pom.xml   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBinding.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBindingFactory.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleBindingProviderFactory.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceBindingProvider.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceInvoker.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceBindingProvider.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceInvoker.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleStash.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/sample.binding.SampleBindingFactory
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/binding-sample.xsd   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldClient.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldImpl.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldService.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/SampleBindingTestCase.java   (with props)
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/resources/
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/resources/helloworld.composite
Modified:
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/pom.xml
    tuscany/sca-java-2.x/trunk/samples/extending-tuscany/pom.xml

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct  1 07:56:18 2010
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/META-INF/MANIFEST.MF?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/META-INF/MANIFEST.MF (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/META-INF/MANIFEST.MF Fri Oct  1 07:56:18 2010
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+SCA-Version: 1.1
+Bundle-Name: Apache Tuscany SCA Sample 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 Sample 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.sample
+Bundle-DocURL: http://www.apache.org/
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/pom.xml?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/pom.xml (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/pom.xml Fri Oct  1 07:56:18 2010
@@ -0,0 +1,92 @@
+<?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-samples</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>binding-sample</artifactId>
+    <name>Apache Tuscany SCA Sample Binding Extension</name>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-assembly-xml</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-http</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </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>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+</project>

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBinding.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBinding.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBinding.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBinding.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,49 @@
+/*
+ * 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 sample.binding;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.provider.BaseBindingImpl;
+
+/**
+ * Represents a binding to a Sample service.
+ */
+public class SampleBinding extends BaseBindingImpl {
+
+    public static final QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.sample");
+
+    private String someAttr;
+
+    public SampleBinding() {
+    }
+
+    public QName getType() {
+        return TYPE;
+    }
+    
+    public String getSomeAttr() {
+        return someAttr;
+    }
+
+    public void setSomeAttr(String someAttr) {
+        this.someAttr = someAttr;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBindingFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBindingFactory.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBindingFactory.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBindingFactory.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,32 @@
+/*
+ * 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 sample.binding;
+
+
+/**
+ * Factory implementation to create Sample Models
+ */
+public class SampleBindingFactory {
+
+    public SampleBinding createSampleBinding() {
+        return new SampleBinding();
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBindingFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/SampleBindingFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleBindingProviderFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleBindingProviderFactory.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleBindingProviderFactory.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleBindingProviderFactory.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,47 @@
+/*
+ * 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 sample.binding.runtime;
+
+import sample.binding.SampleBinding;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.provider.BindingProviderFactory;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+
+public class SampleBindingProviderFactory implements BindingProviderFactory<SampleBinding> {
+
+    public SampleBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+    }
+
+    public Class<SampleBinding> getModelType() {
+        return SampleBinding.class;
+    }
+
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) {
+        return new SampleReferenceBindingProvider(endpoint);
+    }
+
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
+        return new SampleServiceBindingProvider(endpoint);
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleBindingProviderFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleBindingProviderFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceBindingProvider.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceBindingProvider.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceBindingProvider.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,55 @@
+/*
+ * 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 sample.binding.runtime;
+
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+
+public class SampleReferenceBindingProvider implements ReferenceBindingProvider {
+
+    private EndpointReference endpoint;
+    private InterfaceContract contract;
+
+    public SampleReferenceBindingProvider(EndpointReference endpoint) {
+        this.endpoint = endpoint;
+    }
+    
+    public Invoker createInvoker(Operation operation) {
+        return new SampleReferenceInvoker(operation, endpoint);
+    }
+
+    public void start() {
+    }
+
+    public void stop() {
+    }
+
+    public InterfaceContract getBindingInterfaceContract() {
+        return contract;
+    }
+
+    public boolean supportsOneWayInvocation() {
+        return false;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceBindingProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceBindingProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceInvoker.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceInvoker.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceInvoker.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,53 @@
+/*
+ * 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 sample.binding.runtime;
+
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+
+public class SampleReferenceInvoker implements Invoker {
+    
+    protected Operation operation;
+    protected EndpointReference endpoint;
+
+    public SampleReferenceInvoker(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 Sample binding protocol
+        // For this sample we'll just get it from the static stash
+        SampleServiceInvoker fi = SampleStash.getService(endpoint.getBinding().getURI());
+        return fi.invokeService(msg);
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleReferenceInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceBindingProvider.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceBindingProvider.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceBindingProvider.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,57 @@
+/*
+ * 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 sample.binding.runtime;
+
+import sample.binding.SampleBinding;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+public class SampleServiceBindingProvider implements ServiceBindingProvider {
+
+    private RuntimeEndpoint endpoint;
+    private InterfaceContract contract;
+
+    public SampleServiceBindingProvider(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
+        SampleStash.addService(endpoint.getBinding().getURI(), new SampleServiceInvoker(endpoint));
+        
+        System.out.println("someAttr=" + ((SampleBinding)endpoint.getBinding()).getSomeAttr());
+    }
+
+    public void stop() {
+        SampleStash.removeService(endpoint.getBinding().getURI());
+    }
+
+    public InterfaceContract getBindingInterfaceContract() {
+        return contract;
+    }
+
+    public boolean supportsOneWayInvocation() {
+        return false;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceBindingProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceBindingProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceInvoker.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceInvoker.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceInvoker.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,40 @@
+/*
+ * 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 sample.binding.runtime;
+
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+public class SampleServiceInvoker {
+
+    private RuntimeEndpoint wire;
+    
+    public SampleServiceInvoker(RuntimeEndpoint wire) {
+        this.wire = wire;
+    }
+
+    /**
+     * Send the request down the wire to invoke the service 
+     */
+    public Message invokeService(Message msg) {
+        return wire.invoke(msg);
+    }
+    
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleServiceInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleStash.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleStash.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleStash.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleStash.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,44 @@
+/*
+ * 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 sample.binding.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Simplistic static Map to share service endpoints with references
+ */
+public class SampleStash {
+    
+    private static Map<String, SampleServiceInvoker> services = new HashMap<String, SampleServiceInvoker>();
+    
+    public static void addService(String uri, SampleServiceInvoker SampleServiceInvoker) {
+        services.put(uri, SampleServiceInvoker);
+    }
+
+    public static SampleServiceInvoker getService(String uri) {
+        return services.get(uri);
+    }
+
+    public static void removeService(String uri) {
+        services.remove(uri);
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleStash.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/java/sample/binding/runtime/SampleStash.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor Fri Oct  1 07:56:18 2010
@@ -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.sample,model=sample.binding.SampleBinding,factory=sample.binding.SampleBindingFactory
+

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema Fri Oct  1 07:56:18 2010
@@ -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-sample.xsd
+

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory Fri Oct  1 07:56:18 2010
@@ -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
+sample.binding.runtime.SampleBindingProviderFactory;model=sample.binding.SampleBinding
+

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/sample.binding.SampleBindingFactory
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/sample.binding.SampleBindingFactory?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/sample.binding.SampleBindingFactory (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/META-INF/services/sample.binding.SampleBindingFactory Fri Oct  1 07:56:18 2010
@@ -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
+sample.binding.SampleBindingFactory
+

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/binding-sample.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/binding-sample.xsd?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/binding-sample.xsd (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/binding-sample.xsd Fri Oct  1 07:56:18 2010
@@ -0,0 +1,37 @@
+<?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.sample" type="t:SampleBinding" substitutionGroup="sca:binding"/>
+    
+    <complexType name="SampleBinding">
+        <complexContent>
+            <extension base="sca:Binding">
+                <attribute name="someAttr" type="string" use="optional"/>
+            </extension>
+        </complexContent>
+    </complexType>
+</schema>

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/binding-sample.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/main/resources/binding-sample.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldClient.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldClient.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldClient.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,33 @@
+/*
+ * 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);
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldImpl.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldImpl.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,28 @@
+/*
+ * 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;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldService.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldService.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldService.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,28 @@
+/*
+ * 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);
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/SampleBindingTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/SampleBindingTestCase.java?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/SampleBindingTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/SampleBindingTestCase.java Fri Oct  1 07:56:18 2010
@@ -0,0 +1,52 @@
+/*
+ * 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 org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class SampleBindingTestCase {
+
+    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 {
+        node = NodeFactory.newInstance().createNode("helloworld.composite").start();
+    }
+    
+    @AfterClass
+    public static void destroy() throws Exception {
+        if (node != null) {
+            node.stop();
+        }
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/SampleBindingTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/java/test/SampleBindingTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/resources/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/resources/helloworld.composite?rev=1003421&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/resources/helloworld.composite (added)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/binding-sample/src/test/resources/helloworld.composite Fri Oct  1 07:56:18 2010
@@ -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.sample someAttr="bla" />
+        </service>
+    </component>   
+  
+    <component name="HelloWorldClient">
+        <implementation.java class="helloworld.HelloWorldClient"/>
+        <reference name="ref" >
+            <tuscany:binding.sample uri="HelloWorldComponent/HelloWorldService"/>
+        </reference>
+    </component>   
+
+</composite>

Modified: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/pom.xml?rev=1003421&r1=1003420&r2=1003421&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/implementation-sample/pom.xml Fri Oct  1 07:56:18 2010
@@ -1,79 +1,79 @@
-<?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-samples</artifactId>
-        <version>2.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <artifactId>sample-implementation-extension</artifactId>
-    <name>Apache Tuscany SCA Sample Implementation Extension</name>
-    <packaging>jar</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-feature-api</artifactId>
-            <type>pom</type>
-            <version>2.0-SNAPSHOT</version>
-        </dependency>  
-        
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-feature-core</artifactId>
-            <type>pom</type>
-            <version>2.0-SNAPSHOT</version>
-        </dependency> 
-        
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-feature-webservice</artifactId>
-            <type>pom</type>
-            <version>2.0-SNAPSHOT</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-feature-web20</artifactId>
-            <type>pom</type>
-            <version>2.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-host-webapp</artifactId>
-            <version>2.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.1</version>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-       <finalName>${artifactId}</finalName>
-    </build>
-</project>
+<?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-samples</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>sample-implementation-extension</artifactId>
+    <name>Apache Tuscany SCA Sample Implementation Extension</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-feature-api</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>  
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-feature-core</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency> 
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-feature-webservice</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-feature-web20</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-webapp</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+</project>

Modified: tuscany/sca-java-2.x/trunk/samples/extending-tuscany/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/extending-tuscany/pom.xml?rev=1003421&r1=1003420&r2=1003421&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/extending-tuscany/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/samples/extending-tuscany/pom.xml Fri Oct  1 07:56:18 2010
@@ -25,9 +25,8 @@
         <version>2.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <groupId>org.apache.tuscany.sca</groupId>
+
     <artifactId>tuscany-samples-extending-tuscany</artifactId>
-    <version>2.0-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache Tuscany SCA Extending Tuscany Samples</name>
 
@@ -38,8 +37,10 @@
                 <activeByDefault>true</activeByDefault>
             </activation>
             <modules>
+                <module>binding-sample</module>
                 <module>implementation-sample</module>
             </modules>
         </profile>
     </profiles>    
-</project>
+
+</project>
\ No newline at end of file



Mime
View raw message