cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation
Date Wed, 17 Mar 2010 12:06:27 GMT

    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846393#action_12846393
] 

Sergey Beryozkin commented on CXF-2718:
---------------------------------------

It should not be the case.
Please see

http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/examples/cxf-jaxrs/src/main/resources/META-INF/spring/beans.xml

and

http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/examples/cxf-jaxrs/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/CustomerService.java

please also see
http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/examples/cxf-jaxrs/README.txt

on how to change 'cxf' to some other prefix.

Can you please confirm that no old service mix cxf osgi transport is loaded there ? CXF 2.2.6
has it embedded now.
Also, what CXF version servicemix/system repository includes ?
cheers, Sergey

> JAX-RS OSGi doesn't support relative path from annotation
> ---------------------------------------------------------
>
>                 Key: CXF-2718
>                 URL: https://issues.apache.org/jira/browse/CXF-2718
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.6
>         Environment: Ubuntu 9 
> servicemix-4.2.0-fuse-01-00
>            Reporter: george.goodrich
>
> I tried to use CXF JAX-RS in ServiceMix 4.2/Fuse ESB.
> Somehow I had to prefix /cfx/server-address in the @Path of the resource class.
> For example:
> I used the following Spring bean xml 
>   <import resource="classpath:META-INF/cxf/cxf.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
>     <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
>     <jaxrs:server id="helloworldService" address="/hello">
>         <jaxrs:serviceBeans>
>             <ref bean="helloworldSvc"/>
>         </jaxrs:serviceBeans>
>     </jaxrs:server>
>     <bean id="helloworldSvc" class=" com.test.HelloWorld"/>
> Then I had to use /cxf/hello EXACTLY in resource class like below:
> @Path("/cxf/hello")
> public class EquipmentRegistryService {
> 	
> 	 @GET
> 	 @Produces("text/html")
> 	 public String getXml() {
> 	        return "<html><body><h1>Hello World!</body></h1></html>";
> 	 }
> }
> If I changed the path to anything else(such as @Path("/greeting")), I got http 404. 
> In the non-OSGi environment, I am able to use relative path in the path annotation.
> For example: if the @Path("/greeting") is used, I can use /cxf/rest/hello/greeting to
reach the resource in non-OSGi environment.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message