summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/tutorials/travelsample/services
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/tutorials/travelsample/services')
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/build.xml49
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml53
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml70
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardService.java34
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceBootstrap.java31
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceImpl.java34
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/pom.xml51
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/build.xml37
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/pom.xml85
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java105
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java30
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/resources/sms-gateway.idl26
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/build.xml35
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/pom.xml58
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java30
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java45
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java33
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/resources/META-INF/ejb-jar.xml2
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml53
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml70
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java32
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java31
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java33
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/build.xml35
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/pom.xml104
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGateway.java30
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayImpl.java126
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java47
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/build.xml31
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/pom.xml59
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java30
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java39
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java40
33 files changed, 0 insertions, 1568 deletions
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/build.xml
deleted file mode 100644
index 21b282707c..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/build.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="scatours-services" default="compile">
-
- <target name="compile">
- <antcall target="allsubdirs">
- <param name="target" value="compile"/>
- </antcall>
- </target>
-
- <target name="test">
- <antcall target="allsubdirs">
- <param name="target" value="test"/>
- </antcall>
- </target>
-
- <target name="clean">
- <antcall target="allsubdirs">
- <param name="target" value="clean"/>
- </antcall>
- </target>
-
- <target name="allsubdirs">
- <ant dir="creditcard-payment-jaxws" target="${target}"/>
- <ant dir="smsgateway-corba" target="${target}"/>
- <ant dir="smsgateway-ejb" target="${target}"/>
- <ant dir="smsgateway-jaxws" target="${target}"/>
- <ant dir="smsgateway-jms" target="${target}"/>
- <ant dir="smsgateway-rmi" target="${target}"/>
- </target>
-
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml
deleted file mode 100644
index 266dbec28c..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="scatours-service-creditcard-payment-jaxws" default="compile">
- <import file="../../antdefs.xml"/>
-
- <!-- The "run" target starts a JAX-WS service endpoint for a simple
- credit card payment service. This endpoint does not appear to be
- used currently anywhere else in the travel application. -->
- <target name="run" depends="is-jdk6, jaxws-jdk6, jaxws-jdk5">
- <java classname="scatours.creditcard.CreditCardServiceBootstrap" fork="true">
- <classpath>
- <pathelement location="target/${ant.project.name}.jar"/>
- <path refid="jaxws-path"/>
- </classpath>
- </java>
- </target>
-
- <!-- check to see if we are running on JDK 6 -->
- <target name="is-jdk6">
- <condition property="jdk6">
- <available classname="javax.xml.ws.Endpoint"/>
- </condition>
- </target>
-
- <!-- JDK 6 contains JAX-WS so we don't need it on the classpath -->
- <target name="jaxws-jdk6" if="jdk6">
- <path id="jaxws-path"/>
- </target>
-
- <!-- on JDK 5 we need to add the JAX-WS runtime to the classpath -->
- <target name="jaxws-jdk5" unless="jdk6">
- <path id="jaxws-path">
- <fileset dir="${env.JAXWS_HOME}/lib"/>
- </path>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml
deleted file mode 100644
index b0ea6b919a..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-service-creditcard-payment-jaxws</artifactId>
- <name>Apache Tuscany SCA Tours Credit Card Payment JAX-WS Service</name>
-
- <dependencies>
- <dependency>
- <groupId>javax.xml.ws</groupId>
- <artifactId>jaxws-api</artifactId>
- <version>2.1</version>
- <exclusions>
- <exclusion>
- <groupId>javax.xml.soap</groupId>
- <artifactId>saaj-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifestEntries>
- <Class-Path>../util/scatours-util-jaxws-runtime.jar</Class-Path>
- <Main-Class>scatours.creditcard.CreditCardServiceBootstrap</Main-Class>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardService.java b/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardService.java
deleted file mode 100644
index a0f2912f7b..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package scatours.creditcard;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-
-@WebService
-@SOAPBinding(style = Style.RPC)
-public interface CreditCardService {
-
- String NOT_AUTHORIZED = "Not_Authorized";
-
- @WebMethod
- String makePayment(String cardNumber, String name, double amount);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceBootstrap.java b/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceBootstrap.java
deleted file mode 100644
index 2fa12fc187..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceBootstrap.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package scatours.creditcard;
-
-import javax.xml.ws.Endpoint;
-
-public class CreditCardServiceBootstrap {
-
- public static void main(String[] args) {
- System.out.println("Publishing Credit Card Service as web service: http://localhost:8081/CreditCardService");
- System.out.println("Press Ctrl^C to terminate...");
-
- Endpoint.publish("http://localhost:8081/CreditCardService", new CreditCardServiceImpl());
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceImpl.java
deleted file mode 100644
index 7118edbc1f..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/src/main/java/scatours/creditcard/CreditCardServiceImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package scatours.creditcard;
-
-import javax.jws.WebService;
-
-@WebService(endpointInterface = "scatours.creditcard.CreditCardService")
-public class CreditCardServiceImpl implements CreditCardService {
-
- public String makePayment(String cardNumber, String name, double amount) {
- System.out.println("Payment request from " + name);
-
- if (cardNumber != null && cardNumber.startsWith("1")) {
- return "AUTH_ID:" + System.currentTimeMillis();
- }
- return NOT_AUTHORIZED;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/pom.xml
deleted file mode 100644
index 1dbc8effad..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <version>2.0-SNAPSHOT</version>
- <artifactId>scatours-services</artifactId>
- <packaging>pom</packaging>
- <name>Apache Tuscany SCA Tours non-SCA Services</name>
-
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>creditcard-payment-jaxws</module>
- <module>smsgateway-jaxws</module>
- <module>smsgateway-corba</module>
- <module>smsgateway-ejb</module>
- <module>smsgateway-jms</module>
- <module>smsgateway-rmi</module>
- </modules>
- </profile>
-
- </profiles>
-
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/build.xml
deleted file mode 100644
index 0495e2b956..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/build.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="scatours-service-smsgateway-corba" default="compile">
- <import file="../../antdefs.xml"/>
-
- <target name="idljava">
- <antcall target="idlj">
- <param name="idljopts" value="-fall"/>
- <param name="idlfile" value="sms-gateway.idl"/>
- <param name="javaclass" value="scatours/smsgateway/SMSGatewayPOA.class"/>
- </antcall>
- </target>
-
- <target name="run">
- <java classname="scatours.smsgateway.SMSGatewayCORBAServiceBootstrap"
- fork="true" failonerror="true">
- <classpath location="target/${ant.project.name}.jar"/>
- </java>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/pom.xml
deleted file mode 100644
index 3f64d66a2d..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-service-smsgateway-corba</artifactId>
- <name>Apache Tuscany SCA Tours SMS Gateway CORBA Service</name>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>${scatours.selfContained}</addClasspath>
- <classpathPrefix>../lib/</classpathPrefix>
- <mainClass>scatours.smsgateway.SMSGatewayCORBAServiceBootstrap</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>idlj-maven-plugin</artifactId>
- <version>1.1</version>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <compiler>idlj</compiler>
- <sources>
- <source>
- <includes>
- <include>sms-gateway.idl</include>
- </includes>
- <emitStubs>true</emitStubs>
- <emitSkeletons>true</emitSkeletons>
- <compatible>false</compatible>
- </source>
- </sources>
- <sourceDirectory>${basedir}/src/main/resources</sourceDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java
deleted file mode 100644
index 9a53303e88..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package scatours.smsgateway;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.omg.CORBA.ORB;
-import org.omg.CORBA.Object;
-import org.omg.CosNaming.NameComponent;
-import org.omg.CosNaming.NamingContextExt;
-import org.omg.CosNaming.NamingContextExtHelper;
-import org.omg.PortableServer.POA;
-import org.omg.PortableServer.POAHelper;
-
-public class SMSGatewayCORBAServiceBootstrap {
-
- public static void main(String[] args) throws Exception {
- String home = System.getProperty("java.home");
- String[] tnsCommand = {"" + home + "/bin/tnameserv", "-ORBInitialPort", "5080"};
- Process tns = null;
-
- try {
- System.out.println("Starting transient name server process (port=5080)");
-
- // Start tnameserv in a separate process
- tns = Runtime.getRuntime().exec(tnsCommand);
-
- // Wait for the tnameserv process to complete its startup, and
- // display the output from the tnameserv process on the console
- InputStream tnsOut = tns.getInputStream();
- BufferedReader tnsOutReader = new BufferedReader(new InputStreamReader(tnsOut));
- while (true) {
- String line = tnsOutReader.readLine();
- System.out.println("tnameserv: " + line);
- if ("Ready.".equals(line)) {
- break;
- }
- }
-
- System.out.println("Publishing SMS Gateway Service as a CORBA service: SMSGatewayCORBAService (port=5080)");
-
- String[] orbArgs = {"-ORBInitialPort", "5080"};
- ORB orb = ORB.init(orbArgs, null);
-
- NamingContextExt namingCtx;
- try {
- Object objRef = orb.resolve_initial_references("NameService");
- namingCtx = NamingContextExtHelper.narrow(objRef);
- } catch (Exception ex) {
- System.err.println("ERROR: Failed to resolve Name Service.");
- //System.err.println("Don't forget to run it with:");
- //System.err.println(" tnameserv -ORBInitialPort 5080");
- return;
- }
-
- Object rootPoaRef = orb.resolve_initial_references("RootPOA");
- POA rootPoa = POAHelper.narrow(rootPoaRef);
- rootPoa.the_POAManager().activate();
-
- SMSGatewayServant smsGateway = new SMSGatewayServant();
- Object smsGatewayRef = rootPoa.servant_to_reference(smsGateway);
-
- String corbaServerName = "SMSGatewayCORBAService";
- NameComponent[] name = {new NameComponent(corbaServerName, "")};
- namingCtx.rebind(name, smsGatewayRef);
-
- System.out.println("CORBA server running - press Enter to shutdown");
- System.in.read();
-
- orb.shutdown(true);
- orb.destroy();
-
- } finally {
- // Make sure that the tnameserv process gets destroyed and its
- // listener port is released
- if (tns != null) {
- System.out.println("Destroying transient name server process");
- try {
- tns.destroy();
- System.out.println("Transient name server process destroyed");
- } catch (Exception e) {
- // ignore
- }
- }
- }
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java
deleted file mode 100644
index 693a909dca..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package scatours.smsgateway;
-
-public class SMSGatewayServant extends SMSGatewayPOA {
-
- public boolean sendSMS(String fromNumber, String toNumber, String text) {
- System.out.println("Sending SMS message");
- System.out.println("From: " + fromNumber);
- System.out.println("To: " + toNumber);
- System.out.println("Message: " + text);
- return true;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/resources/sms-gateway.idl b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/resources/sms-gateway.idl
deleted file mode 100644
index 30a87f5c7a..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-corba/src/main/resources/sms-gateway.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- module scatours {
- module smsgateway {
- interface SMSGateway {
- boolean sendSMS(in string fromNumber, in string toNumber, in string text);
- };
- };
-};
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/build.xml
deleted file mode 100644
index cc7456ac52..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/build.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="scatours-service-smsgateway-ejb" default="compile">
- <import file="../../antdefs.xml"/>
-
- <!-- The "run" target starts an OpenEJB service endpoint for the
- SMS gateway service. This endpoint is used by the "run" target
- of the notification-ejb launcher. -->
- <target name="run">
- <java classname="com.tuscanyscatours.smsgateway.SMSGatewayEJBServiceBootstrap"
- fork="true" failonerror="true">
- <classpath>
- <pathelement location="target/${ant.project.name}.jar"/>
- <fileset dir="${env.OPENEJB_HOME}/lib"/>
- </classpath>
- </java>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/pom.xml
deleted file mode 100644
index 8dd65669fc..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/pom.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-service-smsgateway-ejb</artifactId>
- <name>Apache Tuscany SCA Tours SMS Gateway EJB Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>javaee-api</artifactId>
- <version>5.0-2</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifestEntries>
- <Class-Path>../util/scatours-util-openejb-runtime.jar</Class-Path>
- <Main-Class>com.tuscanyscatours.smsgateway.SMSGatewayEJBServiceBootstrap</Main-Class>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java
deleted file mode 100644
index b462dd1be8..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package com.tuscanyscatours.smsgateway;
-
-import javax.ejb.Remote;
-
-/**
- * A gateway to send SMS messages.
- */
-@Remote
-public interface SMSGateway {
- boolean sendSMS(String fromNumber, String toNumber, String text);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java
deleted file mode 100644
index 4da784bc55..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.tuscanyscatours.smsgateway;
-
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-public class SMSGatewayEJBServiceBootstrap {
-
- public static void main(String[] args) throws Exception {
- System.out.println("Publishing SMS Gateway Service as an EJB service");
-
- Properties properties = new Properties();
- properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
- properties.setProperty("openejb.embedded.remotable", "true");
-
- InitialContext initialContext = new InitialContext(properties);
-
- // Object object = initialContext.lookup("SMSGatewayImplRemote");
- // SMSGateway smsGateway = (SMSGateway) object;
- // smsGateway.sendSMS("From", "to", "Message");
-
- System.out.println("EJB server running - waiting for requests");
- System.out.println("Press enter to shutdown.");
- System.in.read();
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java
deleted file mode 100644
index 3bdf48a7ea..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.tuscanyscatours.smsgateway;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class SMSGatewayImpl implements SMSGateway {
-
- public boolean sendSMS(String fromNumber, String toNumber, String text) {
- System.out.println("Sending SMS message");
- System.out.println("From: " + fromNumber);
- System.out.println("To: " + toNumber);
- System.out.println("Message: " + text);
- return true;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/resources/META-INF/ejb-jar.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/resources/META-INF/ejb-jar.xml
deleted file mode 100644
index 116a25630c..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-ejb/src/main/resources/META-INF/ejb-jar.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
- <ejb-jar/> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml
deleted file mode 100644
index 6c57e2420b..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="scatours-service-smsgateway-jaxws" default="compile">
- <import file="../../antdefs.xml"/>
-
- <!-- The "run" target starts a JAX-WS service endpoint for the
- SMS gateway service. This endpoint is used by the "run" target
- of the notification-ws launcher. -->
- <target name="run" depends="is-jdk6, jaxws-jdk6, jaxws-jdk5">
- <java classname="com.tuscanyscatours.smsgateway.SMSGatewayServiceBootstrap" fork="true">
- <classpath>
- <pathelement location="target/${ant.project.name}.jar"/>
- <path refid="jaxws-path"/>
- </classpath>
- </java>
- </target>
-
- <!-- check to see if we are running on JDK 6 -->
- <target name="is-jdk6">
- <condition property="jdk6">
- <available classname="javax.xml.ws.Endpoint"/>
- </condition>
- </target>
-
- <!-- JDK 6 contains JAX-WS so we don't need it on the classpath -->
- <target name="jaxws-jdk6" if="jdk6">
- <path id="jaxws-path"/>
- </target>
-
- <!-- on JDK 5 we need to add the JAX-WS runtime to the classpath -->
- <target name="jaxws-jdk5" unless="jdk6">
- <path id="jaxws-path">
- <fileset dir="${env.JAXWS_HOME}/lib"/>
- </path>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml
deleted file mode 100644
index 82e7f28c78..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-service-smsgateway-jaxws</artifactId>
- <name>Apache Tuscany SCA Tours SMS Gateway JAX-WS Service</name>
-
- <dependencies>
- <dependency>
- <groupId>javax.xml.ws</groupId>
- <artifactId>jaxws-api</artifactId>
- <version>2.1</version>
- <exclusions>
- <exclusion>
- <groupId>javax.xml.soap</groupId>
- <artifactId>saaj-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifestEntries>
- <Class-Path>../util/scatours-util-jaxws-runtime.jar</Class-Path>
- <Main-Class>com.tuscanyscatours.smsgateway.SMSGatewayServiceBootstrap</Main-Class>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java
deleted file mode 100644
index 696ab12daa..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.tuscanyscatours.smsgateway;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-
-@WebService
-@SOAPBinding(style = Style.RPC)
-public interface SMSGatewayService {
-
- @WebMethod
- boolean sendSMS(String fromNumber, String toNumber, String text);
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java
deleted file mode 100644
index 6631aee907..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.tuscanyscatours.smsgateway;
-
-import javax.xml.ws.Endpoint;
-
-public class SMSGatewayServiceBootstrap {
-
- public static void main(String[] args) {
- System.out.println("Publishing SMS Gateway Service as web service: http://localhost:8081/SMSGatewayService");
- System.out.println("Press Ctrl^C to terminate...");
-
- Endpoint.publish("http://localhost:8081/SMSGatewayService", new SMSGatewayServiceImpl());
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java
deleted file mode 100644
index cd4eab052d..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.tuscanyscatours.smsgateway;
-
-import javax.jws.WebService;
-
-@WebService(endpointInterface = "com.tuscanyscatours.smsgateway.SMSGatewayService")
-public class SMSGatewayServiceImpl implements SMSGatewayService {
-
- public boolean sendSMS(String fromNumber, String toNumber, String text) {
- System.out.println("Sending SMS message");
- System.out.println("From: " + fromNumber);
- System.out.println("To: " + toNumber);
- System.out.println("Message: " + text);
- return true;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/build.xml
deleted file mode 100644
index 389f6296c3..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/build.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="scatours-service-smsgateway-jms" default="compile">
- <import file="../../antdefs.xml"/>
-
- <!-- The "run" target creates JMS request and response queues for the
- SMS gateway service. These queues are used by the "run" target of
- the notification-jms launcher. -->
- <target name="run">
- <java classname="scatours.smsgateway.SMSGatewayJMSServiceBootstrap" fork="true">
- <classpath>
- <pathelement location="target/${ant.project.name}.jar"/>
- <!-- The following is used to bring in the ActiveMQ runtime. -->
- <pathelement location="${env.TUSCANY_HOME}/lib/tuscany-sca-manifest.jar"/>
- </classpath>
- </java>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/pom.xml
deleted file mode 100644
index e2767a4966..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-service-smsgateway-jms</artifactId>
- <name>Apache Tuscany SCA Tours SMS Gateway JMS Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-all</artifactId>
- <version>5.2.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-web-demo</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-api</artifactId>
- <version>1.2.7</version>
- <exclusions>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-impl</artifactId>
- <version>1.2.7</version>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>${scatours.selfContained}</addClasspath>
- <classpathPrefix>../lib/</classpathPrefix>
- <mainClass>scatours.smsgateway.SMSGatewayJMSServiceBootstrap</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGateway.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGateway.java
deleted file mode 100644
index e6e866fa1d..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGateway.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package scatours.smsgateway;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * A gateway to send SMS messages.
- */
-public interface SMSGateway extends Remote {
- boolean sendSMS(String fromNumber, String toNumber, String text) throws RemoteException;
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayImpl.java
deleted file mode 100644
index c35aa61513..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package scatours.smsgateway;
-
-import java.io.ByteArrayInputStream;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-
-public class SMSGatewayImpl implements SMSGateway {
-
- private final Session session;
- private final MessageConsumer consumer;
- private final MessageProducer producer;
-
- public SMSGatewayImpl(Session session) throws JMSException {
- this.session = session;
- Destination requestDest = session.createQueue("SMSRequestQueue");
- consumer = session.createConsumer(requestDest);
-
- Destination responseDest = session.createQueue("SMSResponseQueue");
- producer = session.createProducer(responseDest);
- }
-
- public void start() throws JMSException, XMLStreamException {
- while (true) {
- Message message = consumer.receive();
- handleRequest(message);
- }
- }
-
- private void handleRequest(Message inMessage) throws XMLStreamException, JMSException {
- OMElement xml = parseXMLPayload(inMessage);
-
- String fromNumber = getStringArg(xml, 0);
- String toNumber = getStringArg(xml, 1);
- String text = getStringArg(xml, 2);
-
- boolean result = sendSMS(fromNumber, toNumber, text);
-
- String responseXML = createXMLResponse(result);
-
- TextMessage outMessage = createResponseMessage(inMessage.getJMSMessageID(), responseXML);
- producer.send(outMessage);
- }
-
- private OMElement parseXMLPayload(Message inMessage) throws JMSException, XMLStreamException {
- final byte[] msgData;
- if (inMessage instanceof TextMessage) {
- msgData = ((TextMessage)inMessage).getText().getBytes();
- } else if (inMessage instanceof BytesMessage) {
- BytesMessage bytesMessage = (BytesMessage)inMessage;
- msgData = new byte[(int)bytesMessage.getBodyLength()];
- bytesMessage.readBytes(msgData);
- } else {
- throw new JMSException("Unsupported JMS message type of " + inMessage.getClass().getName());
- }
- ByteArrayInputStream in = new ByteArrayInputStream(msgData);
- StAXOMBuilder builder = new StAXOMBuilder(in);
- OMElement doc = builder.getDocumentElement();
- return doc;
- }
-
- private String getStringArg(OMElement doc, int i) {
- QName argQName = new QName("arg" + i);
- OMElement arg = doc.getFirstChildWithName(argQName);
- if (arg == null) {
- return null;
- }
- return arg.getText();
- }
-
- public boolean sendSMS(String fromNumber, String toNumber, String text) {
- System.out.println("From: " + fromNumber);
- System.out.println("To: " + toNumber);
- System.out.println(text);
- return true;
- }
-
- private String createXMLResponse(boolean result) {
- OMFactory omFactory = OMAbstractFactory.getOMFactory();
- OMElement response = omFactory.createOMElement("sendSMS", "http://smsgateway.scatours/", "ns2");
- OMElement returnValue = omFactory.createOMElement("return", null);
- OMText returnV = omFactory.createOMText(Boolean.toString(result));
- returnValue.addChild(returnV);
- response.addChild(returnValue);
- return response.toString();
- }
-
- private TextMessage createResponseMessage(String correlationID, String responseXML) throws JMSException {
- TextMessage outMessage = session.createTextMessage("sendSMS");
- outMessage.setText(responseXML);
- outMessage.setJMSCorrelationID(correlationID);
- return outMessage;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java
deleted file mode 100644
index d8543266e3..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package scatours.smsgateway;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-public class SMSGatewayJMSServiceBootstrap {
-
- public static void main(String[] args) throws Exception {
- final BrokerService jmsBroker = new BrokerService();
- jmsBroker.setPersistent(false);
- jmsBroker.setUseJmx(false);
- jmsBroker.addConnector("tcp://localhost:61619");
- jmsBroker.start();
-
- System.out.println("Publishing SMS Gateway Service as a JMS service: tcp://localhost:61619");
- System.out.println("Press Ctrl^C to terminate...");
-
- ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61619");
- Connection connection = connectionFactory.createConnection();
- connection.start();
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- SMSGatewayImpl impl = new SMSGatewayImpl(session);
- impl.start();
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/build.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/build.xml
deleted file mode 100644
index 13d4702867..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/build.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<project name="scatours-service-smsgateway-rmi" default="compile">
- <import file="../../antdefs.xml"/>
-
- <!-- The "run" target starts an RMI server for the SMS gateway service.
- This server is used by the "run" target of the notification-rmi launcher. -->
- <target name="run">
- <java classname="com.tuscanyscatours.smsgateway.SMSGatewayRMIServiceBootstrap"
- fork="true" failonerror="true">
- <classpath location="target/${ant.project.name}.jar"/>
- </java>
- </target>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/pom.xml
deleted file mode 100644
index 16b9fc1270..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>scatours</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent><version>2.0-SNAPSHOT</version>
- <artifactId>scatours-service-smsgateway-rmi</artifactId>
- <name>Apache Tuscany SCA Tours SMS Gateway RMI Service</name>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>${scatours.selfContained}</addClasspath>
- <classpathPrefix>../lib/</classpathPrefix>
- <mainClass>com.tuscanyscatours.smsgateway.SMSGatewayRMIServiceBootstrap</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java
deleted file mode 100644
index 4ce528fd23..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package com.tuscanyscatours.smsgateway;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * A gateway to send SMS messages.
- */
-public interface SMSGateway extends Remote {
- boolean sendSMS(String fromNumber, String toNumber, String text) throws RemoteException;
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java
deleted file mode 100644
index c33439af8b..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.tuscanyscatours.smsgateway;
-
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-public class SMSGatewayImpl extends UnicastRemoteObject implements SMSGateway {
-
- private static final long serialVersionUID = -2739486025442222295L;
-
- protected SMSGatewayImpl() throws RemoteException {
- super();
- }
-
- public boolean sendSMS(String fromNumber, String toNumber, String text) {
- System.out.println("Sending SMS message");
- System.out.println("From: " + fromNumber);
- System.out.println("To: " + toNumber);
- System.out.println("Message: " + text);
- return true;
- }
-}
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java b/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java
deleted file mode 100644
index 5b223fb40c..0000000000
--- a/sca-java-2.x/trunk/tutorials/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.tuscanyscatours.smsgateway;
-
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-
-public class SMSGatewayRMIServiceBootstrap {
-
- public static void main(String[] args) throws Exception {
- System.out.println("Publishing SMS Gateway Service as a RMI service");
-
- String serviceName = "SMSGatewayRMI";
- SMSGatewayImpl smsGatewayImpl = new SMSGatewayImpl();
- Registry rmiRegistry = LocateRegistry.createRegistry(8099);
- rmiRegistry.bind(serviceName, smsGatewayImpl);
-
- System.out.println("RMI server running - waiting for requests");
- System.out.println("Press enter to shutdown.");
- System.in.read();
- rmiRegistry.unbind(serviceName);
- System.exit(-1);
- }
-}