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"/>
 
    <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"/>
    </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!
-- 
View this message in context: 
http://www.nabble.com/How-to-create-a-Spring-CXF-Client-Proxy-tp17068045p17068045.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to