If you publish the endpoints with cxf-servlet.xml (Note it is not the
"META-INF/cxf/cxf-servlet.xml")
Since the bus is already loaded by CXFServlet, you do not need to import
cxf.xml , cxf-extension-soap.xml 

But if you define the endpoints in beans.xml which load with spring
application context listener.
You need to make sure the bus will be load rightly, in your case you already
setup the bus with the interceptors and when the CXFSpringBusFactory create
the bus , CXFServlet will not search the default configuration (include
cxf.xml , cxf-extens*.xml) for you, since the CXFSpringBusFactory detects
here is already cxf bus there. 

So you will get a NPE here.

Now you just need to set your bus configuration with <cxf:bus> tags as the
doc[1]

[1] http://cwiki.apache.org/CXF20DOC/bus-configuration.html

Willem. 


MyScreenName wrote:
> 
> Here's my config file.  I've used Spring 2.0.6 and 2.0.4.  Both seem to do
> the same thing.  Missing are the import statements for the cxf.xml,
> cxf-servlet.xml, etc. because I thought I read somewhere that you could
> provide all the config in one file.
> 
> Thanks,
> Bob
> 
> -----------------------------------  Beans Config File
> -------------------------------------
> 
> <beans xmlns="http://www.springframework.org/schema/beans";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xmlns:jaxws="http://cxf.apache.org/jaxws";
>       xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.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"/>
>     <bean id="SoapPreambleHandler"
> class="com.nortel.webservices.mpsip.interceptors.SoapPreambleHandler"/>
>     
>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>  
>         <property name="inInterceptors">
>             <list>
>                 <ref bean="logInbound"/>
>                 <ref bean="SoapPreambleHandler"/>
>             </list>
>         </property>
>         <property name="outInterceptors">
>             <list>
>                 <ref bean="logOutbound"/>
>             </list>
>         </property>
>         <property name="outFaultInterceptors">
>             <list>
>                 <ref bean="logOutbound"/>
>             </list>
>         </property>
>     </bean> 
>     
>     <jaxws:endpoint 
>         id="TestName" 
>         implementor="com.nortel.webservices.xxxxx.service.CTI_WebService"
>         address="http://localhost:8080/TestName_WebServices";>
>     </jaxws:endpoint>
> </beans>
> 
> ----------------------------------------------------------------------------------------------
> 
> 
> Willem2 wrote:
>> 
>> Hi,
>> 
>> I just checked the code,  it looks like you can't get the 
>> DestinationManager from bus .
>> Can you show the configuration file for us to dig the problem ?
>> BTW, which spring version are you using?
>> 
>> Willem.
>> MyScreenName wrote:
>>> CXF versions: 2.0.3 and 2.1
>>> Using JAXWS/Annotations
>>>
>>> When I start my server (Jboss) I get the following error.  The wierd
>>> thing
>>> is that the Web service works.  I can call the operations as well as
>>> retrieve the WSDL.  Anybody run into this?
>>>
>>> 16:33:09,099 ERROR [STDERR] Dec 6, 2007 4:33:09 PM
>>> org.apache.cxf.configuration.spring.ConfigurerImpl <init>
>>> WARNING: Failed to create application context.
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'TestName': Invocation of init me
>>> thod failed; nested exception is java.lang.NullPointerException
>>> Caused by: java.lang.NullPointerException
>>>         at
>>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.
>>> java:157)
>>>         at
>>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java
>>> :99)
>>>   
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/java.lang.NullPointerException-tf4958831.html#a14224738
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to