summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-06-10 20:27:31 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-06-10 20:27:31 +0000
commit98eec492c08e491401841dd33e8392b41c1e6660 (patch)
treeaf1129e753a0923a51db744214be4bced2d694aa /sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws
parent9437c0186c353b9b379f92937421cd722d6f2c31 (diff)
Copy travelsample-1.0-RC3 tag as travelsample-1.0
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@953445 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws')
-rw-r--r--sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/build.xml34
-rw-r--r--sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/pom.xml63
-rw-r--r--sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java32
-rw-r--r--sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java31
-rw-r--r--sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java33
5 files changed, 193 insertions, 0 deletions
diff --git a/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/build.xml b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/build.xml
new file mode 100644
index 0000000000..bdbf07c42f
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/build.xml
@@ -0,0 +1,34 @@
+<!--
+ * 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="locate-jaxws">
+ <java classname="com.tuscanyscatours.smsgateway.SMSGatewayServiceBootstrap" fork="true">
+ <classpath>
+ <pathelement location="target/${ant.project.name}.jar"/>
+ <path refid="jaxws-path"/>
+ </classpath>
+ </java>
+ </target>
+</project>
diff --git a/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/pom.xml b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/pom.xml
new file mode 100644
index 0000000000..019e7f5527
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/pom.xml
@@ -0,0 +1,63 @@
+<?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>1.0</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <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>
+ </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-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java
new file mode 100644
index 0000000000..696ab12daa
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package 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-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java
new file mode 100644
index 0000000000..6631aee907
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package 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-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java
new file mode 100644
index 0000000000..cd4eab052d
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java
@@ -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 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;
+ }
+}