Author: svkrish
Date: Sat Oct 21 12:02:11 2006
New Revision: 466437
URL: http://svn.apache.org/viewvc?view=rev&rev=466437
Log:
Adding the Calculator WebService Sample (to work with the Calculator-Combo
sample)
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/Calculator-Web-Service-Readme.htm
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/pom.xml
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddService.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddServiceImpl.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorService.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorServiceImpl.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideService.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideServiceImpl.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathService.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathServiceImpl.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyService.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyServiceImpl.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractService.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractServiceImpl.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/resources/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/resources/META-INF/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/resources/META-INF/LICENSE.txt
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/resources/META-INF/NOTICE
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/resources/META-INF/README.txt
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/resources/wsdl/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/resources/wsdl/calculator.wsdl
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/webapp/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/webapp/WEB-INF/
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/webapp/WEB-INF/default.scdl
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/webapp/WEB-INF/web.xml
Modified:
incubator/tuscany/branches/sca-java-M2/samples/webapp/helloworldws/src/main/java/helloworld/HelloWorldImpl.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/helloworldws/src/main/java/helloworld/HelloWorldService.java
incubator/tuscany/branches/sca-java-M2/samples/webapp/helloworldws/src/main/resources/wsdl/helloworld.wsdl
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/Calculator-Web-Service-Readme.htm
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/Calculator-Web-Service-Readme.htm?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/Calculator-Web-Service-Readme.htm
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/Calculator-Web-Service-Readme.htm
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><!-- 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. -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta
http-equiv="Content-Style-Type" content="text/css"><title>Tuscany
+Hello World Web Service Sample</title><!-- LINK rel="stylesheet"
href="ait.css" type="text/css" --><!-- maven -->
+<style type="text/css" media="all">
[EMAIL PROTECTED] url("../../../../css/maven-base.css");
[EMAIL PROTECTED] url("../../../../css/maven-theme.css");
[EMAIL PROTECTED] url("../../../../css/site.css");
+</style><link rel="stylesheet" href="./css/print.css" type="text/css"
media="print"><!-- end maven --></head>
+<body>
+<H1>Tuscany Calculator-Combo - A Simple SCA Assembly that hosts calculator
functions as WebServices</H1>
+<H2>Overview</H2>
+<TABLE border="0">
+ <TBODY>
+ <TR>
+ <TD width="100%" valign="top" align="left"> This sample
is an assembly of Calculator functions implemented in Java and exposed as Web
Services. The primary objective of developing this sample is to support the
Calculator-Combo sample.<BR>
+ <BR>
+ To test this sample you might have to either run the
Calculator-Combo sample after running this sample or you might right your won
SCA Application that refereences the services of this sample</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<H2>Location</H2>
+<P>This sample is located in the following path of the samples source
distribution: -<BR>
+<source disb>/samples/webapp/calculatorws<BR>
+<BR>
+After you build the sample source the deployable 'war' can be found in the
'<I>target'
+</I>directory of the the project as:: <BR>
+<source
disb>/samples/webapp/calculatorws/target/sample-calculatorws.war<BR>
+<BR>
+f there is a binary distribution of the samples available then you may just
about lookup for the deployable unit (jar) in the
distribution.</P><H2>Setup</H2>
+<P>1) Install the Apache Tomcat Server (latest release) and copy the
<I>sample-calculatorws.war</I> into the WebApps directory of the Tomcat
Installation.</P><H2>Running</H2>
+<P> Start the Apache Tomcat Server and ensure that the Calculator WebService
is deployed and is running.
+<BR>
+<BR>
+To test this sample completely, run the Calculator-Combo sample after running
this sample. For details on setting up and running the Calculator-Combo sample
look at the Calculator-Combo-Readme.htm
+there.</P><H2>Code Overview</H2>
+The source files are physically organized as shown below:<br>
+<table style="text-align: left; width: 100%;" border="1" cellpadding="2"
cellspacing="2"><tbody><tr><td>
+<pre>
+<B><U></U></B><B><U>Calculator WebService</U></B>
++---main<BR> +---java<BR> | +---calculator
+<I> <Interfaces and Implementations for Calculator
Functions>
+
+</I>
+ +---resources
+ +---wsdl
+ calculator.wsdl
+ +---webapp
+ +---WEB-INF
+ default.scdl
+ web.xml</pre></td></tr></tbody></table>
+<P><B>Calculator WebService Sample (WebApp Deployment)</B></P><TABLE
border="1">
+ <TBODY>
+ <TR>
+ <TD width="230" valign="top">default.scdl</TD>
+ <TD width="396" valign="top">Defines an assembly of
calculator
+ funtions implemented in Java and exposed as a
WebService using the Axis2 binding.</TD>
+ </TR>
+ <TR>
+ <TD width="230">AddService.java<BR>
+ AddServiceImpl.java<BR>
+ DivideService.java<BR>
+ DivideServiceImpl.java<BR>
+ MathService.java<BR>
+ MathServiceImpl.java<BR>
+ MultiplyService.java<BR>
+ MultiplyServiceImpl.java<BR>
+ SubtractService.java<BR>
+ SubtractServiceImpl.java</TD>
+ <TD width="396">Java Interfaces and Java
Implementations for various calculator
+ functions.</TD>
+ </TR>
+ <TR>
+ <TD width="230">CalculatorService.java<BR>
+ CalculatorServiceImpl.java</TD>
+ <TD width="396">Defines the coarse grained Calculator
Interface and
+ Implementation. This calculator implementation
delegates function
+ requests to other granular implemenations listed
above.</TD>
+ </TR>
+ <TR>
+ <TD width="230">calculator.wsdl</TD>
+ <TD width="396">Defines the Calculator service using
WSDL to enable the CalculatorServiceImpl to be exposed as a Axis2
WebService</TD>
+ </TR>
+ <TR>
+ <TD width="230">web.xml</TD>
+ <TD width="396">The Web App. descriptor for the Web
App. deployment of the Tuscany Runtime.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></body></html>
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/pom.xml?view=auto&rev=466437
==============================================================================
--- incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/pom.xml
(added)
+++ incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/pom.xml
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,138 @@
+<?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>
+ <parent>
+ <groupId>org.apache.tuscany.sca.samples</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-incubator-M2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>sample-calculatorws</artifactId>
+ <packaging>war</packaging>
+ <name>Tuscany Calculator Web Service Sample</name>
+ <description>A sample Calculator Web Service.</description>
+
+ <properties>
+ <ws.type>axis2</ws.type>
+ </properties>
+
+ <dependencies>
+
+ <!-- SCA API dependencies -->
+ <dependency>
+ <groupId>org.osoa</groupId>
+ <artifactId>sca-api-r0.95</artifactId>
+ <version>${scaVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- Tuscany API dependencies -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca.kernel</groupId>
+ <artifactId>tuscany-api</artifactId>
+ <version>${scaVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- SDO API dependencies -->
+ <dependency>
+ <groupId>commonj</groupId>
+ <artifactId>sdo-api-r2.0.1</artifactId>
+ <version>${scaVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- SDO's XXXHelper.INSTANCE pattern requires the implementation -->
+ <dependency>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-impl</artifactId>
+ <version>${scaVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- SDO's XMLStreamHelper requires StAX API and impl (it's not pulled
by
+ tuscany-sdo-impl because the maven dependency scope is provided -->
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>1.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- runtime is need for webapp integration to include jar -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca.runtime</groupId>
+ <artifactId>webapp</artifactId>
+ <version>${scaVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Unit testing -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <finalName>sample-calculatorws</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca.plugins</groupId>
+ <artifactId>tuscany-war-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tuscany-war</id>
+ <goals>
+ <goal>tuscany-war</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <!-- Set to true to embed external jars for extensions in
the WAR -->
+ <!-- Set to false to leave external jars for extensions to
be resolved from maven repository -->
+
<loadExtensionDependencies>false</loadExtensionDependencies>
+ <extensions>
+ <dependency>
+
<groupId>org.apache.tuscany.sca.services.bindings</groupId>
+ <artifactId>axis2</artifactId>
+ <version>${scaVersion}</version>
+ </dependency>
+ <dependency>
+
<groupId>org.apache.tuscany.sca.services.databinding</groupId>
+ <artifactId>databinding-sdo</artifactId>
+ <version>${scaVersion}</version>
+ </dependency>
+ </extensions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddService.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddService.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddService.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,25 @@
+/*
+ * 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 calculator;
+
+public interface AddService {
+
+ double add(double n1, double n2);
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddServiceImpl.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddServiceImpl.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/AddServiceImpl.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Add service
+ */
[EMAIL PROTECTED]("MODULE")
+public class AddServiceImpl implements AddService {
+
+ public double add(double n1, double n2) {
+ return n1 + n2;
+ }
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorService.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorService.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorService.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,42 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Remotable;
+import org.osoa.sca.annotations.Service;
+
+
+/**
+ * The Calculator service interface.
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+public interface CalculatorService {
+
+ double add(double n1, double n2);
+
+ double subtract(double n1, double n2);
+
+ double multiply(double n1, double n2);
+
+ double divide(double n1, double n2);
+
+ double sqrt (double n);
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorServiceImpl.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorServiceImpl.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/CalculatorServiceImpl.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,67 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+
+
+/**
+ * An implementation of the Calculator service.
+ */
[EMAIL PROTECTED]("MODULE")
+public class CalculatorServiceImpl implements CalculatorService {
+
+ @Reference
+ protected AddService addService;
+
+ @Reference
+ protected SubtractService subtractService;
+
+ @Reference
+ protected MultiplyService multiplyService;
+
+ @Reference
+ protected DivideService divideService;
+
+ @Reference
+ protected MathService mathService;
+
+ public double add(double n1, double n2) {
+ return addService.add(n1, n2);
+ }
+
+ public double subtract(double n1, double n2) {
+ return subtractService.subtract(n1, n2);
+ }
+
+ public double multiply(double n1, double n2) {
+ return multiplyService.multiply(n1, n2);
+ }
+
+ public double divide(double n1, double n2) {
+ return divideService.divide(n1, n2);
+ }
+
+ public double sqrt(double n) {
+ // TODO Auto-generated method stub
+ return mathService.sqrt(n);
+ }
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideService.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideService.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideService.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,25 @@
+/*
+ * 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 calculator;
+
+public interface DivideService {
+
+ double divide(double n1, double n2);
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideServiceImpl.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideServiceImpl.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/DivideServiceImpl.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Divide service.
+ */
[EMAIL PROTECTED]("MODULE")
+public class DivideServiceImpl implements DivideService {
+
+ public double divide(double n1, double n2) {
+ return n1 / n2;
+ }
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathService.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathService.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathService.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,27 @@
+/*
+ * 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 calculator;
+
+
+
+public interface MathService {
+
+ double sqrt(double n);
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathServiceImpl.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathServiceImpl.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MathServiceImpl.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Divide service.
+ */
[EMAIL PROTECTED]("MODULE")
+public class MathServiceImpl implements MathService {
+
+ public double sqrt(double n1) {
+ return java.lang.Math.sqrt(n1);
+ }
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyService.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyService.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyService.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,25 @@
+/*
+ * 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 calculator;
+
+public interface MultiplyService {
+
+ double multiply(double n1, double n2);
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyServiceImpl.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyServiceImpl.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/MultiplyServiceImpl.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the Multiply service.
+ */
[EMAIL PROTECTED]("MODULE")
+public class MultiplyServiceImpl implements MultiplyService {
+
+ public double multiply(double n1, double n2) {
+ return n1 * n2;
+ }
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractService.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractService.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractService.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,25 @@
+/*
+ * 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 calculator;
+
+public interface SubtractService {
+
+ double subtract(double n1, double n2);
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractServiceImpl.java?view=auto&rev=466437
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractServiceImpl.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/webapp/calculatorws/src/main/java/calculator/SubtractServiceImpl.java
Sat Oct 21 12:02:11 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * An implementation of the subtract service.
+ */
[EMAIL PROTECTED]("MODULE")
+public class SubtractServiceImpl implements SubtractService {
+
+ public double subtract(double n1, double n2) {
+ return n1 - n2;
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]