Adding portions of the WSDL in case it helps:
<wsdl:definitions name="MessageRouter"
targetNamespace="http://xxxxx/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3c.org/2001/XMLSchema">
...
<wsdl:portType name="RoutePortType">
<wsdl:operation name="RouteMessage">
<wsdl:input message="RouteRequest" />
<wsdl:output message="RouteResponse" />
</wsdl:operation>
</wsdl:portType>
...
<wsdl:service name="MessageRouterService">
<wsdl:port binding="MessageRouterServiceSoapBinding"
name="MessageRouterServicePort">
<soap:address
location="http://xxxx/fxml/route"/>
</wsdl:port>
</wsdl:service>
> @WebServiceProvider(
> serviceName="MessageRouterService", <------------ mapped to
wsdl:service name
> portName="RoutePortType", <------------ mapped to
wsdl:portType name
> targetNamespace="http://xxxxx/", <------------ mapped to
wsdl:definitions targetNamespace
> wsdlLocation="WEB-INF/wsdl/MessageRouter.wsdl"
Thanks,
Mike Barlotta
Associate
Booz | Allen | Hamilton
-----Original Message-----
From: Barlotta, Michael [USA] [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 20, 2007 9:02 AM
To: [email protected]
Subject: RE: CXF @WebServiceProvider deployment issue
Nino: thanks, but unfortunately no... I have the required default
constructor (by virute of not having any constructor).
I found this posting, and added the cxf:bus configuration but I still
get the same error (see config below).
http://www.nabble.com/java.lang.NullPointerException-to14201919.html
I have been able to deploy @WebService based endpoints without
configuring the bus so not sure what I am missing. I was hoping to get
the XML passed straight through so that I could use my Castor mapping &
Java POJOs that have already been created/tested.
What am I missing?
Thanks,
> //------------- Spring config
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxws="http://cxf.apache.org/jaxws"
> xmlns:soap="http://cxf.apache.org/bindings/soap"
xmlns:cxf="http://cxf.apache.org/core"
> 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
> http://cxf.apache.org/bindings/soap
> http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
>
> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import
> resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import
> resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
<cxf:bus>
</cxf:bus>
> <jaxws:endpoint
> id="MessageRouter"
> implementor="#MessageRouterService"
> address="/fxml/route" />
Mike Barlotta
Associate
Booz | Allen | Hamilton
-----Original Message-----
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED]
Sent: Thursday, December 20, 2007 4:22 AM
To: [email protected]
Subject: Re: CXF @WebServiceProvider deployment issue
My best guess are that its a spring error that tells you that it could
not call the default constructor of the class backing the MessageRouter.
In your case its the messagerouterservice..
Do this seem to give any hints?
regards
Barlotta, Michael [USA] wrote:
> Hello, I am using CXF 2.0.3 and am deploying an appliation to JBoss
> using Spring and packaged as a WAR.
>
> On JBoss startup I get the following error:BeanCreationException:
> Error creating bean with name 'MessageRouter': Invocation of init
> method failed; nested exception is java.lang.NullPointerException
>
> Any idea what is causing this?
>
> Thanks!
> Mike
>
> //------------- Java Code Annotations
>
> @WebServiceProvider(
> serviceName="MessageRouterService",
> portName="RoutePortType",
> targetNamespace="http://xxxxx/",
> wsdlLocation="WEB-INF/wsdl/MessageRouter.wsdl"
> )
> @ServiceMode(Service.Mode.PAYLOAD)
> public class MessageRouterEndpoint implements Provider<Source>{
>
>
> public Source invoke(Source payload) {
> ...
> }
> }
>
> //------------- Spring config
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxws="http://cxf.apache.org/jaxws"
> xmlns:soap="http://cxf.apache.org/bindings/soap"
> 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
> http://cxf.apache.org/bindings/soap
> http://cxf.apache.org/schemas/configuration/soap.xsd">
>
> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import
> resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import
> resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
> <jaxws:endpoint
> id="MessageRouter"
> implementor="#MessageRouterService"
> address="/fxml/route" />
> ...
>
> //------------- Stack Trace
>
> 2007-12-19 17:08:16,591 55859 ERROR [STDERR] (main:) Dec 19, 2007
> 5:08:16 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service {http://xxxxx/}MessageRouterService from WSDL:
> WEB-INF/wsdl/MessageRouter.wsdl
> 2007-12-19 17:08:16,778 56046 ERROR
> [org.springframework.web.context.ContextLoader] (main:) Context
> initialization failed
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'MessageRouter': Invocation of init method
> failed; nested exception is java.lang.NullPointerException Caused by:
> java.lang.NullPointerException
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuil
> de
> r.java:226)
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuil
> de
> r.java:150)
> at
>
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> 117)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServi
> ce
> FromWSDL(ReflectionServiceFactoryBean.java:257)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
> Se
> rviceModel(ReflectionServiceFactoryBean.java:331)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Ref
> le
> ctionServiceFactoryBean.java:151)
> at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServi
> ce
> FactoryBean.java:93)
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoin
> t(
> AbstractWSDLBasedEndpointFactory.java:74)
> at
>
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
> 108)
> at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryB
> ea
> n.java:147)
> at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:288)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:228)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:341)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> av
> a:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> or
> Impl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at ...
>
>
>
--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684