Aha, another bus issue.
Please see my comments in the mail.
Javawerks wrote:
I have been unable to create a Spring-CXF client proxy. This is my spring
context:
<import resource="classpath:META-INF/cxf/cxf.xml"/>
    <import resource="classpath*:META-INF/cxf/cxf-extension-*.xml"/>
<context:component-scan
base-package="com.wdw.avail.service.consumer.food.beverage.facility"/>
<bean id="bus" class="org.apache.cxf.bus.CXFBusImpl"/>
You should not define the bus explicitly without any other cxf components (such as the DestinationFactoryManager instance) injected.

<bean id="foodBeverageFacilityServiceProxyFactory"
          class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
        <property name="clientFactoryBean">
            <bean class="org.apache.cxf.jaxws.JaxWsClientFactoryBean"/>
        </property>
        <property name="serviceClass"
value="com.wdpr.core.facility.wsdl.FoodBeverageFacilityServiceSEI"/>
        <property name="address"
value="${food.beverage.facility.service.provider.url}"/>
        <property name="bus" ref="bus"/>
You need to change the reference bean's name to "cxf ", which is the default bus that you import with "META-INF/cxf/cxf.xml"[1]
    </bean>
<bean id="foodBeverageFacilityServiceProxy"
          class="com.wdpr.core.facility.wsdl.FoodBeverageFacilityServiceSEI"
          factory-bean="foodBeverageFacilityServiceProxyFactory"
          factory-method="create"/>
I have tried creating the above client proxy with or without the 'bus' and
'clientFactoryBean'. Either way, I always get this exception:
Caused by: java.lang.NullPointerException
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:155)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:97)
        at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
        at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:92)
We all know the offending code: 154. DestinationFactoryManager dfm =
getBus().getExtension(DestinationFactoryManager.class);
155.                df = dfm.getDestinationFactoryForUri(getAddress());
That said, my unit (integration) test works like a charm. Once I deploy the
above client proxy in a web app to WAS6.1, though, the exception occurs.
FWIW, I have followed the WAS cxf wiki instructions, which did not alter the
outcome.
Any thoughts? Thanks!
[1] https://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml

Willem

Reply via email to