You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by helander <le...@gmail.com> on 2013/04/06 10:03:15 UTC

Only 1 of 3 services gets "registered"

I am using trying too use the non-Spring CXF servlet  (JBoss web container) 

@WebServlet(value="/mycxf/*", name="MyCxfServlet") 
public class CxfServlet extends CXFNonSpringServlet { 
    public void init(ServletConfig sc) throws ServletException { 
                setBus(BusFactory.getDefaultBus()); 
        super.init(sc); 
        } 

} 

With the following routes in a DefaultCamelContext 

from("cxf:/xyzabc?dataFormat=MESSAGE&serviceClass=DummyService").to("log:input"); 

from("cxf:/abcxyz?dataFormat=MESSAGE&serviceClass=DummyServiceA").to("log:input"); 

from("cxf:/123456?dataFormat=MESSAGE&serviceClass=DummyServiceB").to("log:input"); 
        
When I access the server at .../mycxf  I get a service list that only
contains one of the three services defined by the routes. 

I can append the service address and ?wsdl and get the "WSDL" content
(generated from the serviceClass). 

Anyone that have any ideas what the problem could be? 

Thanks 

Lars 

 




--
View this message in context: http://cxf.547215.n5.nabble.com/Only-1-of-3-services-gets-registered-tp5725927.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Only 1 of 3 services gets "registered"

Posted by helander <le...@gmail.com>.
Ok, I will try to find a way to do that.

I am currently using the new CDI features of Camel 2.11 and out-of-the box I
get the current ordering. I need to experiment to see if I can find a good
way to get the ordering the other way around. Any ideas are welcome :)

Thanks

Lars



--
View this message in context: http://cxf.547215.n5.nabble.com/Only-1-of-3-services-gets-registered-tp5725927p5726023.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Only 1 of 3 services gets "registered"

Posted by Willem jiang <wi...@gmail.com>.
Can you let the CxfServlet initialize first?
I don't think camel-cxf can start rightly when the transport layer is not ready.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem




On Tuesday, April 9, 2013 at 3:14 PM, helander wrote:

> Willem,
> the camel context is started before the CxfServlet is initialized.
>  
> Thanks
> Lars
>  
>  
>  
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Only-1-of-3-services-gets-registered-tp5725927p5726005.html
> Sent from the cxf-user mailing list archive at Nabble.com (http://Nabble.com).




Re: Only 1 of 3 services gets "registered"

Posted by helander <le...@gmail.com>.
Willem,
the camel context is started before the CxfServlet is initialized.

Thanks
Lars



--
View this message in context: http://cxf.547215.n5.nabble.com/Only-1-of-3-services-gets-registered-tp5725927p5726005.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Only 1 of 3 services gets "registered"

Posted by Willem jiang <wi...@gmail.com>.
Hi,  
How did you start the camel context?
Did you start it before deploying the CxfServlet ?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Saturday, April 6, 2013 at 10:20 PM, helander wrote:

> Hi Willem,
>  
> no I can not access them. It seems like it is not just something wrong with
> the service registry.
>  
> It's not always (after each restart) the same service that is shown, it
> could be any of the three (randomly).
>  
> Any other idea? Somthing that I could try to examine in order to find out
> what the problem could be?
>  
> Thanks
>  
> Lars
>  
>  
>  
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Only-1-of-3-services-gets-registered-tp5725927p5725929.html
> Sent from the cxf-user mailing list archive at Nabble.com (http://Nabble.com).




Re: Only 1 of 3 services gets "registered"

Posted by helander <le...@gmail.com>.
Hi Willem,

no I can not access them. It seems like it is not just something wrong with
the service registry.

It's not always (after each restart)  the same service that is shown, it
could be any of the three (randomly).

Any other idea? Somthing that I could try to examine in order to find out
what the problem could be?

Thanks

Lars



--
View this message in context: http://cxf.547215.n5.nabble.com/Only-1-of-3-services-gets-registered-tp5725927p5725929.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Only 1 of 3 services gets "registered"

Posted by Willem jiang <wi...@gmail.com>.
Hi,

Can you access these three services with the addresses those you published?
It looks more like a services registry issue.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Saturday, April 6, 2013 at 4:03 PM, helander wrote:

> I am using trying too use the non-Spring CXF servlet (JBoss web container)  
>  
> @WebServlet(value="/mycxf/*", name="MyCxfServlet")  
> public class CxfServlet extends CXFNonSpringServlet {  
> public void init(ServletConfig sc) throws ServletException {  
> setBus(BusFactory.getDefaultBus());  
> super.init(sc);  
> }  
>  
> }  
>  
> With the following routes in a DefaultCamelContext  
>  
> from("cxf:/xyzabc?dataFormat=MESSAGE&serviceClass=DummyService").to("log:input");  
>  
> from("cxf:/abcxyz?dataFormat=MESSAGE&serviceClass=DummyServiceA").to("log:input");  
>  
> from("cxf:/123456?dataFormat=MESSAGE&serviceClass=DummyServiceB").to("log:input");  
>  
> When I access the server at .../mycxf I get a service list that only
> contains one of the three services defined by the routes.  
>  
> I can append the service address and ?wsdl and get the "WSDL" content
> (generated from the serviceClass).  
>  
> Anyone that have any ideas what the problem could be?  
>  
> Thanks  
>  
> Lars  
>  
>  
>  
>  
>  
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Only-1-of-3-services-gets-registered-tp5725927.html
> Sent from the cxf-user mailing list archive at Nabble.com (http://Nabble.com).