Repository: cxf Updated Branches: refs/heads/2.7.x-fixes 9c275b132 -> ebe561f18
[CXF-6078] Checking service class interfaces if one of its non-interface super classes has no expected JAX-RS annotated method Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ebe561f1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ebe561f1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ebe561f1 Branch: refs/heads/2.7.x-fixes Commit: ebe561f18d72586a6536cf89fe446ea60f8d538a Parents: 9c275b1 Author: Sergey Beryozkin <[email protected]> Authored: Wed Nov 5 11:19:04 2014 +0000 Committer: Sergey Beryozkin <[email protected]> Committed: Wed Nov 5 11:23:00 2014 +0000 ---------------------------------------------------------------------- .../systest/jaxrs/AbstractNameServiceImpl.java | 30 ++++++++++++++ .../apache/cxf/systest/jaxrs/NameService.java | 43 ++++++++++++++++++++ .../cxf/systest/jaxrs/NameServiceImpl.java | 31 ++++++++++++++ 3 files changed, 104 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/ebe561f1/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractNameServiceImpl.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractNameServiceImpl.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractNameServiceImpl.java new file mode 100644 index 0000000..a8d7c01 --- /dev/null +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractNameServiceImpl.java @@ -0,0 +1,30 @@ +/** + * 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 org.apache.cxf.systest.jaxrs; + +import javax.ws.rs.core.Response; + +public abstract class AbstractNameServiceImpl { + + public Response set(String id) { + return Response.ok(id).build(); + } + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/ebe561f1/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameService.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameService.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameService.java new file mode 100644 index 0000000..5302b90 --- /dev/null +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameService.java @@ -0,0 +1,43 @@ +/** + * 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 org.apache.cxf.systest.jaxrs; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Response; + +@Path("/v1/names/") +@Produces({ "application/xml", "application/json" }) +@Consumes({ "application/xml", "application/json" }) +public interface NameService { + + @GET + @Path("/{id}") + Response get(@PathParam("id") String id); + + @PUT + @Path("/{id}") + Response set(@PathParam("id") String id); + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/ebe561f1/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameServiceImpl.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameServiceImpl.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameServiceImpl.java new file mode 100644 index 0000000..6f3f087 --- /dev/null +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/NameServiceImpl.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 org.apache.cxf.systest.jaxrs; + +import javax.ws.rs.core.Response; + +public class NameServiceImpl extends AbstractNameServiceImpl implements NameService { + + @Override + public Response get(String id) { + return Response.ok("{\"name\":\"Barry\"}").build(); + } + +}
