You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "george.goodrich (JIRA)" <ji...@apache.org> on 2010/03/16 23:49:27 UTC

[jira] Created: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "george.goodrich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847171#action_12847171 ] 

george.goodrich commented on CXF-2718:
--------------------------------------

FYI

I installed the cxf-jaxrs example by installing the feature from web console, it works.
Then I osgi:stop the bundle, and osgi:start the bundle, the symptom came back.

If I osgi:install the example bundle, and osgi:start it, it didn't work.

I rebuilt the example in my eclipse, and it has the same issue. 

Below are the context and POM xml for the bundle.

Thanks a lot for the help.


<?xml version="1.0" encoding="UTF-8"?>
<!--
	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.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:jaxrs="http://cxf.apache.org/jaxrs"
        xmlns:osgi="http://www.springframework.org/schema/osgi"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">

  <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
    <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />

    <jaxrs:server id="myService" address="/svc">
        <jaxrs:serviceBeans>
            <ref bean="svcBean"/>
        </jaxrs:serviceBeans>
    </jaxrs:server>


    <bean id="svcBean" class="com.test.SvcBeanImpl"/>

</beans>

POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

	<parent>
		<artifactId>features</artifactId>
		<groupId>org.apache.servicemix.features</groupId>
		<version>4.0.0</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
  <groupId>com.test</groupId>
  <artifactId>svc</artifactId>
  <packaging>bundle</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>svcbundle</name>
  <url>http://maven.apache.org</url>

  <properties>
	<servicemix.specs.version>1.4.0</servicemix.specs.version>
  	<jaxb.api.version>2.1</jaxb.api.version>
      <commons-httpclient.version>3.1_4</commons-httpclient.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.jsr311-api-1.0</artifactId>
            <version>1.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.specs</groupId>
            <artifactId>org.apache.servicemix.specs.jaxb-api-${jaxb.api.version}</artifactId>
            <version>${servicemix.specs.version}</version>
        </dependency>

       <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>
            <version>${commons-httpclient.version}</version>
        </dependency>

  </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                        <Import-Package>
                                javax.wsdl,
                                javax.xml.bind,
                                javax.xml.bind.annotation,
                                javax.ws.rs,
                                META-INF.cxf,
                                META-INF.cxf.osgi,
                                org.apache.cxf.bus,
                                org.apache.cxf.bus.spring,
                                org.apache.cxf.bus.resource,
                                org.apache.cxf.resource,
                                org.apache.cxf.configuration.spring,
                                org.apache.cxf.binding,
                                org.apache.cxf.jaxrs.utils,
                                org.apache.cxf.transport.http_osgi,
                                org.springframework.beans.factory.config,
                                com.test.SvcBeanImpl,
                                org.apache.commons.httpclient, 
                                org.apache.commons.httpclient.methods
                        </Import-Package>
                        <Require-Bundle>org.apache.cxf.bundle</Require-Bundle>
                        <Export-Package>com.test
                        </Export-Package>
                        <DynamicImport-Package>javax.ws.rs.*</DynamicImport-Package>
                     </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848708#action_12848708 ] 

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

I recall having some issues with a pax web extender 'losing' the context after a cxf bundle was refreshed or restarted. It refreshes itself whenever a cxf jaxrs demo restarts, possibly to do with the fact it has some optional dependencies(jettison related, etc). I actually submitted a patch, just can't find a link at the moment, but I know it was applied by Alin Dreghiciu. It was a transient thread-safety related issue.

> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847149#action_12847149 ] 

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

thanks for confirming it... I was about to download an apache service mix features distribution and run the demo...Can you please attach a bundle configuration (spring dm or blueprint). as well as the pom.xml ? We might be able to spot something...

let us know how it goes
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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Updated: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "george.goodrich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

george.goodrich updated CXF-2718:
---------------------------------

    Attachment: configuration-status-20100318-1258-0700.txt

system and bundle information dump

> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "george.goodrich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847087#action_12847087 ] 

george.goodrich commented on CXF-2718:
--------------------------------------

Sergey,
Thanks a lot for the reply.
It seems to me there is only one cxf bundle installed. The version is 2.2.6-fuse-01-00. this is also the version included in fuse-servicemix/system. BTW it's a brand new deployment from the latest fuse release.

I also attached the configuration dump from console and hope it helps.

Thanks again.



> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "george.goodrich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862765#action_12862765 ] 

george.goodrich commented on CXF-2718:
--------------------------------------

Sergey,
What do I need to do to get this issue fixed? 
How can I use servicemix and deploy bundles that need to have different JAX-RS resource root?

Thanks.

> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847104#action_12847104 ] 

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

hi,

can you please confirm examples/cxf-jaxrs demo works for you ?
unfortunately, I won't be able to investigate any fuse or servicemix related issues.

If cxf jaxrs demo works (the last time I looked at it it worked fine, with no /cxf in the resource class) then it could be an issue with your bundle. Otherwise please post a query to the fuse esb forum
thanks 

> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Commented: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "george.goodrich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847139#action_12847139 ] 

george.goodrich commented on CXF-2718:
--------------------------------------

I installed the cxf-jaxrs example, and it works fine.
I will look into my development environment.

Thanks.



> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.


[jira] Resolved: (CXF-2718) JAX-RS OSGi doesn't support relative path from annotation

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-2718.
-----------------------------------

    Resolution: Won't Fix

Hi

I'm resolving it as won't fix die to the fact that the issue you;re seeing is most likely related to ServiceMix/PaxWeb

> 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
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> 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.