You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/07/31 11:41:51 UTC
svn commit: r561288 - in
/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp: ./ src/
src/main/ src/main/java/ src/main/java/helloworld/ src/main/resources/
src/main/resources/wsdl/ src/main/webapp/ src/main/webapp/META-INF/
src/main/webapp/WE...
Author: antelder
Date: Tue Jul 31 02:41:49 2007
New Revision: 561288
URL: http://svn.apache.org/viewvc?view=rev&rev=561288
Log:
TUSCANY-1491, Add helloworld sdo webapp sample from Sunny Ip
Added:
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/ (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml (with props)
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/
incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/HelloWorldTestCase.java (with props)
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul 31 02:41:49 2007
@@ -0,0 +1,18 @@
+dojo
+work
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+derby.log
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.felix
+
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml Tue Jul 31 02:41:49 2007
@@ -0,0 +1,163 @@
+<?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-sca</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>sample-helloworld-ws-sdo-webapp</artifactId>
+ <packaging>war</packaging>
+ <name>Apache Tuscany HelloWorld Web Service SDO Sample WebApp</name>
+
+ <repositories>
+ <repository>
+ <id>apache.incubator</id>
+ <url>http://people.apache.org/repo/m2-incubating-repository</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-webapp</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-lib</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-impl</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-sdo</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+
+<!-- [rfeng] It doesn't work with the embedded Tomcat, see TUSCANY-1460 -->
+<!--
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-http-tomcat</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+-->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version> <!-- to keep compatible with older servlet containers -->
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>target/sdo-source</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-plugin</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>generate-helloworld-sdo</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <schemaFiles>
+ <configuration>
+ <fileName>${basedir}/src/main/resources/wsdl/helloworld.xsd</fileName>
+ <javaPackage>helloworld.type</javaPackage>
+ <prefix>Type</prefix>
+ <noNotification>true</noNotification>
+ </configuration>
+ <configuration>
+ <fileName>${basedir}/src/main/resources/wsdl/helloworld.wsdl</fileName>
+ <javaPackage>helloworld</javaPackage>
+ <prefix>Helloworld</prefix>
+ <noNotification>true</noNotification>
+ </configuration>
+ </schemaFiles>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java Tue Jul 31 02:41:49 2007
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/**
+ * HelloWorld.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: #axisVersion# #today#
+ */
+package helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+import org.osoa.sca.annotations.Service;
+
+/*
+ * HelloWorld java interface
+ */
+
+@Remotable
+@Service
+public interface HelloWorld {
+
+ /**
+ * Auto generated method signatures
+ *
+ * @param getGreetings
+ */
+ public java.lang.String getGreetings(helloworld.Party getGreetings) throws java.rmi.RemoteException;
+
+}
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java Tue Jul 31 02:41:49 2007
@@ -0,0 +1,41 @@
+/*
+ * 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 java.rmi.RemoteException;
+
+public class HelloWorldComponent implements HelloWorld {
+
+ HelloWorld helloWorld;
+
+ public String getGreetings(Party party) throws RemoteException {
+ System.out.println("Called getGreetings");
+ return helloWorld.getGreetings(party);
+ }
+
+ public HelloWorld getHelloWorld() {
+ System.out.println("Got Injected helloWorld");
+ return helloWorld;
+ }
+
+ public void setHelloWorld(HelloWorld helloWorld) {
+ System.out.println("Injected helloWorld");
+ this.helloWorld = helloWorld;
+ }
+}
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java Tue Jul 31 02:41:49 2007
@@ -0,0 +1,49 @@
+/*
+ * 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 java.rmi.RemoteException;
+import java.util.List;
+
+import org.osoa.sca.annotations.Service;
+
+@Service(HelloWorld.class)
+public class HelloWorldImpl implements HelloWorld {
+
+ public String getGreetings(Party party) throws RemoteException {
+ System.out.println("Greeting party");
+ StringBuffer greetings = new StringBuffer();
+ greetings.append("Hello ");
+ List<Person> people = party.getPeople();
+ int i=0;
+ for (Person person : people) {
+ greetings.append(person.getFirstName());
+ greetings.append(" ");
+ greetings.append(person.getLastName());
+ i++;
+ if (i < people.size()) {
+ greetings.append(", ");
+ }
+ }
+ greetings.append("!");
+
+ return greetings.toString();
+ }
+
+}
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite Tue Jul 31 02:41:49 2007
@@ -0,0 +1,45 @@
+<?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"
+ xmlns:sample="http://sample"
+ xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
+ name="helloworldws">
+
+ <dbsdo:import.sdo factory="helloworld.HelloworldFactory"/>
+
+ <service name="HelloWorld" promote="HelloWorldImpl">
+ <interface.java interface="helloworld.HelloWorld" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </service>
+
+ <component name="HelloWorldImpl">
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ </component>
+
+ <component name="HelloWorldServiceComponent">
+ <implementation.java class="helloworld.HelloWorldComponent"/>
+ <reference name="helloWorld" >
+ <interface.java interface="helloworld.HelloWorld" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </reference>
+ </component>
+
+</composite>
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl Tue Jul 31 02:41:49 2007
@@ -0,0 +1,113 @@
+<?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://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:hw="http://helloworld/type"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <import namespace="http://helloworld/type"
+ schemaLocation="helloworld.xsd" />
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="party" type="tns:Party" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn"
+ type="xsd:string" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <complexType name="Party">
+ <sequence>
+ <element name="people" type="tns:Person"
+ maxOccurs="unbounded" />
+ </sequence>
+ </complexType>
+
+ <complexType name="Person">
+ <complexContent>
+ <extension base="hw:Person_Base">
+ <sequence>
+ <element name="lastName" type="xsd:string" />
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest"
+ name="getGreetingsRequest" />
+ <wsdl:output message="tns:getGreetingsResponse"
+ name="getGreetingsResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding"
+ name="HelloWorldSoapPort">
+ <wsdlsoap:address
+ location="http://localhost:8080/HelloWorld/services/HelloWorldService" />
+ <!-- wsdlsoap:address
+ location="http://localhost:8080/sample-helloworld-ws-sdo-webapp/services/HelloWorld/services/HelloWorldService" / -->
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd Tue Jul 31 02:41:49 2007
@@ -0,0 +1,30 @@
+<?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://helloworld/type"
+ xmlns:tns="http://helloworld/type"
+ elementFormDefault="qualified">
+
+ <complexType name="Person_Base">
+ <sequence>
+ <element name="firstName" type="string" />
+ </sequence>
+ </complexType>
+</schema>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp Tue Jul 31 02:41:49 2007
@@ -0,0 +1,48 @@
+<%--
+ * 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.
+--%>
+
+<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%>
+<%@ page import="helloworld.HelloWorld" %>
+<%@ page import="helloworld.HelloworldFactory"%>
+<%@ page import="helloworld.Party"%>
+<%@ page import="helloworld.Person"%>
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%
+ SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain");
+ HelloWorld helloWorld = scaDomain.getService(HelloWorld.class, "HelloWorldServiceComponent");
+%>
+<html>
+<head><title>Hello World SDO sample</title></head>
+
+<body>
+<%
+ Party party = HelloworldFactory.INSTANCE.createParty();
+ Person person = HelloworldFactory.INSTANCE.createPerson();
+ person.setFirstName("John");
+ person.setLastName("Smith");
+ party.getPeople().add(person);
+ person = HelloworldFactory.INSTANCE.createPerson();
+ person.setFirstName("Jane");
+ person.setLastName("Doe");
+ party.getPeople().add(person);
+%>
+<%= helloWorld.getGreetings(party) %>
+</body>
+</html>
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml Tue Jul 31 02:41:49 2007
@@ -0,0 +1,24 @@
+<?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:helloworldws"/>
+</contribution>
\ No newline at end of file
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml Tue Jul 31 02:41:49 2007
@@ -0,0 +1,45 @@
+<?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 Hello World Service Sample</display-name>
+
+ <listener>
+ <listener-class>org.apache.tuscany.sca.webapp.TuscanyContextListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>TuscanyServlet</servlet-name>
+ <servlet-class>org.apache.tuscany.sca.webapp.TuscanyServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TuscanyServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>HelloWorld.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/HelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/HelloWorldTestCase.java?view=auto&rev=561288
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/HelloWorldTestCase.java (added)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/HelloWorldTestCase.java Tue Jul 31 02:41:49 2007
@@ -0,0 +1,56 @@
+/*
+ * 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 java.rmi.RemoteException;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.Assert;
+
+import junit.framework.TestCase;
+
+public class HelloWorldTestCase extends TestCase {
+
+ private SCADomain scaDomain;
+ private HelloWorld helloWorld;
+
+ protected void setUp() throws Exception {
+ scaDomain = SCADomain.newInstance("helloworldws.composite");
+ helloWorld = scaDomain.getService(HelloWorld.class, "HelloWorldImpl");
+ }
+
+ protected void tearDown() throws Exception {
+ scaDomain.close();
+ }
+
+ public void testGetGreetings() throws RemoteException {
+ Party party = HelloworldFactory.INSTANCE.createParty();
+ Person person = HelloworldFactory.INSTANCE.createPerson();
+ person.setFirstName("John");
+ person.setLastName("Smith");
+ party.getPeople().add(person);
+ person = HelloworldFactory.INSTANCE.createPerson();
+ person.setFirstName("Jane");
+ person.setLastName("Doe");
+ party.getPeople().add(person);
+
+ Assert.assertEquals("Hello John Smith, Jane Doe!", helloWorld.getGreetings(party));
+ }
+
+}
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/HelloWorldTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/samples/helloworld-ws-sdo-webapp/src/test/java/helloworld/HelloWorldTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org