cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (CXF-935) Provider not working when its WSDL is supplied from spring configuration.
Date Tue, 26 Feb 2008 22:00:53 GMT

     [ https://issues.apache.org/jira/browse/CXF-935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp reassigned CXF-935:
-------------------------------

    Assignee: Daniel Kulp

> Provider not working when its WSDL is supplied from spring configuration.
> -------------------------------------------------------------------------
>
>                 Key: CXF-935
>                 URL: https://issues.apache.org/jira/browse/CXF-935
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.0.3
>            Reporter: Jervis Liu
>            Assignee: Daniel Kulp
>             Fix For: 2.1
>
>
> http://www.nabble.com/Generic-Provider%3CDOMSource%3E-server-and-WSDL-metadata-tf4287661.html
> I am trying to build a generic server using Provider<DOMSource>. But I
> want to make the WSDL metadata, wsdlLocation, serviceName, portName,
> etc. to be user configurable, without having to re-compile the Provider
> with new WebServiceProvider annotations for every new WSDL. 
> I thought I'd be able to do this with an empty WebServiceProvider
> annotation for my Provider like below:
> <snip>
> @WebServiceProvider()
> @ServiceMode(value = Service.Mode.MESSAGE)
> public final class GenericMessageProvider implements Provider<DOMSource>
> {
> <snip>
> And the jaxws:endpoint element in a spring container cxf-beans.xml, like
> below:
> <snip>
> 	<jaxws:endpoint id="myEndpoint" implementor="#genericProvider"
> 		address="/myLocation/" serviceName="msp:MyService"
> 		wsdlLocation="classpath:wsdl/MyWSDL.wsdl"
> 		xmlns:msp="http://my.service">
> 	</jaxws:endpoint>
> <snip>
> But this throws an NPE when I load the cxf-beans.xml using Tomcat. 
> Aug 17, 2007 12:05:04 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
> INFO: Creating Service {http://my.service}MyService from WSDL: classpath:wsdl/MyWSDL.wsdl
> 2007-08-17 12:05:05,220 4696 [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory
 - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@13c296b:
defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,wsdlConfiguration,wsdlResource,myEndpoint,genericProvider,schemaValidator,responseDBSource,scriptedKeyGenerator,bdbResponseFinder,defaultResponseSource,scriptedTransformer,bsfScriptFactory];
root of factory hierarchy
> 2007-08-17 12:05:05,260 4736 [main] ERROR org.springframework.web.context.ContextLoader
 - Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'myEndpoint': Invocation of init method failed; nested exception is java.lang.NullPointerException
> Caused by: 
> java.lang.NullPointerException
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperationsForProvider(JaxWsServiceFactoryBean.java:196)
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:180)
> 	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:211)
> 	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:262)
> 	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:143)
> 	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:89)
> Analysis:
>  in ReflectionServiceFactoryBean.java line 956, method getEndpointInfo():
> public EndpointInfo getEndpointInfo() {
>         return getService().getEndpointInfo(getEndpointName());
> }
> the getService() returns the service model built from WSDL file, but somehow it does
not contain an endpoint whose name is getEndpointName() which might come from java class.

> [Bokde, Dhiraj] I debugged it a little, and the getEndpointName() method
> returns GenericProviderService instead of the serviceName in the
> endpoint. 
> I have tried adding the endpointName attribute as well and it didn't
> make any difference.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message