On May 13, 2014, at 4:21 PM, [email protected] wrote:

> Well adding an init-param to the servlet worked.
> 
>      <init-param>
>        <param-name>bus</param-name>
>        <param-value>server</param-value>
>      </init-param>
> 
> But it begs the question of how to have multiple buses in the same instance? 
> Our services are both providers and consumers of web services, so my goal is 
> to have separate client and server buses because they need different 
> configuration.

It depends on what you really are trying to do.  You can have multiple 
CXFServlets that are each configured for a different bus.   Thus, services on 
one bus are deployed in one context and services in the other are deployed 
elsewhere.     Or, you could have a “client” bus that the cxf:client things use 
and another for the services.  Etc….

You CAN also have multiple busses that share the same DestinationRegistry 
(which is what the Servlet really needs) by adding a bean of interface 
DestinationRegistry, implementation DestinationRegistryImpl to your context.

Dan



> 
> Rick
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:[email protected]] 
> Sent: Tuesday, May 13, 2014 3:01 PM
> To: [email protected]; Hansen, Richard W.
> Subject: Re: Named Bus in jaxws endpoint not working
> 
> 
> On May 13, 2014, at 3:50 PM, [email protected] wrote:
> 
>> None of that worked. I upgraded to 2.7.11 and even tried using the name 
>> "bus1" for all name attributes. I don't believe it is a matter of the bus 
>> and the end point getting hooked together. It looks to me like an issue with 
>> routing the request as if CXFServlet is not finding my named bus. Is there 
>> some other bit of configuration required?
> 
> What does the configuration for the servlet look like?  By default, it 
> searches for a bus named "cxf".   For a different bus name, you would need to 
> add a configuration of "bus" to the cxf servlet.
> 
> Dan
> 
> 
>> 
>> -----Original Message-----
>> From: Daniel Kulp [mailto:[email protected]]
>> Sent: Tuesday, May 13, 2014 10:13 AM
>> To: [email protected]; Hansen, Richard W.
>> Subject: Re: Named Bus in jaxws endpoint not working
>> 
>> 
>> On May 8, 2014, at 10:16 AM, [email protected] wrote:
>> 
>>> I'm trying to associate an endpoint with a named cxf Bus but getting the 
>>> 'Can't find the request for Observer' error. The service works fine if no 
>>> bus name is specified in the endpoint.  From the server output it appears 
>>> the service is found and loaded. I'm currently using cxf 2.5.1.
>>> 
>> 
>> Any chance of trying with a supported version of CXF?  Preferably 2.7.11.
>> 
>> You could try specifying everything on the <cxf:bus> like:
>> 
>> <cxf:bus  name="server" id="server" bus="server">
>> 
>> One of them might work.   Again, old version of CXF so not really sure what 
>> to look at.   Our tests all use <cxf:bus bus="bus1"> so maybe just flipping 
>> to that will work.
>> 
>> Dan
>> 
>> 
>> 
>>> May 08, 2014 8:22:27 AM
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>>> buildServiceFromClass
>>> INFO: Creating Service
>>> {http://pingService.example.wmg.provider.service.wellsfargo.com/}Ping
>>> S
>>> oapBindingImplService from class
>>> com.wellsfargo.service.provider.wmg.example.pingservice.PingPortType
>>> May 08, 2014 8:22:28 AM org.apache.cxf.endpoint.ServerImpl
>>> initDestination
>>> INFO: Setting the server's publish address to be /ping May 08, 2014
>>> 8:23:46 AM org.apache.cxf.transport.servlet.ServletController invoke
>>> WARNING: Can't find the the request for 
>>> http://localhost:7001/ExampleProject/services/ping's Observer
>>> 
>>> Here is the configuration -
>>> 
>>> <beans xmlns="http://www.springframework.org/schema/beans";
>>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>     xmlns:cxf="http://cxf.apache.org/core";
>>>     xmlns:jaxws="http://cxf.apache.org/jaxws";
>>>     xsi:schemaLocation="http://cxf.apache.org/core 
>>> http://cxf.apache.org/schemas/core.xsd
>>>                         http://www.springframework.org/schema/beans
>>>                         
>>> http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
>>>                         http://cxf.apache.org/jaxws
>>>                         http://cxf.apache.org/schemas/jaxws.xsd";>
>>> 
>>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>>> 
>>> <bean id="pingWebService" 
>>> class="com.wellsfargo.service.provider.wmg.example.pingService.PingSo
>>> a
>>> pBindingImpl"/>
>>> 
>>>  <cxf:bus name="server">
>>>  </cxf:bus>
>>> 
>>> <jaxws:endpoint bus="server" id="ping" implementor="#pingWebService" 
>>> address="/ping" /> </beans>
>>> 
>> 
>> --
>> Daniel Kulp
>> [email protected] - http://dankulp.com/blog Talend Community Coder - 
>> http://coders.talend.com
>> 
> 
> --
> Daniel Kulp
> [email protected] - http://dankulp.com/blog Talend Community Coder - 
> http://coders.talend.com
> 

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to