tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fm...@apache.org
Subject svn commit: r1143410 - in /tuscany/sca-java-2.x/contrib/modules/binding-websocket: ./ META-INF/ monsoon-repo/ monsoon-repo/org/ monsoon-repo/org/apache/ monsoon-repo/org/apache/websocket/ monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/ src/ src/main/...
Date Wed, 06 Jul 2011 13:45:45 GMT
Author: fmoga
Date: Wed Jul  6 13:45:43 2011
New Revision: 1143410

URL: http://svn.apache.org/viewvc?rev=1143410&view=rev
Log:
Add scaffolded websocket binding code using Monsoon from filesystem Maven repo.

Added:
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/META-INF/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/META-INF/MANIFEST.MF
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/maven-metadata-local.xml
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.jar   (with props)
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.pom
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/maven-metadata-local.xml
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/pom.xml
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBinding.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBindingFactory.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketBindingProviderFactory.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceBindingProvider.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceInvoker.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceBindingProvider.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceInvoker.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.websocket.WebsocketBindingFactory
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/binding-websocket.xsd
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldClient.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldImpl.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldService.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/test/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/test/WebsocketBindingTestCase.java
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/resources/
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/resources/helloworld.composite
Modified:
    tuscany/sca-java-2.x/contrib/modules/binding-websocket/   (props changed)

