01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.customer.book;
19:
20: import javax.jws.WebParam;
21: import javax.jws.WebResult;
22: import javax.jws.WebService;
23:
24: import org.codehaus.jra.Delete;
25: import org.codehaus.jra.Get;
26: import org.codehaus.jra.HttpResource;
27: import org.codehaus.jra.Post;
28: import org.codehaus.jra.Put;
29:
30: @WebService(targetNamespace="http://book.acme.com")
31: public interface BookService {
32:
33: @Get
34: @HttpResource(location="/books")
35: @WebResult(name="Books")
36: Books getBooks();
37:
38: @Get
39: @HttpResource(location="/books/{id}")
40: Book getBook(@WebParam(name="GetBook")
41: GetBook getBook) throws BookNotFoundFault;
42:
43: @Get
44: @HttpResource(location="/books/another/{id}")
45: Book getAnotherBook(@WebParam(name="GetAnotherBook")
46: GetAnotherBook getAnotherBook) throws BookNotFoundFault;
47:
48: @Put
49: @HttpResource(location="/books/{id}")
50: void updateBook(@WebParam(name="Book")
51: Book c);
52:
53: @Post
54: @HttpResource(location="/books")
55: long addBook(@WebParam(name="Book")
56: Book c);
57:
58: @Delete
59: @HttpResource(location="/books/{id}")
60: void deleteBook(@WebParam(name="id")
61: long id) throws BookNotFoundFault;
62:
63: }
|