From 98eec492c08e491401841dd33e8392b41c1e6660 Mon Sep 17 00:00:00 2001 From: nash Date: Thu, 10 Jun 2010 20:27:31 +0000 Subject: 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 --- .../services/smsgateway-jaxws/build.xml | 34 ++++++++++++ .../services/smsgateway-jaxws/pom.xml | 63 ++++++++++++++++++++++ .../smsgateway/SMSGatewayService.java | 32 +++++++++++ .../smsgateway/SMSGatewayServiceBootstrap.java | 31 +++++++++++ .../smsgateway/SMSGatewayServiceImpl.java | 33 ++++++++++++ 5 files changed, 193 insertions(+) create mode 100644 sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/build.xml create mode 100644 sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/pom.xml create mode 100644 sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayService.java create mode 100644 sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java create mode 100644 sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceImpl.java (limited to 'sca-java-1.x/tags/travelsample-1.0/services/smsgateway-jaxws') 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 @@ + + + + + + + + + + + + + + + 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 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0 + ../../pom.xml + + scatours-service-smsgateway-jaxws + Apache Tuscany SCA Tours SMS Gateway JAX-WS Service + + + + javax.xml.ws + jaxws-api + 2.1 + + + javax.xml.soap + saaj-api + + + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-jaxws-runtime.jar + com.tuscanyscatours.smsgateway.SMSGatewayServiceBootstrap + + + + + + + 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; + } +} -- cgit v1.2.3