tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1100203 - in /tuscany/sandbox/slaws/domain-view: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/ src/main/java/org/apache/tuscany/sca/dom...
Date Fri, 06 May 2011 13:24:18 GMT
Author: slaws
Date: Fri May  6 13:24:17 2011
New Revision: 1100203

URL: http://svn.apache.org/viewvc?rev=1100203&view=rev
Log:
hacks to help me think about what domain info is missing at the moment

Added:
    tuscany/sandbox/slaws/domain-view/   (with props)
    tuscany/sandbox/slaws/domain-view/build.xml
    tuscany/sandbox/slaws/domain-view/pom.xml
    tuscany/sandbox/slaws/domain-view/src/
    tuscany/sandbox/slaws/domain-view/src/main/
    tuscany/sandbox/slaws/domain-view/src/main/java/
    tuscany/sandbox/slaws/domain-view/src/main/java/org/
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Domain.java
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
    tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/impl/
    tuscany/sandbox/slaws/domain-view/src/main/resources/
    tuscany/sandbox/slaws/domain-view/src/main/resources/META-INF/
    tuscany/sandbox/slaws/domain-view/src/main/resources/META-INF/sca-contribution.xml
    tuscany/sandbox/slaws/domain-view/src/main/resources/domain.composite
    tuscany/sandbox/slaws/domain-view/src/test/
    tuscany/sandbox/slaws/domain-view/src/test/java/
    tuscany/sandbox/slaws/domain-view/src/test/resources/
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-client-contribution.jar
  (with props)
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-iface-contribution.jar
  (with props)
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-service-contribution.jar
  (with props)
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeClient/
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeClient/node.xml
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeService/
    tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeService/node.xml

Propchange: tuscany/sandbox/slaws/domain-view/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May  6 13:24:17 2011
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target

Added: tuscany/sandbox/slaws/domain-view/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/build.xml?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/build.xml (added)
+++ tuscany/sandbox/slaws/domain-view/build.xml Fri May  6 13:24:17 2011
@@ -0,0 +1,54 @@
+<!--
+ * 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 name="itest-nodes-two-jvms-hazelcast" default="run">
+	
+    <target name="run"> 
+       <parallel failonany="true">          
+            
+            <!-- start a node that will be part of the domain -->
+            <java classpath="../../../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT.dir/tuscany-sca-2.0-SNAPSHOT/features/tuscany-sca-manifest.jar:./target/classes"
       
+                  classname="org.apache.tuscany.sca.impl.Tuscany"
+                  fork="true"
+                  failonerror="true">   
+                <arg value="domain1"/>
+                <arg value="nodeService"/>
+                <arg value="8088"/>
+            </java>            
+        
+            <sequential>         
+                <!-- give the first node a chance to start --> 
+                <sleep seconds="5"/>   
+                <!-- start a second node that automatically tries to call a service in
the first node -->            
+                <java classpath="../../../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT.dir/tuscany-sca-2.0-SNAPSHOT/features/tuscany-sca-manifest.jar:./target/classes"
       
+                      classname="org.apache.tuscany.sca.impl.Tuscany"
+                      fork="true"
+                      failonerror="true">   
+                    <arg value="domain1"/>
+                    <arg value="nodeClient"/>
+                </java> 
+                <!-- use a HTTP GET to ping the first node to tell it to stop -->
+                <get src="http://localhost:8088" 
+                     dest="target/deamon.txt"
+                     ignoreerrors="true"/>
+            </sequential>
+
+       </parallel>         
+    </target>
+
+</project>

Added: tuscany/sandbox/slaws/domain-view/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/pom.xml?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/pom.xml (added)
+++ tuscany/sandbox/slaws/domain-view/pom.xml Fri May  6 13:24:17 2011
@@ -0,0 +1,102 @@
+<?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-itest</artifactId>
+        <version>2.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>domain-view</artifactId>
+    <name>Apache Tuscany SCA Domain View</name>
+
+    <dependencies>    
+        <!-- runtime --> 
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-base-runtime-pom</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-sca-runtime</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>       
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-rest-runtime</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>         
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-jetty</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>   
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-domain-hazelcast</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>        
+
+        <!-- test artifacts -->
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>itest-nodes-helloworld-iface</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+                            
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>run-samples</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks unless="maven.test.skip"> 
+                                <property name="tuscany.version" value="${project.version}"
/>
+                                <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+                                <ant antfile="./build.xml" target="run"/>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>    
+</project>

