From ccbc8786378e618d74430f1267ee494f7142ea21 Mon Sep 17 00:00:00 2001 From: lresende Date: Sun, 1 Sep 2013 12:03:36 +0000 Subject: Spring sample using REST Binding git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1519261 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/sample/Helloworld.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sandbox/lresende/sca-2.x/samples/helloworld-spring/src/main/java/sample/Helloworld.java (limited to 'sandbox/lresende/sca-2.x/samples/helloworld-spring/src/main/java/sample/Helloworld.java') diff --git a/sandbox/lresende/sca-2.x/samples/helloworld-spring/src/main/java/sample/Helloworld.java b/sandbox/lresende/sca-2.x/samples/helloworld-spring/src/main/java/sample/Helloworld.java new file mode 100644 index 0000000000..b6fdbb9346 --- /dev/null +++ b/sandbox/lresende/sca-2.x/samples/helloworld-spring/src/main/java/sample/Helloworld.java @@ -0,0 +1,37 @@ +/* + * 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 sample; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface Helloworld { + + @GET + @Consumes(MediaType.WILDCARD) + @Produces(MediaType.TEXT_PLAIN) + String sayHello(@QueryParam("name") String name); + +} -- cgit v1.2.3