OK, I have a Spring client set up like this:

    <bean id="clientHandler" class="sample.client.soap.ClientHandler" />

    <bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
        <property name="serviceClass" value="sample.api.CustomerService"/>
        <property name="address"
value="http://localhost:8080/spring-sample-web/soap/CustomerService"/>
        <property name="handlers" ref="clientHandler"/>
    </bean>

    <bean id="client" class="sample.api.CustomerService"
          factory-bean="clientFactory" factory-method="create"/>

The problem is, when I start this up with the handlers property
present, I get this:

Exception in thread "main" java.lang.NullPointerException
        at 
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.buildHandlerChain(JaxWsProxyFactoryBean.java:156)
        at 
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.clientClientProxy(JaxWsProxyFactoryBean.java:98)
        at 
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:116)
        at 
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
        ...

The NPE in JaxWsProxyFactoryBean is:

        if (!chain.isEmpty()) { // next line is NPE
            ResourceManager resourceManager =
getBus().getExtension(ResourceManager.class);

In other words, it appears that getBus() returns null?  Any ideas?

Thanks,
      Aaron

Reply via email to