Added: tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Domain.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Domain.java?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Domain.java
(added)
+++ tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Domain.java
Fri May  6 13:24:17 2011
@@ -0,0 +1,145 @@
+/*
+ * 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.domain.interop;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLConnection;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+import org.oasisopen.sca.annotation.Service;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * Some hand crafted HTTP code to help me think about what info is missing
+ * from the domain ragistry
+ *  
+ */
+@Service(Domain.class)
+public class Domain implements Servlet {
+    public String getDomainComposite(){
+        NodeImpl node = (NodeImpl)Tuscany.node;
+        String domainComposite = node.dumpDomainComposite();
+        return domainComposite;
+    }
+    
+    public String getComponent(){
+        NodeImpl node = (NodeImpl)Tuscany.node;
+        String domainComposite = node.dumpDomainComposite();
+        return domainComposite;
+    }    
+    
+    public void init(ServletConfig config) throws ServletException {
+    }
+
+    public void service(ServletRequest request, ServletResponse response) throws ServletException,
IOException {
+        HttpServletRequest httpRequest = (HttpServletRequest)request;
+        ServletOutputStream os = response.getOutputStream();
+        
+        String pathInfo = httpRequest.getPathInfo();
+        
+        if (pathInfo == null || pathInfo.length() < 1){
+            os.print("<html><body><p>URL should include at least a domain
name, e.g. http://localhost/sca/mydomain</body></html>");
+            return;
+        }
+        
+        pathInfo = pathInfo.substring(1);
+        String[] pathElements = pathInfo.split("/");
+        
+        String domainName = pathElements[0];
+        String action = "none";
+        
+        if (pathElements.length == 2){
+            action = pathElements[1];
+        }
+        
+        // Just some hand crafted code to help me visualize resources
+        os.print("<html><body>");
+        
+        if ( action.equals("composite")){
+            String domainComposite = getDomainComposite();
+            domainComposite = domainComposite.replaceAll("<", "&lt;");
+            domainComposite = domainComposite.replaceAll(">", "&gt;");
+            os.print("<html><body><p>" + domainComposite + "</body></html>");
+            return;
+        } else {       
+            try {
+                File domainDir = new File("target/test-classes/" + domainName);
+                
+                URI domainDirURI = domainDir.toURI();
+                URI domainResourceURI = domainDirURI.resolve(pathInfo);
+                
+                os.print("<p/>contributions");
+                
+                for (File subDir : domainDir.listFiles()){
+                    if (!subDir.isDirectory()){
+                        os.print("<p/><a href=\"" + subDir.toURI().toString() +
"\">" + subDir.getName());
+                    }
+                }
+                
+                os.print("<p/>nodes");
+                os.print("<p/><a href=\"" + domainName + "/composite\">domainComposite</a>");
+                
+                os.print("</body></html>");
+                           
+                return;
+            } catch (Exception ex){
+                ex.printStackTrace();
+            }
+        }
+        
+        os.print("<html><body><p>no processing</body></html>");
+        
+    }
+
+    public void destroy() {
+    }
+
+    public ServletConfig getServletConfig() {
+        return null;
+    }
+
+    public String getServletInfo() {
+        return null;
+    }
+    
+    public void writeResource(ServletOutputStream os, URL url) throws Exception {
+        URLConnection connection = url.openConnection();
+        connection.setUseCaches(false);
+        
+        InputStream is = connection.getInputStream();
+        int aChar;
+        while(( aChar = is.read()) != -1){
+            os.write(aChar);
+        }
+    }
+       
+}
\ No newline at end of file

Added: tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
(added)
+++ tuscany/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
Fri May  6 13:24:17 2011
@@ -0,0 +1,152 @@
+/*
+ * 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.domain.interop;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URL;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Main class for Tuscany. Just looking at what it means to read config from a directory
structure. 
+ *  
+ */
+public class Tuscany {
+    
+    public static Node node = null;
+    private static Node domain = null;
+
+    public static void main(String[] args) throws Exception {
+        String domainName = args[0];
+        String nodeName = args[1];
+        int deamonPort = -1;
+        
+        if (args.length > 2){
+            deamonPort = Integer.parseInt(args[2]);
+        }
+        
+        // find the domain directory
+        File currentDirectory = new File(".");
+        File domainDirectory = findDirectory(currentDirectory, domainName);
+        System.out.println("Domain: " + domainDirectory.getPath());
+        
+        // find a sub directory that ends in nodeName
+        File nodeDirectory = findDirectory(currentDirectory, nodeName);
+        System.out.println("Node: " + nodeDirectory.getPath());
+        
+        // start a node with the node configuration
+/* don't know how to start the node using the following        
+        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+        Node node = tuscanyRuntime.createNodeFromXML(nodeDirectory.getPath() + 
+                                                     File.separator + 
+                                                     "node.xml");
+*/
+        NodeFactory nodeFactory = NodeFactory.newInstance();
+        
+        // temporarily use the Tuscany runtime to expose domain services
+        // for looking at the domain in a RESTful way. Replace with more 
+        // integrated code!
+        domain = nodeFactory.createNode(new Contribution("domain", "target/classes"));
+        domain.start();
+        
+        URL nodeConfigURL = nodeDirectory.toURI().resolve("node.xml").toURL();
+        node = nodeFactory.createNode(nodeConfigURL);
+      
+        
+        try {
+            node.start();
+            
+            // Use ? to provide web access to the domain details. 
+            
+            // for testing we're going to set up a deamon that listens for 
+            // a shutdown message on a specified port (well it actually just 
+            // waits for a client to connect to the port as that's all we need
+            // for now). If no port is specified then just stop straight away
+            
+            if (deamonPort >= 0){
+                // Its a runtime that has to act as a deamon
+                ServerSocket serverSocket = null;
+                    
+                try {
+                    serverSocket = new ServerSocket(deamonPort);
+                } catch (IOException e) {
+                    System.out.println("Can't create a ServerSocket on port: " + deamonPort);
+                    return;
+                }
+                
+                // all we're doing here is waiting for a connection. If we wanted to implement
+                // a real deamon we should perhaps listen to what's coming in over the resulting
socket
+                // and see if a shutdown has been requested
+                Socket clientSocket = null;
+                try {
+                    clientSocket = serverSocket.accept();
+                } catch (IOException e) {
+                    System.out.println("Accept failed on port: " + deamonPort);
+                    return;
+                }
+            } 
+        
+        } finally {
+            node.stop();
+            domain.stop();
+        }
+    }
+    
+    /**
+     * Just walks down the tree (depth first) looking for a directory ending in the  
+     * name. 
+     */
+    private static File findDirectory(File currentDirectory, String name){
+        File directory = null;
+        
+        if (currentDirectory.getPath().endsWith(name)){
+            directory = currentDirectory;
+        } else {
+            File[] subDirectories = currentDirectory.listFiles(new DirectoryFilter());
+            for (File aDirectory : subDirectories) {
+                directory = findDirectory(aDirectory, name);
+                
+                if (directory != null){
+                    break;
+                }
+            }
+        }
+        
+        return directory;
+    }
+    
+    private static class DirectoryFilter implements FilenameFilter {
+
+        public boolean accept(File dir, String name) {
+            if(new File(dir, name).isDirectory()) {
+                return true;
+            }
+            
+            return false;
+        }
+    }
+      
+}
\ No newline at end of file

Added: tuscany/sandbox/slaws/domain-view/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/main/resources/META-INF/sca-contribution.xml?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/sandbox/slaws/domain-view/src/main/resources/META-INF/sca-contribution.xml Fri
May  6 13:24:17 2011
@@ -0,0 +1,25 @@
+<?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.    
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+              xmlns:sample="http://sample">
+   
+   <deployable composite="sample:domain-composite" />
+
+</contribution>

Added: tuscany/sandbox/slaws/domain-view/src/main/resources/domain.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/main/resources/domain.composite?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/src/main/resources/domain.composite (added)
+++ tuscany/sandbox/slaws/domain-view/src/main/resources/domain.composite Fri May  6 13:24:17
2011
@@ -0,0 +1,32 @@
+<?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://sample"
+           name="domain-composite">
+
+    <component name="Domain">
+        <implementation.java class="org.apache.tuscany.sca.domain.interop.Domain"/>
+        <service name="Domain">
+            <tuscany:binding.rest uri="http://localhost:8085/sca"/>
+        </service>
+    </component>
+
+</composite>

Added: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-client-contribution.jar
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-client-contribution.jar?rev=1100203&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-client-contribution.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-iface-contribution.jar
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-iface-contribution.jar?rev=1100203&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-iface-contribution.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-service-contribution.jar
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-service-contribution.jar?rev=1100203&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/helloworld-service-contribution.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeClient/node.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeClient/node.xml?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeClient/node.xml (added)
+++ tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeClient/node.xml Fri May
 6 13:24:17 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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+    xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+    uri="http://sample/nodes/node1"
+    domain="default"
+    domainRegistry="tuscany:default">
+
+    <!-- Configure the base URIs for a given binding -->
+    <!-- Each base URI is for a protocol supported by the binding -->
+    <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+    <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+    <!-- Configure a list of contributions -->
+    <contribution uri="iface" location="../helloworld-iface-contribution.jar"/>
+    <contribution uri="client" location="../helloworld-client-contribution.jar">
+        <!-- doesn't pick up the deployable composite properly without this?-->
+        <deploymentComposite location="helloworld-client.composite"/>
+    </contribution>
+
+</node>
\ No newline at end of file

Added: tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeService/node.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeService/node.xml?rev=1100203&view=auto
==============================================================================
--- tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeService/node.xml (added)
+++ tuscany/sandbox/slaws/domain-view/src/test/resources/domain1/nodeService/node.xml Fri
May  6 13:24:17 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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+    xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+    uri="http://sample/nodes/TestNode3"
+    domain="default"  
+    domainRegistry="tuscany:default?listen=127.0.0.1:14820">   
+
+    <!-- Configure the base URIs for a given binding -->
+    <!-- Each base URI is for a protocol supported by the binding -->
+    <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+    <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+    <!-- Configure a list of contributions -->
+    <contribution uri="iface" location="../helloworld-iface-contribution.jar"/>
+    <contribution uri="service" location="../helloworld-service-contribution.jar">
+        <!-- doesn't pick up the deployable composite properly without this?-->
+        <deploymentComposite location="helloworld-service.composite"/>
+    </contribution>
+
+</node>
\ No newline at end of file



Mime
View raw message