Propchange: tuscany/sca-java-2.x/contrib/modules/binding-websocket/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jul  6 13:45:43 2011
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/META-INF/MANIFEST.MF?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/META-INF/MANIFEST.MF (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/META-INF/MANIFEST.MF Wed Jul  6 13:45:43 2011
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+SCA-Version: 1.1
+Bundle-Name: Apache Tuscany SCA Websocket 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 Websocket 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.binding-websocket
+Bundle-DocURL: http://www.apache.org/
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/maven-metadata-local.xml?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/maven-metadata-local.xml (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/maven-metadata-local.xml Wed Jul  6 13:45:43 2011
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.apache</groupId>
+  <artifactId>websocket</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <localCopy>true</localCopy>
+    </snapshot>
+    <lastUpdated>20110706132527</lastUpdated>
+  </versioning>
+</metadata>

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.jar?rev=1143410&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.pom
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.pom?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.pom (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/0.0.1-SNAPSHOT/websocket-0.0.1-SNAPSHOT.pom Wed Jul  6 13:45:43 2011
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache</groupId>
+  <artifactId>websocket</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <description>POM was created from install:install-file</description>
+</project>

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/maven-metadata-local.xml?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/maven-metadata-local.xml (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/monsoon-repo/org/apache/websocket/maven-metadata-local.xml Wed Jul  6 13:45:43 2011
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.apache</groupId>
+  <artifactId>websocket</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <versioning>
+    <versions>
+      <version>0.0.1-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20110706132527</lastUpdated>
+  </versioning>
+</metadata>

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/pom.xml?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/pom.xml (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/pom.xml Wed Jul  6 13:45:43 2011
@@ -0,0 +1,67 @@
+<?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>
+
+    <groupId>org.apache.tuscany.sca</groupId>
+    <artifactId>tuscany-binding-websocket</artifactId>
+    <version>2.0-SNAPSHOT</version>
+    <name>Apache Tuscany SCA Websocket Binding Extension</name>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-base-runtime-pom</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache</groupId>
+            <artifactId>websocket</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+	<repositories>
+		<repository>
+			<id>monsoon-local</id>
+			<url>file://${basedir}/monsoon-repo</url>
+		</repository>
+	</repositories>
+
+</project>

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBinding.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBinding.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBinding.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBinding.java Wed Jul  6 13:45:43 2011
@@ -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 org.apache.tuscany.sca.binding.websocket;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.provider.BaseBindingImpl;
+
+/**
+ * Represents a binding to a Websocket service.
+ */
+public class WebsocketBinding extends BaseBindingImpl {
+
+    public static final QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.websocket");
+
+    public WebsocketBinding() {
+    }
+
+    @Override
+    public QName getType() {
+        return TYPE;
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBindingFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBindingFactory.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBindingFactory.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/WebsocketBindingFactory.java Wed Jul  6 13:45:43 2011
@@ -0,0 +1,31 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.websocket;
+
+/**
+ * Factory implementation to create Websocket Models
+ */
+public class WebsocketBindingFactory {
+
+    public WebsocketBinding createWebsocketBinding() {
+        return new WebsocketBinding();
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketBindingProviderFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketBindingProviderFactory.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketBindingProviderFactory.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketBindingProviderFactory.java Wed Jul  6 13:45:43 2011
@@ -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 org.apache.tuscany.sca.binding.websocket.runtime;
+
+import org.apache.tuscany.sca.binding.websocket.WebsocketBinding;
+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 WebsocketBindingProviderFactory implements BindingProviderFactory<WebsocketBinding> {
+
+    public WebsocketBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+    }
+
+    public Class<WebsocketBinding> getModelType() {
+        return WebsocketBinding.class;
+    }
+
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) {
+        return new WebsocketReferenceBindingProvider(endpoint);
+    }
+
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
+        return new WebsocketServiceBindingProvider(endpoint);
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceBindingProvider.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceBindingProvider.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceBindingProvider.java Wed Jul  6 13:45:43 2011
@@ -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 org.apache.tuscany.sca.binding.websocket.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 WebsocketReferenceBindingProvider implements ReferenceBindingProvider {
+
+    private EndpointReference endpoint;
+    private InterfaceContract contract;
+
+    public WebsocketReferenceBindingProvider(EndpointReference endpoint) {
+        this.endpoint = endpoint;
+    }
+    
+    public Invoker createInvoker(Operation operation) {
+        return new WebsocketReferenceInvoker(operation, endpoint);
+    }
+
+    public void start() {
+    }
+
+    public void stop() {
+    }
+
+    public InterfaceContract getBindingInterfaceContract() {
+        return contract;
+    }
+
+    public boolean supportsOneWayInvocation() {
+        return false;
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceInvoker.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceInvoker.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketReferenceInvoker.java Wed Jul  6 13:45:43 2011
@@ -0,0 +1,51 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.websocket.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 WebsocketReferenceInvoker implements Invoker {
+    
+    protected Operation operation;
+    protected EndpointReference endpoint;
+
+    public WebsocketReferenceInvoker(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) {
+        WebsocketServiceInvoker fi = WebsocketStash.getService(endpoint.getBinding().getURI());
+        return fi.invokeService(msg);
+    }
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceBindingProvider.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceBindingProvider.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceBindingProvider.java Wed Jul  6 13:45:43 2011
@@ -0,0 +1,51 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.websocket.runtime;
+
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+public class WebsocketServiceBindingProvider implements ServiceBindingProvider {
+
+    private RuntimeEndpoint endpoint;
+    private InterfaceContract contract;
+
+    public WebsocketServiceBindingProvider(RuntimeEndpoint endpoint) {
+        this.endpoint = endpoint;
+    }
+
+    public void start() {
+        WebsocketStash.addService(endpoint.getBinding().getURI(), new WebsocketServiceInvoker(endpoint));
+    }
+
+    public void stop() {
+        WebsocketStash.removeService(endpoint.getBinding().getURI());
+    }
+
+    public InterfaceContract getBindingInterfaceContract() {
+        return contract;
+    }
+
+    public boolean supportsOneWayInvocation() {
+        return false;
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceInvoker.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceInvoker.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketServiceInvoker.java Wed Jul  6 13:45:43 2011
@@ -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 org.apache.tuscany.sca.binding.websocket.runtime;
+
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+public class WebsocketServiceInvoker {
+
+    private RuntimeEndpoint wire;
+    
+    public WebsocketServiceInvoker(RuntimeEndpoint wire) {
+        this.wire = wire;
+    }
+
+    /**
+     * Send the request down the wire to invoke the service 
+     */
+    public Message invokeService(Message msg) {
+        return wire.invoke(msg);
+    }
+    
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java Wed Jul  6 13:45:43 2011
@@ -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 org.apache.tuscany.sca.binding.websocket.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Simplistic static Map to share service endpoints with references
+ */
+public class WebsocketStash {
+    
+    private static Map<String, WebsocketServiceInvoker> services = new HashMap<String, WebsocketServiceInvoker>();
+    
+    public static void addService(String uri, WebsocketServiceInvoker WebsocketServiceInvoker) {
+        services.put(uri, WebsocketServiceInvoker);
+    }
+
+    public static WebsocketServiceInvoker getService(String uri) {
+        return services.get(uri);
+    }
+
+    public static void removeService(String uri) {
+        services.remove(uri);
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.websocket.WebsocketBindingFactory
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.websocket.WebsocketBindingFactory?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.websocket.WebsocketBindingFactory (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.websocket.WebsocketBindingFactory Wed Jul  6 13:45:43 2011
@@ -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.websocket.WebsocketBindingFactory
+

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor Wed Jul  6 13:45:43 2011
@@ -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.websocket,model=org.apache.tuscany.sca.binding.websocket.WebsocketBinding,factory=org.apache.tuscany.sca.binding.websocket.WebsocketBindingFactory
+

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema Wed Jul  6 13:45:43 2011
@@ -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-websocket.xsd
+

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory Wed Jul  6 13:45:43 2011
@@ -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
+org.apache.tuscany.sca.binding.websocket.runtime.WebsocketBindingProviderFactory;model=org.apache.tuscany.sca.binding.websocket.WebsocketBinding
+

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/binding-websocket.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/binding-websocket.xsd?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/binding-websocket.xsd (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/binding-websocket.xsd Wed Jul  6 13:45:43 2011
@@ -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.websocket" type="t:WebsocketBinding" substitutionGroup="sca:binding"/>
+    
+    <complexType name="WebsocketBinding">
+        <complexContent>
+            <extension base="sca:Binding">
+                <attribute name="someAttr" type="string" use="optional"/>
+            </extension>
+        </complexContent>
+    </complexType>
+</schema>

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldClient.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldClient.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldClient.java Wed Jul  6 13:45:43 2011
@@ -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);
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldImpl.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldImpl.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldImpl.java Wed Jul  6 13:45:43 2011
@@ -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;
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldService.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldService.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/helloworld/HelloWorldService.java Wed Jul  6 13:45:43 2011
@@ -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);
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/test/WebsocketBindingTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/test/WebsocketBindingTestCase.java?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/test/WebsocketBindingTestCase.java (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/java/test/WebsocketBindingTestCase.java Wed Jul  6 13:45:43 2011
@@ -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 WebsocketBindingTestCase {
+
+    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();
+        }
+    }
+
+}

Added: tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/resources/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/resources/helloworld.composite?rev=1143410&view=auto
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/resources/helloworld.composite (added)
+++ tuscany/sca-java-2.x/contrib/modules/binding-websocket/src/test/resources/helloworld.composite Wed Jul  6 13:45:43 2011
@@ -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.websocket />
+        </service>
+    </component>   
+  
+    <component name="HelloWorldClient">
+        <implementation.java class="helloworld.HelloWorldClient"/>
+        <reference name="ref" >
+            <tuscany:binding.websocket uri="HelloWorldComponent/HelloWorldService"/>
+        </reference>
+    </component>   
+
+</composite>



Mime
View raw message