summaryrefslogtreecommitdiffstats
path: root/java/sca/samples/chat2-webapp/src/main
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-01-31 05:27:28 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-01-31 05:27:28 +0000
commit8147a9a796ff3530d407c8ed4421efae5515fa71 (patch)
treea4806c7fc37053b699e82fe35022672930f93fbe /java/sca/samples/chat2-webapp/src/main
parent2e16e42d5efbe40ef3f606c22d9494d892394d46 (diff)
Moving samples that are not part of the main build to contrib folder
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@739507 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/samples/chat2-webapp/src/main')
-rw-r--r--java/sca/samples/chat2-webapp/src/main/java/sample/ChatCallback.java27
-rw-r--r--java/sca/samples/chat2-webapp/src/main/java/sample/ChatService.java32
-rw-r--r--java/sca/samples/chat2-webapp/src/main/java/sample/ChatServiceImpl.java36
-rw-r--r--java/sca/samples/chat2-webapp/src/main/resources/chat.composite40
-rw-r--r--java/sca/samples/chat2-webapp/src/main/webapp/META-INF/sca-contribution.xml24
-rw-r--r--java/sca/samples/chat2-webapp/src/main/webapp/WEB-INF/web.xml37
-rw-r--r--java/sca/samples/chat2-webapp/src/main/webapp/chat.html73
7 files changed, 0 insertions, 269 deletions
diff --git a/java/sca/samples/chat2-webapp/src/main/java/sample/ChatCallback.java b/java/sca/samples/chat2-webapp/src/main/java/sample/ChatCallback.java
deleted file mode 100644
index 261eb12124..0000000000
--- a/java/sca/samples/chat2-webapp/src/main/java/sample/ChatCallback.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface ChatCallback {
- void newMsg(String msg);
-}
diff --git a/java/sca/samples/chat2-webapp/src/main/java/sample/ChatService.java b/java/sca/samples/chat2-webapp/src/main/java/sample/ChatService.java
deleted file mode 100644
index a5aff8f316..0000000000
--- a/java/sca/samples/chat2-webapp/src/main/java/sample/ChatService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed 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;
-
-import javax.jws.Oneway;
-
-import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.Remotable;
-import org.oasisopen.sca.annotation.Scope;
-
-@Remotable
-@Scope("COMPOSITE")
-@Callback(ChatCallback.class)
-public interface ChatService {
-
- @Oneway
- public void addMsg(String msg);
-}
diff --git a/java/sca/samples/chat2-webapp/src/main/java/sample/ChatServiceImpl.java b/java/sca/samples/chat2-webapp/src/main/java/sample/ChatServiceImpl.java
deleted file mode 100644
index fd22fb70e8..0000000000
--- a/java/sca/samples/chat2-webapp/src/main/java/sample/ChatServiceImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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;
-
-import org.oasisopen.sca.annotation.Callback;
-
-public class ChatServiceImpl implements ChatService {
-
- ChatCallback chatCallback;
-
- @Callback
- public void setCallback(ChatCallback chatCallback) {
- this.chatCallback = chatCallback;
- }
-
- public void addMsg(String msg) {
- chatCallback.newMsg(msg);
- }
-}
diff --git a/java/sca/samples/chat2-webapp/src/main/resources/chat.composite b/java/sca/samples/chat2-webapp/src/main/resources/chat.composite
deleted file mode 100644
index 93a10d0fdf..0000000000
--- a/java/sca/samples/chat2-webapp/src/main/resources/chat.composite
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0"
- xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample"
- name="Chat">
-
- <component name="webapp">
- <t:implementation.web war="." />
- <reference name="ChatService" target="ChatService">
- <t:binding.dwr/>
- </reference>
- </component>
-
- <component name="ChatService">
- <implementation.java class="sample.ChatServiceImpl"/>
- <service name="ChatService">
- <t:binding.dwr/>
- </service>
- </component>
-
-</composite>
diff --git a/java/sca/samples/chat2-webapp/src/main/webapp/META-INF/sca-contribution.xml b/java/sca/samples/chat2-webapp/src/main/webapp/META-INF/sca-contribution.xml
deleted file mode 100644
index 897849ff8d..0000000000
--- a/java/sca/samples/chat2-webapp/src/main/webapp/META-INF/sca-contribution.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://sample"
- xmlns:sample="http://sample">
- <deployable composite="sample:Chat"/>
-</contribution> \ No newline at end of file
diff --git a/java/sca/samples/chat2-webapp/src/main/webapp/WEB-INF/web.xml b/java/sca/samples/chat2-webapp/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 6919372e87..0000000000
--- a/java/sca/samples/chat2-webapp/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- Licensed 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.
- -->
-
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
-Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
- <display-name>Apache Tuscany AJAX/DWR Chat Sample</display-name>
-
- <filter>
- <filter-name>tuscany</filter-name>
- <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>tuscany</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <welcome-file-list>
- <welcome-file>chat.jsp</welcome-file>
- </welcome-file-list>
-
-</web-app>
diff --git a/java/sca/samples/chat2-webapp/src/main/webapp/chat.html b/java/sca/samples/chat2-webapp/src/main/webapp/chat.html
deleted file mode 100644
index a063e27f8e..0000000000
--- a/java/sca/samples/chat2-webapp/src/main/webapp/chat.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!--
- * 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.
--->
-<html>
- <head>
- <title>Apache Tuscany Ajax/DWR Chat Sample</TITLE>
-
- <script type="text/javascript" src="org.apache.tuscany.sca.componentContext.js" />
-
- <script language="JavaScript">
-
- var chatService = componentContext.getService("ChatService");
-
- chatService.callbacks.chatResponse = function(msg) {
- var chatLog = document.getElementById('chatLog');
- chatLog.innerHTML = msg + '<br>' + chatLog.innerHTML;
- }
-
- function sendChat() {
- var chatText = document.getElementById("chatText");
- var nickName = document.getElementById("nickName").value;
- var msg = nickName + ": " + chatText.value
- chatText.value = "";
- chatText.focus();
- ChatService.addMsg(msg);
- }
-
- function clickButton(e, buttonid){
- var evt = e ? e : window.event;
- var bt = document.getElementById(buttonid);
- if (bt){
- if (evt.keyCode == 13){
- bt.click();
- return false;
- }
- }
- }
-
- </script>
-
- </head>
- <body >
-
- <h2>Apache Tuscany Ajax/DWR Chat Sample</h2>
-
- A simple client to chat between multiple web browsers:<br><br>
-
- Nickname: <input type="text" id="nickName" size="10"/>
- <br><br>
-
- Enter text: <input type="text" id="chatText" size="80" onkeypress="return clickButton(event,'Send')"/>
- <input type="button" name="Send" value="Send" id="Send" onclick="sendChat()" />
-
- <br><br>
- <div id="chatLog" style="overflow:auto; height:400px; border:1px solid"></div>
-
- </body>
-</html>