summaryrefslogtreecommitdiffstats
path: root/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src
diff options
context:
space:
mode:
authordims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
committerdims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
commitbdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch)
tree38a92061c0793434c4be189f1d70c3458b6bc41d /tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src')
-rw-r--r--tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterImpl.java31
-rw-r--r--tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterService.java31
-rw-r--r--tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/resources/wsdl/greeter.wsdl64
-rw-r--r--tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/default.scdl40
-rw-r--r--tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/web.xml42
5 files changed, 208 insertions, 0 deletions
diff --git a/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterImpl.java b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterImpl.java
new file mode 100644
index 0000000000..16cd96dbe3
--- /dev/null
+++ b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterImpl.java
@@ -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 greeter;
+
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(GreeterService.class)
+@Scope("MODULE")
+public class GreeterImpl implements GreeterService {
+
+ public void greet(String name) {
+ System.out.println("Hello " + name);
+ }
+}
diff --git a/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterService.java b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterService.java
new file mode 100644
index 0000000000..fef29e17e5
--- /dev/null
+++ b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/java/greeter/GreeterService.java
@@ -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 greeter;
+
+import org.osoa.sca.annotations.OneWay;
+import org.osoa.sca.annotations.Remotable;
+import org.osoa.sca.annotations.Service;
+
+@Remotable
+@Service
+public interface GreeterService {
+
+ @OneWay
+ public void greet(String name);
+}
diff --git a/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/resources/wsdl/greeter.wsdl b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/resources/wsdl/greeter.wsdl
new file mode 100644
index 0000000000..f96b24bae6
--- /dev/null
+++ b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/resources/wsdl/greeter.wsdl
@@ -0,0 +1,64 @@
+<?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.
+-->
+<wsdl:definitions targetNamespace="http://greeter" xmlns:tns="http://greeter" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="greeter">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://greeter" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="greet">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string" />
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="greetRequest">
+ <wsdl:part element="tns:greet" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="Greeter">
+ <wsdl:operation name="greet">
+ <wsdl:input message="tns:greetRequest" name="greetRequest" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="GreeterSoapBinding" type="tns:Greeter">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="greet">
+ <wsdlsoap:operation soapAction="greet" />
+ <wsdl:input name="greetRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="GreeterService">
+ <wsdl:port binding="tns:GreeterSoapBinding" name="GreeterSoapPort">
+ <wsdlsoap:address
+ location="http://localhost:8080/sample-greeterws-oneway-1.0-incubator-M2/services/GreeterWebService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/default.scdl b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/default.scdl
new file mode 100644
index 0000000000..b1dbb078c6
--- /dev/null
+++ b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/default.scdl
@@ -0,0 +1,40 @@
+<?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:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ name="greeterws">
+
+ <service name="GreeterWebService" target="http:///foo">
+ <interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ interface="http://greeter#wsdl.interface(Greeter)"
+ wsdli:wsdlLocation="http://greeter wsdl/greeter.wsdl" />
+
+ <!--FIXME the location attribute is a really bad hack here! does not follow to spec at all
+ -->
+ <binding.ws endpoint="http://greeter#wsdl.endpoint(GreeterService/GreeterSoapPort)"
+ conformanceURIs="http://ws-i.org/profiles/basic/1.1" location="wsdl/greeter.wsdl" />
+
+ <reference>GreeterServiceComponent</reference>
+ </service>
+
+ <component name="GreeterServiceComponent">
+ <implementation.java class="greeter.GreeterImpl" />
+ </component>
+
+</composite>
diff --git a/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/web.xml b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..0498cb266c
--- /dev/null
+++ b/tags/java/sca-samples/1.0-incubator-M2/webapp/greeterws-oneway/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * 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.
+-->
+
+<!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>Tuscany Greeter Web Service Sample</display-name>
+
+
+ <listener>
+ <listener-class>org.apache.tuscany.runtime.webapp.TuscanyContextListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>TuscanyServlet</servlet-name>
+ <display-name>Tuscany Servlet</display-name>
+ <servlet-class>org.apache.tuscany.runtime.webapp.TuscanyServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TuscanyServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>