So I want to add some custom logging, but first I just tried the
logging example in the wiki page for configuration.  I get an
exception on startup.  What am I doing wrong?  The only
difference I see is between my cxf-servlet.xml and the example is
that the example has no jaxws:endpoint entires.

CXF 2.0.4, JBoss 4.2.2, JDK 1.5.0

My cxf-servlet.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd";>

    <bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
    <bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>

    <cxf:bus>
        <cxf:inInterceptors>
            <ref bean="logInbound"/>
        </cxf:inInterceptors>
        <cxf:outInterceptors>
            <ref bean="logOutbound"/>
        </cxf:outInterceptors>
        <cxf:inFaultInterceptors>
            <ref bean="logOutbound"/>
        </cxf:inFaultInterceptors>
    </cxf:bus> 

    <jaxws:endpoint
        id="tx"
        implementor="com.foobar.txmanager.ws.TxImpl"
        wsdlLocation="WEB-INF/wsdl/Tx.wsdl"
        address="/tx">
    </jaxws:endpoint>
    <jaxws:endpoint
        id="person"
        implementor="com.foobar.core.ws.PersonImpl"
        wsdlLocation="WEB-INF/wsdl/Person.wsdl"
        address="/person">
    </jaxws:endpoint>
</beans>

I tried the "plain Spring bean elements" example too and got
the same error.

The error:

INFO: Build endpoints from config-location: /WEB-INF/cxf-servlet.xml
2008-02-29 12:02:53,393 INFO  [XmlBeanDefinitionReader] - Loading XML
bean definitions from /WEB-INF/cxf-servlet.xml
2008-02-29 12:02:53,503 INFO  [GenericApplicationContext] - Refreshing
[EMAIL PROTECTED]:
display name
[EMAIL PROTECTED];
startup date [Fri Feb 29 12:02:53 MST 2008]; root of context hierarchy
2008-02-29 12:02:53,503 INFO  [GenericApplicationContext] - Bean factory
for application context
[EMAIL PROTECTED]:
[EMAIL PROTECTED]
145e
2008-02-29 12:02:53,518 INFO  [DefaultListableBeanFactory] -
Pre-instantiating singletons in
[EMAIL PROTECTED]
145e: defining beans [logInbound,logOutbound,cxf,tx,person]; root of
factory hierarchy
2008-02-29 12:02:54,081 ERROR [STDERR] - Feb 29, 2008 12:02:54 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://www.bricsnet.com/Tx}TxService from WSDL:
WEB-INF/wsdl/Tx.wsdl
2008-02-29 12:02:54,081 INFO  [DefaultListableBeanFactory] - Destroying
singletons in
[EMAIL PROTECTED]
145e: defining beans [logInbound,logOutbound,cxf,tx,person]; root of
factory hierarchy
2008-02-29 12:02:54,097 ERROR [[/ws]] - StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'tx': Invocation of init method failed; nested exception
is java.lang.NullPointerException
Caused by:
java.lang.NullPointerException
        at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:
81)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
FromWSDL(ReflectionServiceFactoryBean.java:269)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
rviceModel(ReflectionServiceFactoryBean.java:360)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
ctionServiceFactoryBean.java:156)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
FactoryBean.java:89)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
AbstractWSDLBasedEndpointFactory.java:74)
        at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
108)
        at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
n.java:147)
        at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:299)
        at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:230)
        at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:181)
        at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:352)
                ...


Thanks,
Dan

Reply via email to