You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "TangYong (JIRA)" <ji...@apache.org> on 2012/12/21 04:33:12 UTC

[jira] [Commented] (DOSGI-145) Multiple services using HTTP Service and published from the same bundle do not work

    [ https://issues.apache.org/jira/browse/DOSGI-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537652#comment-13537652 ] 

TangYong commented on DOSGI-145:
--------------------------------

After I am deploying greeter_rest demo, while I request "http://localhost:8080/greeter" , the result is as following:

Available SOAP services:

Available RESTful services:
Endpoint address: http://localhost:8080/greeter/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService
WADL : http://localhost:8080/greeter/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService?_wadl

while I request "http://localhost:8080/greeter2" , the result is as following:

Available SOAP services:

Available RESTful services:
Endpoint address: http://localhost:8080/greeter2/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService2
WADL : http://localhost:8080/greeter2/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService2?_wadl

Both the two endpoints are accessible, so, please Sergey does a detailed description of the issue.

In addition, there is question about "No HTTPService found " and I have sent a mail to user mail list.
                
> Multiple services using HTTP Service and published from the same bundle do not work 
> ------------------------------------------------------------------------------------
>
>                 Key: DOSGI-145
>                 URL: https://issues.apache.org/jira/browse/DOSGI-145
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>          Components: DSW
>            Reporter: Sergey Beryozkin
>             Fix For: 1.4
>
>
> This issue was reported at the CXF users list and now is reproducible on the trunk.
> Consider the following activator code:
> {code:java}
> public class Activator implements BundleActivator {
>     private ServiceRegistration registration;
>     private ServiceRegistration registration2;
>     public void start(BundleContext bc) throws Exception {
>         Dictionary props = getProperties("/greeter");
>         registration = bc.registerService(GreeterService.class.getName(), 
>                                           new GreeterServiceImpl(), props);
>         
>         props = getProperties("/greeter2");
>         registration2 = bc.registerService(GreeterService2.class.getName(), 
>                                           new GreeterServiceImpl2(), props);
>         
>     }
>     private Dictionary getProperties(String address) { 
>     	Dictionary props = new Hashtable();
>         props.put("service.exported.interfaces", "*");
>         props.put("service.exported.configs", "org.apache.cxf.rs");
>         props.put("service.exported.intents", "HTTP");
>         props.put("org.apache.cxf.rs.httpservice.context", address);
>         return props;
>     }
>     
>     public void stop(BundleContext bc) throws Exception {
>         registration.unregister();
>         registration2.unregister();
>     }
> }
> {code}
> This is RS activator code but the issue will show itself for WS endpoints too.
> After the deployment, requesting a service at "/greeter" will make "/greeter2" endpoint not accessible and the other way around.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira