You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by va...@apache.org on 2008/11/26 21:10:21 UTC
svn commit: r720967 - in
/geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate: ./
src/ src/main/ src/main/java/ src/main/java/sample/ src/main/resources/
src/main/resources/META-INF/ src/main/resources/META-INF/sca-deployables/
Author: vamsic007
Date: Wed Nov 26 12:10:20 2008
New Revision: 720967
URL: http://svn.apache.org/viewvc?rev=720967&view=rev
Log:
Helloworld service delegate sample. The service is made available as a webservice. The service component in turn invokes another Helloworld component to provide the response.
Added:
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml (with props)
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java (with props)
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java (with props)
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java (with props)
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/
geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite (with props)
Added: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml?rev=720967&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml (added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml Wed Nov 26 12:10:20 2008
@@ -0,0 +1,44 @@
+<?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.geronimo.plugins</groupId>
+ <artifactId>tuscany-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>helloworld-service-delegate</artifactId>
+ <name>Geronimo Plugins :: Helloworld Service Delegate</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+</project>
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java?rev=720967&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java (added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java Wed Nov 26 12:10:20 2008
@@ -0,0 +1,29 @@
+/*
+ * 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.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name);
+
+}
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/Helloworld.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java?rev=720967&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java (added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java Wed Nov 26 12:10:20 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package sample;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface HelloworldDelegate {
+
+ String sayHello(String name);
+
+}
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegate.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java?rev=720967&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java (added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java Wed Nov 26 12:10:20 2008
@@ -0,0 +1,43 @@
+/*
+ * 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.osoa.sca.annotations.ComponentName;
+import org.osoa.sca.annotations.Reference;
+
+/**
+ * A HelloworldDelegate implementation. The service method invocation is delegated to a Helloworld service
+ * reference injected into this component.
+ *
+ * @version $Rev$ $Date$
+ */
+public class HelloworldDelegateImpl implements HelloworldDelegate {
+
+ @ComponentName
+ protected String componentName;
+
+ @Reference
+ public Helloworld helloworld;
+
+ public String sayHello(String name) {
+ System.out.println(componentName+": HelloworldDelegateImpl.sayHello: " + name);
+ return helloworld.sayHello(name);
+ }
+}
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/java/sample/HelloworldDelegateImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite?rev=720967&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite (added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite Wed Nov 26 12:10:20 2008
@@ -0,0 +1,31 @@
+<?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"
+ targetNamespace="http://sample"
+ name="HelloworldDelegate">
+
+ <component name="HelloworldDelegateComponent">
+ <implementation.java class="sample.HelloworldDelegateImpl"/>
+ <service name="HelloworldDelegate">
+ <binding.ws uri="/tuscany/HelloworldDelegate"/>
+ </service>
+ <reference name="helloworld" target="HelloworldComponent"/>
+ </component>
+</composite>
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-service-delegate/src/main/resources/META-INF/sca-deployables/HelloworldDelegate.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml