You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "prasad.pbc" <pr...@gmail.com> on 2011/07/22 06:59:27 UTC

Getting ERROR

Hi iam new user of CXF Framework.
 I have used Tomcat 7.014 , Helios Eclipse and CXF 2.41.

Iam trying to create a basic service from Java2WSDL.
iam getting below error while starting my Tomcat server , please help me in
resolving this error.

Jul 22, 2011 6:58:47 AM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service
{http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService from
WSDL: wsdl/testservice.wsdl
Jul 22, 2011 6:58:49 AM
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
INFO: Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@29d294:
defining beans
[cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,testservice];
root of factory hierarchy
Jul 22, 2011 6:58:49 AM
org.springframework.beans.factory.support.DisposableBeanAdapter
invokeCustomDestroyMethod
WARNING: Invocation of destroy method 'shutdown' failed on bean with name
'cxf': org.springframework.beans.factory.BeanCreationNotAllowedException:
Error creating bean with name
'org.apache.cxf.binding.soap.SoapBindingFactory': Singleton bean creation
not allowed while the singletons of this factory are in destruction (Do not
request a bean from a BeanFactory in a destroy method implementation!)
Jul 22, 2011 6:58:49 AM org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'testservice': Invocation of init method failed; nested exception
is javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service
{http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
        at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
        at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service
{http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
        at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
        ... 20 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Could not find definition for service
{http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
        at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:139)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:382)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:499)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
        at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
        at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
        at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
        at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
        ... 29 more
Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'testservice': Invocation of init method failed; nested exception
is javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service
{http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
        at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
        at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service
{http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
        at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
        ... 20 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Could not find definition for service
{http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
        at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:139)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:382)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:499)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
        at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
        at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
        at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
        at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
        ... 29 more
Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
startInternal
SEVERE: Error listenerStart
Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
startInternal
SEVERE: Context [/PRWeb] startup failed due to previous errors
Jul 22, 2011 6:58:49 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8084"]
Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8012"]
Jul 22, 2011 6:58:49 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 19328 ms


--
View this message in context: http://cxf.547215.n5.nabble.com/Getting-ERROR-tp4621802p4621802.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Getting ERROR

Posted by Prasad p <pr...@gmail.com>.
On Thu, Jul 28, 2011 at 6:19 PM, Prasad p <pr...@gmail.com> wrote:

> Dan,
> Regarding setting SOAP Header in response.
> Step 1. i created the custom responseHeader object  which has attributes
> like service version , transaction time ..etc
> .
> Step 2: while defining my interface and impl class i have method parameter
> with request header and responseHeader
>    @WebParam(header=true, name="requestHeader", mode=WebParam.Mode.IN<http://webparam.mode.in/>
> ,partName="requestHeader")
>  RequestHeader requestHeader
> @WebParam(header=true, name="responseHeader",
>  mode=WebParam.Mode.OUT,partName="responseHeader")
> Holder<responseHoder> responseHolder.
>
> Step 3: Request header is working fine and iam getting the request header
> data in my impl class.
>            Now in the impl class i construct my custome ResponseHeader
> object and setting it to holder
>           ResponseHeader rsh = new ResponseHeader();
>          rsh.setServiceversion("1.0");
>         rsh.setBuildVersion("BV1.0");
>         etc....
>        and then
>       responseHodler.value =rsh;
>     but iam not getting the SOAPHeader data in my response . did i missed
> anything in specific.
>
> Thanks
> Prabhu
>
>
>
>
> On Thu, Jul 28, 2011 at 12:54 AM, Daniel Kulp <dk...@apache.org> wrote:
>
>> On Wednesday, July 27, 2011 6:34:44 PM Prasad p wrote:
>> > Hi Dan,
>> >  Thanks for the info, i have a couple of questions on Interceptors , may
>> be
>> > basic , please help me to understand.
>> >  1. Why we need Interceptors in CXF Webservices or Any WebServices.
>>
>> You likely don't.   I would say 80% or more of the people that use CXF for
>> webservices don't ever write an interceptor as most  of the required
>> functionality is already built in.
>>
>>
>> >   2. Ist it mandatory to write interceptors for my Services.
>>
>> No.
>>
>> >   3. Right now iam using annotation to defined in request parameter for
>>
>> > getting SOAPHeader
>> >    @WebParam(header=true, name="requestHeader",
>> > mode=WebParam.Mode.IN <http://webparam.mode.in/>
>> ,partName="requestHeader")
>> > RequestHeader requestHeader
>> >  @WebParam(header=true, name="responseHeader",
>> > mode=WebParam.Mode.OUT,partName="responseHeader") Holder<responseHoder>
>> > responseHolder.
>> >
>> > iam able to get theSOAP header sucessfully and for response SOAPHeader ,
>> iam
>> > setting the responseHeader object to
>> > @resource
>> > WebServiceContext ctx = null;
>> >
>> > MessageContext msgCtx = ctx.getMessagecontext();
>> >
>> > create the responseHeader
>> > msgCtx.put(Header.HEADER_LIST,headers);
>> >
>> > iam sucessfully putting the SOAPHEADER Response.
>> >
>> > is the above is right way , am i deviating anything basics.
>>
>> If you have the Holder passed in, why not just:
>>
>> responseHodler.value = new ResponseHeader();
>>
>>
>>
>> > 4. What happens if i wont write interceptors to my services??
>>
>> Should be fine.   :-)
>>
>> Dan
>>
>>
>> >
>> > Please help me to understand this , since iam new to CXF Framework.
>> >
>> > Thanks
>> > Prasad
>> >
>> > On Tue, Jul 26, 2011 at 2:26 AM, Daniel Kulp <dk...@apache.org> wrote:
>> > > Check the @WebService annotation on the TestServiceImplService class
>> and
>> > > make
>> > > sure all the attributes are properly specified and match the expected
>> > > values
>> > > in the WSDL.   It looks like the servicename and such are not
>> specified
>> > > so it's not matching anything in the WSDL.  Thus, the exception is
>> > > thrown.
>> > >
>> > > Dan
>> > >
>> > > On Thursday, July 21, 2011 9:59:27 PM prasad.pbc wrote:
>> > > > Hi iam new user of CXF Framework.
>> > > >
>> > > >  I have used Tomcat 7.014 , Helios Eclipse and CXF 2.41.
>> > > >
>> > > > Iam trying to create a basic service from Java2WSDL.
>> > > > iam getting below error while starting my Tomcat server , please
>> > > > help me
>> > >
>> > > in
>> > >
>> > > > resolving this error.
>> > > >
>> > > > Jul 22, 2011 6:58:47 AM
>> > > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>> > > > buildServiceFromWSDL
>> > > > INFO: Creating Service
>> > > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService
>> > > > from
>> > > > WSDL: wsdl/testservice.wsdl
>> > > > Jul 22, 2011 6:58:49 AM
>> > > > org.springframework.beans.factory.support.DefaultSingletonBeanRegist
>> > > > ry
>> > > > destroySingletons
>> > > > INFO: Destroying singletons in
>> > >
>> > >
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@29d
>> > > 294
>> > >
>>  > > > defining beans
>> > >
>> > >
>> [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apa
>> > > che.
>> > >
>> > >
>> cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExte
>> > > nsio
>> > >
>> > >
>> nPostProcessor,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache
>> > > .cxf
>> > >
>> > >
>> .binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEdi
>> > > torC
>> > >
>> > > > onfigurer,testservice]; root of factory hierarchy
>> > > > Jul 22, 2011 6:58:49 AM
>> > > > org.springframework.beans.factory.support.DisposableBeanAdapter
>> > > > invokeCustomDestroyMethod
>> > > > WARNING: Invocation of destroy method 'shutdown' failed on bean with
>> > > > name 'cxf':
>> > > > org.springframework.beans.factory.BeanCreationNotAllowedException:
>> > > > Error creating bean with name
>> > > > 'org.apache.cxf.binding.soap.SoapBindingFactory': Singleton bean
>> > > > creation not allowed while the singletons of this factory are in
>> > > > destruction (Do
>> > >
>> > > not
>> > >
>> > > > request a bean from a BeanFactory in a destroy method
>> > > > implementation!)
>> > > > Jul 22, 2011 6:58:49 AM
>> > > > org.springframework.web.context.ContextLoader
>> > > > initWebApplicationContext
>> > > > SEVERE: Context initialization failed
>> > > > org.springframework.beans.factory.BeanCreationException: Error
>> > > > creating
>> > >
>> > > bean
>> > >
>> > > > with name 'testservice': Invocation of init method failed; nested
>> > >
>> > > exception
>> > >
>> > > > is javax.xml.ws.WebServiceException:
>> > > > org.apache.cxf.service.factory.ServiceConstructionException: Could
>> > > > not
>> > >
>> > > find
>> > >
>> > > > definition for service
>> > > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>> > > >
>> > > >         at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .createBean(AbstractAutowireCapableBeanFactory.java:456) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
>> > > t(Ab
>> > >
>> > > > stractBeanFactory.java:291) at
>> > >
>> > >
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
>> > > etSi
>> > >
>> > > > ngleton(DefaultSingletonBeanRegistry.java:222) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
>> > > Abst
>> > >
>> > > > ractBeanFactory.java:288) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
>> > > stra
>> > >
>> > > > ctBeanFactory.java:190) at
>> > >
>> > >
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
>> > > Inst
>> > >
>> > > > antiateSingletons(DefaultListableBeanFactory.java:580) at
>> > >
>> > >
>> org.springframework.context.support.AbstractApplicationContext.finishBea
>> > > nFac
>> > >
>> > > > toryInitialization(AbstractApplicationContext.java:895) at
>> > >
>> > >
>> org.springframework.context.support.AbstractApplicationContext.refresh(A
>> > > bstr
>> > >
>> > > > actApplicationContext.java:425) at
>> > >
>> > >
>> org.springframework.web.context.ContextLoader.createWebApplicationContex
>> > > t(Co
>> > >
>> > > > ntextLoader.java:276) at
>> > >
>> > >
>> org.springframework.web.context.ContextLoader.initWebApplicationContext(
>> > > Cont
>> > >
>> > > > extLoader.java:197) at
>> > >
>> > >
>> org.springframework.web.context.ContextLoaderListener.contextInitialized
>> > > (Con
>> > >
>> > > > textLoaderListener.java:47) at
>> > >
>> > >
>>
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
>> > > > 4723) at
>> > >
>> > >
>> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
>> > > 6)
>> > >
>> > > >         at
>> > >
>> > >
>> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
>>  > > 1)
>> > >
>> > > >         at
>> > > >         java.util.concurrent.FutureTask$Sync.innerRun(Unkno
>> > > >         wn Source) at
>> > > >         java.util.concurrent.FutureTask.run(Unknown Source)
>> > > >         at
>> > > >         java.util.concurrent.ThreadPoolExecutor$Worker.runT
>> > > >         ask(Unknown
>> > > >
>> > > > Source)
>> > > >
>> > > >         at
>> > > >         java.util.concurrent.ThreadPoolExecutor$Worker.run(
>> > > >         Unknown
>> > > >
>> > > > Source)
>> > > >
>> > > >         at java.lang.Thread.run(Unknown Source)
>> > > >
>> > > > Caused by: javax.xml.ws.WebServiceException:
>> > > > org.apache.cxf.service.factory.ServiceConstructionException: Could
>> > > > not
>> > >
>> > > find
>> > >
>> > > > definition for service
>> > > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>> > > >
>> > > >         at
>> > > >
>> > > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
>> > > >
>> > > >         at
>> > >
>> > > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
>> > >
>> > > >         at
>> > >
>> > > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
>> > >
>> > > >         at
>> > > >         sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > > >         Method)
>> > > >         at
>> > > >         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
>> > > >         Source)
>> > > >         at
>> > > >         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unk
>> > > >         nown
>> > >
>> > > Source)
>> > >
>> > > >         at java.lang.reflect.Method.invoke(Unknown Source)
>> > > >         at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544
>> > > > ) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20
>> > > > more Caused by:
>> > > > org.apache.cxf.service.factory.ServiceConstructionException: Could
>> > > > not find definition for service
>> > > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>> > > >
>> > > >         at
>> > >
>> > >
>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
>> > > 139)
>> > >
>> > > > at
>> > >
>> > >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
>> > > From
>> > >
>> > > > WSDL(ReflectionServiceFactoryBean.java:382) at
>> > >
>> > >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
>> > > rvic
>> > >
>> > > > eModel(ReflectionServiceFactoryBean.java:499) at
>> > >
>> > >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
>> > > ctio
>> > >
>> > > > nServiceFactoryBean.java:241) at
>> > >
>> > >
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
>> > > Fact
>> > >
>> > > > oryBean.java:202) at
>> > >
>> > >
>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
>> > > Abst
>> > >
>> > > > ractWSDLBasedEndpointFactory.java:101) at
>> > >
>> > >
>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
>> > > 157)
>> > >
>> > > > at
>> > >
>> > >
>> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
>> > > n.ja
>> > >
>> > > > va:202) at
>> > > > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
>> > > >
>> > > >         at
>> > > >
>> > > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
>> > > >
>> > > >         ... 29 more
>> > > >
>> > > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
>> > > > listenerStart
>> > > > SEVERE: Exception sending context initialized event to listener
>> > > > instance
>> > >
>> > > of
>> > >
>> > > > class org.springframework.web.context.ContextLoaderListener
>> > > > org.springframework.beans.factory.BeanCreationException: Error
>> > > > creating
>> > >
>> > > bean
>> > >
>> > > > with name 'testservice': Invocation of init method failed; nested
>> > >
>> > > exception
>> > >
>> > > > is javax.xml.ws.WebServiceException:
>> > > > org.apache.cxf.service.factory.ServiceConstructionException: Could
>> > > > not
>> > >
>> > > find
>> > >
>> > > > definition for service
>> > > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>> > > >
>> > > >         at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>>  > > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .createBean(AbstractAutowireCapableBeanFactory.java:456) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
>> > > t(Ab
>> > >
>> > > > stractBeanFactory.java:291) at
>> > >
>> > >
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
>> > > etSi
>> > >
>> > > > ngleton(DefaultSingletonBeanRegistry.java:222) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
>> > > Abst
>> > >
>> > > > ractBeanFactory.java:288) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
>> > > stra
>> > >
>> > > > ctBeanFactory.java:190) at
>> > >
>> > >
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
>> > > Inst
>> > >
>> > > > antiateSingletons(DefaultListableBeanFactory.java:580) at
>> > >
>> > >
>> org.springframework.context.support.AbstractApplicationContext.finishBea
>> > > nFac
>> > >
>> > > > toryInitialization(AbstractApplicationContext.java:895) at
>> > >
>> > >
>> org.springframework.context.support.AbstractApplicationContext.refresh(A
>> > > bstr
>> > >
>> > > > actApplicationContext.java:425) at
>> > >
>> > >
>> org.springframework.web.context.ContextLoader.createWebApplicationContex
>> > > t(Co
>> > >
>> > > > ntextLoader.java:276) at
>> > >
>> > >
>> org.springframework.web.context.ContextLoader.initWebApplicationContext(
>> > > Cont
>> > >
>> > > > extLoader.java:197) at
>> > >
>> > >
>> org.springframework.web.context.ContextLoaderListener.contextInitialized
>> > > (Con
>> > >
>> > > > textLoaderListener.java:47) at
>> > >
>> > >
>>
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
>> > > > 4723) at
>> > >
>> > >
>> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
>> > > 6)
>> > >
>> > > >         at
>> > >
>> > >
>> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
>>  > > 1)
>> > >
>> > > >         at
>> > > >         java.util.concurrent.FutureTask$Sync.innerRun(Unkno
>> > > >         wn Source) at
>> > > >         java.util.concurrent.FutureTask.run(Unknown Source)
>> > > >         at
>> > > >         java.util.concurrent.ThreadPoolExecutor$Worker.runT
>> > > >         ask(Unknown
>> > > >
>> > > > Source)
>> > > >
>> > > >         at
>> > > >         java.util.concurrent.ThreadPoolExecutor$Worker.run(
>> > > >         Unknown
>> > > >
>> > > > Source)
>> > > >
>> > > >         at java.lang.Thread.run(Unknown Source)
>> > > >
>> > > > Caused by: javax.xml.ws.WebServiceException:
>> > > > org.apache.cxf.service.factory.ServiceConstructionException: Could
>> > > > not
>> > >
>> > > find
>> > >
>> > > > definition for service
>> > > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>> > > >
>> > > >         at
>> > > >
>> > > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
>> > > >
>> > > >         at
>> > >
>> > > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
>> > >
>> > > >         at
>> > >
>> > > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
>> > >
>> > > >         at
>> > > >         sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > > >         Method)
>> > > >         at
>> > > >         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
>> > > >         Source)
>> > > >         at
>> > > >         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unk
>> > > >         nown
>> > >
>> > > Source)
>> > >
>> > > >         at java.lang.reflect.Method.invoke(Unknown Source)
>> > > >         at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544
>> > > > ) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
>> > >
>> > >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> > > tory
>> > >
>> > > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20
>> > > > more Caused by:
>> > > > org.apache.cxf.service.factory.ServiceConstructionException: Could
>> > > > not find definition for service
>> > > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>> > > >
>> > > >         at
>> > >
>> > >
>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
>> > > 139)
>> > >
>> > > > at
>> > >
>> > >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
>> > > From
>> > >
>> > > > WSDL(ReflectionServiceFactoryBean.java:382) at
>> > >
>> > >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
>> > > rvic
>> > >
>> > > > eModel(ReflectionServiceFactoryBean.java:499) at
>> > >
>> > >
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
>> > > ctio
>> > >
>> > > > nServiceFactoryBean.java:241) at
>> > >
>> > >
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
>> > > Fact
>> > >
>> > > > oryBean.java:202) at
>> > >
>> > >
>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
>> > > Abst
>> > >
>> > > > ractWSDLBasedEndpointFactory.java:101) at
>> > >
>> > >
>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
>> > > 157)
>> > >
>> > > > at
>> > >
>> > >
>> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
>>  > > n.ja
>> > >
>> > > > va:202) at
>> > > > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
>> > > >
>> > > >         at
>> > > >
>> > > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
>> > > >
>> > > >         ... 29 more
>> > > >
>> > > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
>> > > > startInternal
>> > > > SEVERE: Error listenerStart
>> > > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
>> > > > startInternal
>> > > > SEVERE: Context [/PRWeb] startup failed due to previous errors
>> > > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.ApplicationContext
>> > > > log
>> > > > INFO: Closing Spring root WebApplicationContext
>> > > > Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler
>> > > > start
>> > > > INFO: Starting ProtocolHandler ["http-bio-8084"]
>> > > > Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler
>> > > > start
>> > > > INFO: Starting ProtocolHandler ["ajp-bio-8012"]
>> > > > Jul 22, 2011 6:58:49 AM org.apache.catalina.startup.Catalina start
>> > > > INFO: Server startup in 19328 ms
>> > > >
>> > > >
>> > > > --
>> > > > View this message in context:
>> > > >
>> http://cxf.547215.n5.nabble.com/Getting-ERROR-tp4621802p4621802.html
>> > > > Sent from the cxf-user mailing list archive at Nabble.com.
>> > >
>> > > --
>> > > Daniel Kulp
>> > > dkulp@apache.org
>> > > http://dankulp.com/blog
>> > > Talend - http://www.talend.com
>> --
>>  Daniel Kulp
>> dkulp@apache.org
>> http://dankulp.com/blog
>> Talend - http://www.talend.com
>>
>
>

Re: Getting ERROR

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, July 27, 2011 6:34:44 PM Prasad p wrote:
> Hi Dan,
>  Thanks for the info, i have a couple of questions on Interceptors , may be
> basic , please help me to understand.
>  1. Why we need Interceptors in CXF Webservices or Any WebServices.

You likely don't.   I would say 80% or more of the people that use CXF for 
webservices don't ever write an interceptor as most  of the required 
functionality is already built in.


>   2. Ist it mandatory to write interceptors for my Services.

No.

>   3. Right now iam using annotation to defined in request parameter for

> getting SOAPHeader
>    @WebParam(header=true, name="requestHeader",
> mode=WebParam.Mode.IN,partName="requestHeader")
> RequestHeader requestHeader
>  @WebParam(header=true, name="responseHeader",
> mode=WebParam.Mode.OUT,partName="responseHeader") Holder<responseHoder>
> responseHolder.
> 
> iam able to get theSOAP header sucessfully and for response SOAPHeader , iam
> setting the responseHeader object to
> @resource
> WebServiceContext ctx = null;
> 
> MessageContext msgCtx = ctx.getMessagecontext();
> 
> create the responseHeader
> msgCtx.put(Header.HEADER_LIST,headers);
> 
> iam sucessfully putting the SOAPHEADER Response.
> 
> is the above is right way , am i deviating anything basics.

If you have the Holder passed in, why not just:

responseHodler.value = new ResponseHeader();


 
> 4. What happens if i wont write interceptors to my services??

Should be fine.   :-)

Dan


> 
> Please help me to understand this , since iam new to CXF Framework.
> 
> Thanks
> Prasad
> 
> On Tue, Jul 26, 2011 at 2:26 AM, Daniel Kulp <dk...@apache.org> wrote:
> > Check the @WebService annotation on the TestServiceImplService class and
> > make
> > sure all the attributes are properly specified and match the expected
> > values
> > in the WSDL.   It looks like the servicename and such are not specified
> > so it's not matching anything in the WSDL.  Thus, the exception is
> > thrown.
> > 
> > Dan
> > 
> > On Thursday, July 21, 2011 9:59:27 PM prasad.pbc wrote:
> > > Hi iam new user of CXF Framework.
> > > 
> > >  I have used Tomcat 7.014 , Helios Eclipse and CXF 2.41.
> > > 
> > > Iam trying to create a basic service from Java2WSDL.
> > > iam getting below error while starting my Tomcat server , please
> > > help me
> > 
> > in
> > 
> > > resolving this error.
> > > 
> > > Jul 22, 2011 6:58:47 AM
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > > buildServiceFromWSDL
> > > INFO: Creating Service
> > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService
> > > from
> > > WSDL: wsdl/testservice.wsdl
> > > Jul 22, 2011 6:58:49 AM
> > > org.springframework.beans.factory.support.DefaultSingletonBeanRegist
> > > ry
> > > destroySingletons
> > > INFO: Destroying singletons in
> > 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory@29d
> > 294
> > 
> > > defining beans
> > 
> > [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apa
> > che.
> > 
> > cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExte
> > nsio
> > 
> > nPostProcessor,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache
> > .cxf
> > 
> > .binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEdi
> > torC
> > 
> > > onfigurer,testservice]; root of factory hierarchy
> > > Jul 22, 2011 6:58:49 AM
> > > org.springframework.beans.factory.support.DisposableBeanAdapter
> > > invokeCustomDestroyMethod
> > > WARNING: Invocation of destroy method 'shutdown' failed on bean with
> > > name 'cxf':
> > > org.springframework.beans.factory.BeanCreationNotAllowedException:
> > > Error creating bean with name
> > > 'org.apache.cxf.binding.soap.SoapBindingFactory': Singleton bean
> > > creation not allowed while the singletons of this factory are in
> > > destruction (Do
> > 
> > not
> > 
> > > request a bean from a BeanFactory in a destroy method
> > > implementation!)
> > > Jul 22, 2011 6:58:49 AM
> > > org.springframework.web.context.ContextLoader
> > > initWebApplicationContext
> > > SEVERE: Context initialization failed
> > > org.springframework.beans.factory.BeanCreationException: Error
> > > creating
> > 
> > bean
> > 
> > > with name 'testservice': Invocation of init method failed; nested
> > 
> > exception
> > 
> > > is javax.xml.ws.WebServiceException:
> > > org.apache.cxf.service.factory.ServiceConstructionException: Could
> > > not
> > 
> > find
> > 
> > > definition for service
> > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> > > 
> > >         at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .createBean(AbstractAutowireCapableBeanFactory.java:456) at
> > 
> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> > t(Ab
> > 
> > > stractBeanFactory.java:291) at
> > 
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> > etSi
> > 
> > > ngleton(DefaultSingletonBeanRegistry.java:222) at
> > 
> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> > Abst
> > 
> > > ractBeanFactory.java:288) at
> > 
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> > stra
> > 
> > > ctBeanFactory.java:190) at
> > 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> > Inst
> > 
> > > antiateSingletons(DefaultListableBeanFactory.java:580) at
> > 
> > org.springframework.context.support.AbstractApplicationContext.finishBea
> > nFac
> > 
> > > toryInitialization(AbstractApplicationContext.java:895) at
> > 
> > org.springframework.context.support.AbstractApplicationContext.refresh(A
> > bstr
> > 
> > > actApplicationContext.java:425) at
> > 
> > org.springframework.web.context.ContextLoader.createWebApplicationContex
> > t(Co
> > 
> > > ntextLoader.java:276) at
> > 
> > org.springframework.web.context.ContextLoader.initWebApplicationContext(
> > Cont
> > 
> > > extLoader.java:197) at
> > 
> > org.springframework.web.context.ContextLoaderListener.contextInitialized
> > (Con
> > 
> > > textLoaderListener.java:47) at
> > 
> > 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> > > 4723) at
> > 
> > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
> > 6)
> > 
> > >         at
> > 
> > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
> > 1)
> > 
> > >         at
> > >         java.util.concurrent.FutureTask$Sync.innerRun(Unkno
> > >         wn Source) at
> > >         java.util.concurrent.FutureTask.run(Unknown Source)
> > >         at
> > >         java.util.concurrent.ThreadPoolExecutor$Worker.runT
> > >         ask(Unknown
> > > 
> > > Source)
> > > 
> > >         at
> > >         java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > >         Unknown
> > > 
> > > Source)
> > > 
> > >         at java.lang.Thread.run(Unknown Source)
> > > 
> > > Caused by: javax.xml.ws.WebServiceException:
> > > org.apache.cxf.service.factory.ServiceConstructionException: Could
> > > not
> > 
> > find
> > 
> > > definition for service
> > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> > > 
> > >         at
> > > 
> > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
> > > 
> > >         at
> > 
> > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
> > 
> > >         at
> > 
> > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
> > 
> > >         at
> > >         sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >         Method)
> > >         at
> > >         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> > >         Source)
> > >         at
> > >         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unk
> > >         nown
> > 
> > Source)
> > 
> > >         at java.lang.reflect.Method.invoke(Unknown Source)
> > >         at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544
> > > ) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20
> > > more Caused by:
> > > org.apache.cxf.service.factory.ServiceConstructionException: Could
> > > not find definition for service
> > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> > > 
> > >         at
> > 
> > org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> > 139)
> > 
> > > at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> > From
> > 
> > > WSDL(ReflectionServiceFactoryBean.java:382) at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> > rvic
> > 
> > > eModel(ReflectionServiceFactoryBean.java:499) at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> > ctio
> > 
> > > nServiceFactoryBean.java:241) at
> > 
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
> > Fact
> > 
> > > oryBean.java:202) at
> > 
> > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
> > Abst
> > 
> > > ractWSDLBasedEndpointFactory.java:101) at
> > 
> > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
> > 157)
> > 
> > > at
> > 
> > org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
> > n.ja
> > 
> > > va:202) at
> > > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
> > > 
> > >         at
> > > 
> > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
> > > 
> > >         ... 29 more
> > > 
> > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> > > listenerStart
> > > SEVERE: Exception sending context initialized event to listener
> > > instance
> > 
> > of
> > 
> > > class org.springframework.web.context.ContextLoaderListener
> > > org.springframework.beans.factory.BeanCreationException: Error
> > > creating
> > 
> > bean
> > 
> > > with name 'testservice': Invocation of init method failed; nested
> > 
> > exception
> > 
> > > is javax.xml.ws.WebServiceException:
> > > org.apache.cxf.service.factory.ServiceConstructionException: Could
> > > not
> > 
> > find
> > 
> > > definition for service
> > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> > > 
> > >         at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .createBean(AbstractAutowireCapableBeanFactory.java:456) at
> > 
> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> > t(Ab
> > 
> > > stractBeanFactory.java:291) at
> > 
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> > etSi
> > 
> > > ngleton(DefaultSingletonBeanRegistry.java:222) at
> > 
> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> > Abst
> > 
> > > ractBeanFactory.java:288) at
> > 
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> > stra
> > 
> > > ctBeanFactory.java:190) at
> > 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> > Inst
> > 
> > > antiateSingletons(DefaultListableBeanFactory.java:580) at
> > 
> > org.springframework.context.support.AbstractApplicationContext.finishBea
> > nFac
> > 
> > > toryInitialization(AbstractApplicationContext.java:895) at
> > 
> > org.springframework.context.support.AbstractApplicationContext.refresh(A
> > bstr
> > 
> > > actApplicationContext.java:425) at
> > 
> > org.springframework.web.context.ContextLoader.createWebApplicationContex
> > t(Co
> > 
> > > ntextLoader.java:276) at
> > 
> > org.springframework.web.context.ContextLoader.initWebApplicationContext(
> > Cont
> > 
> > > extLoader.java:197) at
> > 
> > org.springframework.web.context.ContextLoaderListener.contextInitialized
> > (Con
> > 
> > > textLoaderListener.java:47) at
> > 
> > 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> > > 4723) at
> > 
> > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
> > 6)
> > 
> > >         at
> > 
> > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:522
> > 1)
> > 
> > >         at
> > >         java.util.concurrent.FutureTask$Sync.innerRun(Unkno
> > >         wn Source) at
> > >         java.util.concurrent.FutureTask.run(Unknown Source)
> > >         at
> > >         java.util.concurrent.ThreadPoolExecutor$Worker.runT
> > >         ask(Unknown
> > > 
> > > Source)
> > > 
> > >         at
> > >         java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > >         Unknown
> > > 
> > > Source)
> > > 
> > >         at java.lang.Thread.run(Unknown Source)
> > > 
> > > Caused by: javax.xml.ws.WebServiceException:
> > > org.apache.cxf.service.factory.ServiceConstructionException: Could
> > > not
> > 
> > find
> > 
> > > definition for service
> > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> > > 
> > >         at
> > > 
> > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
> > > 
> > >         at
> > 
> > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
> > 
> > >         at
> > 
> > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
> > 
> > >         at
> > >         sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >         Method)
> > >         at
> > >         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> > >         Source)
> > >         at
> > >         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unk
> > >         nown
> > 
> > Source)
> > 
> > >         at java.lang.reflect.Method.invoke(Unknown Source)
> > >         at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544
> > > ) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
> > 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory
> > 
> > > .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20
> > > more Caused by:
> > > org.apache.cxf.service.factory.ServiceConstructionException: Could
> > > not find definition for service
> > > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> > > 
> > >         at
> > 
> > org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> > 139)
> > 
> > > at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> > From
> > 
> > > WSDL(ReflectionServiceFactoryBean.java:382) at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> > rvic
> > 
> > > eModel(ReflectionServiceFactoryBean.java:499) at
> > 
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> > ctio
> > 
> > > nServiceFactoryBean.java:241) at
> > 
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
> > Fact
> > 
> > > oryBean.java:202) at
> > 
> > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
> > Abst
> > 
> > > ractWSDLBasedEndpointFactory.java:101) at
> > 
> > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
> > 157)
> > 
> > > at
> > 
> > org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
> > n.ja
> > 
> > > va:202) at
> > > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
> > > 
> > >         at
> > > 
> > > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
> > > 
> > >         ... 29 more
> > > 
> > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> > > startInternal
> > > SEVERE: Error listenerStart
> > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> > > startInternal
> > > SEVERE: Context [/PRWeb] startup failed due to previous errors
> > > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.ApplicationContext
> > > log
> > > INFO: Closing Spring root WebApplicationContext
> > > Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler
> > > start
> > > INFO: Starting ProtocolHandler ["http-bio-8084"]
> > > Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler
> > > start
> > > INFO: Starting ProtocolHandler ["ajp-bio-8012"]
> > > Jul 22, 2011 6:58:49 AM org.apache.catalina.startup.Catalina start
> > > INFO: Server startup in 19328 ms
> > > 
> > > 
> > > --
> > > View this message in context:
> > > http://cxf.547215.n5.nabble.com/Getting-ERROR-tp4621802p4621802.html
> > > Sent from the cxf-user mailing list archive at Nabble.com.
> > 
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://dankulp.com/blog
> > Talend - http://www.talend.com
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: Getting ERROR

Posted by Prasad p <pr...@gmail.com>.
Hi Dan,
 Thanks for the info, i have a couple of questions on Interceptors , may be
basic , please help me to understand.
 1. Why we need Interceptors in CXF Webservices or Any WebServices.
  2. Ist it mandatory to write interceptors for my Services.
  3. Right now iam using annotation to defined in request parameter for
getting SOAPHeader
   @WebParam(header=true, name="requestHeader",
mode=WebParam.Mode.IN,partName="requestHeader")
RequestHeader requestHeader
 @WebParam(header=true, name="responseHeader",
mode=WebParam.Mode.OUT,partName="responseHeader") Holder<responseHoder>
responseHolder.

iam able to get theSOAP header sucessfully and for response SOAPHeader , iam
setting the responseHeader object to
@resource
WebServiceContext ctx = null;

MessageContext msgCtx = ctx.getMessagecontext();

create the responseHeader
msgCtx.put(Header.HEADER_LIST,headers);

iam sucessfully putting the SOAPHEADER Response.

is the above is right way , am i deviating anything basics.

4. What happens if i wont write interceptors to my services??

Please help me to understand this , since iam new to CXF Framework.

Thanks
Prasad




On Tue, Jul 26, 2011 at 2:26 AM, Daniel Kulp <dk...@apache.org> wrote:

>
> Check the @WebService annotation on the TestServiceImplService class and
> make
> sure all the attributes are properly specified and match the expected
> values
> in the WSDL.   It looks like the servicename and such are not specified so
> it's not matching anything in the WSDL.  Thus, the exception is thrown.
>
> Dan
>
>
>
> On Thursday, July 21, 2011 9:59:27 PM prasad.pbc wrote:
> > Hi iam new user of CXF Framework.
> >  I have used Tomcat 7.014 , Helios Eclipse and CXF 2.41.
> >
> > Iam trying to create a basic service from Java2WSDL.
> > iam getting below error while starting my Tomcat server , please help me
> in
> > resolving this error.
> >
> > Jul 22, 2011 6:58:47 AM
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > buildServiceFromWSDL
> > INFO: Creating Service
> > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService from
> > WSDL: wsdl/testservice.wsdl
> > Jul 22, 2011 6:58:49 AM
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
> > destroySingletons
> > INFO: Destroying singletons in
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@29d294
> :
> > defining beans
> >
> [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.
> >
> cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensio
> >
> nPostProcessor,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf
> >
> .binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorC
> > onfigurer,testservice]; root of factory hierarchy
> > Jul 22, 2011 6:58:49 AM
> > org.springframework.beans.factory.support.DisposableBeanAdapter
> > invokeCustomDestroyMethod
> > WARNING: Invocation of destroy method 'shutdown' failed on bean with name
> > 'cxf': org.springframework.beans.factory.BeanCreationNotAllowedException:
> > Error creating bean with name
> > 'org.apache.cxf.binding.soap.SoapBindingFactory': Singleton bean creation
> > not allowed while the singletons of this factory are in destruction (Do
> not
> > request a bean from a BeanFactory in a destroy method implementation!)
> > Jul 22, 2011 6:58:49 AM org.springframework.web.context.ContextLoader
> > initWebApplicationContext
> > SEVERE: Context initialization failed
> > org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> > with name 'testservice': Invocation of init method failed; nested
> exception
> > is javax.xml.ws.WebServiceException:
> > org.apache.cxf.service.factory.ServiceConstructionException: Could not
> find
> > definition for service
> > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> >         at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .createBean(AbstractAutowireCapableBeanFactory.java:456) at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> > stractBeanFactory.java:291) at
> >
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> > ngleton(DefaultSingletonBeanRegistry.java:222) at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
> > ractBeanFactory.java:288) at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
> > ctBeanFactory.java:190) at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
> > antiateSingletons(DefaultListableBeanFactory.java:580) at
> >
> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
> > toryInitialization(AbstractApplicationContext.java:895) at
> >
> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
> > actApplicationContext.java:425) at
> >
> org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
> > ntextLoader.java:276) at
> >
> org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
> > extLoader.java:197) at
> >
> org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
> > textLoaderListener.java:47) at
> >
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> > 4723) at
> >
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
> >         at
> >
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
> >         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> >         at java.util.concurrent.FutureTask.run(Unknown Source)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> > Source)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> > Source)
> >         at java.lang.Thread.run(Unknown Source)
> > Caused by: javax.xml.ws.WebServiceException:
> > org.apache.cxf.service.factory.ServiceConstructionException: Could not
> find
> > definition for service
> > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> >         at
> > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
> >         at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
> >         at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> >         at java.lang.reflect.Method.invoke(Unknown Source)
> >         at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20 more
> > Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
> > Could not find definition for service
> > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> >         at
> >
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:139)
> > at
> >
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> > WSDL(ReflectionServiceFactoryBean.java:382) at
> >
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> > eModel(ReflectionServiceFactoryBean.java:499) at
> >
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> > nServiceFactoryBean.java:241) at
> >
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
> > oryBean.java:202) at
> >
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
> > ractWSDLBasedEndpointFactory.java:101) at
> >
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
> > at
> >
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
> > va:202) at
> > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
> >         at
> > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
> >         ... 29 more
> > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> > listenerStart
> > SEVERE: Exception sending context initialized event to listener instance
> of
> > class org.springframework.web.context.ContextLoaderListener
> > org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> > with name 'testservice': Invocation of init method failed; nested
> exception
> > is javax.xml.ws.WebServiceException:
> > org.apache.cxf.service.factory.ServiceConstructionException: Could not
> find
> > definition for service
> > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> >         at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .createBean(AbstractAutowireCapableBeanFactory.java:456) at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> > stractBeanFactory.java:291) at
> >
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> > ngleton(DefaultSingletonBeanRegistry.java:222) at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
> > ractBeanFactory.java:288) at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
> > ctBeanFactory.java:190) at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
> > antiateSingletons(DefaultListableBeanFactory.java:580) at
> >
> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
> > toryInitialization(AbstractApplicationContext.java:895) at
> >
> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
> > actApplicationContext.java:425) at
> >
> org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
> > ntextLoader.java:276) at
> >
> org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
> > extLoader.java:197) at
> >
> org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
> > textLoaderListener.java:47) at
> >
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> > 4723) at
> >
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
> >         at
> >
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
> >         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> >         at java.util.concurrent.FutureTask.run(Unknown Source)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> > Source)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> > Source)
> >         at java.lang.Thread.run(Unknown Source)
> > Caused by: javax.xml.ws.WebServiceException:
> > org.apache.cxf.service.factory.ServiceConstructionException: Could not
> find
> > definition for service
> > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> >         at
> > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
> >         at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
> >         at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> >         at java.lang.reflect.Method.invoke(Unknown Source)
> >         at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20 more
> > Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
> > Could not find definition for service
> > {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
> >         at
> >
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:139)
> > at
> >
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> > WSDL(ReflectionServiceFactoryBean.java:382) at
> >
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> > eModel(ReflectionServiceFactoryBean.java:499) at
> >
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> > nServiceFactoryBean.java:241) at
> >
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
> > oryBean.java:202) at
> >
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
> > ractWSDLBasedEndpointFactory.java:101) at
> >
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
> > at
> >
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
> > va:202) at
> > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
> >         at
> > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
> >         ... 29 more
> > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> > startInternal
> > SEVERE: Error listenerStart
> > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> > startInternal
> > SEVERE: Context [/PRWeb] startup failed due to previous errors
> > Jul 22, 2011 6:58:49 AM org.apache.catalina.core.ApplicationContext log
> > INFO: Closing Spring root WebApplicationContext
> > Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler start
> > INFO: Starting ProtocolHandler ["http-bio-8084"]
> > Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler start
> > INFO: Starting ProtocolHandler ["ajp-bio-8012"]
> > Jul 22, 2011 6:58:49 AM org.apache.catalina.startup.Catalina start
> > INFO: Server startup in 19328 ms
> >
> >
> > --
> > View this message in context:
> > http://cxf.547215.n5.nabble.com/Getting-ERROR-tp4621802p4621802.htmlSent
> > from the cxf-user mailing list archive at Nabble.com.
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> Talend - http://www.talend.com
>

Re: Getting ERROR

Posted by Daniel Kulp <dk...@apache.org>.
Check the @WebService annotation on the TestServiceImplService class and make 
sure all the attributes are properly specified and match the expected values 
in the WSDL.   It looks like the servicename and such are not specified so 
it's not matching anything in the WSDL.  Thus, the exception is thrown.

Dan



On Thursday, July 21, 2011 9:59:27 PM prasad.pbc wrote:
> Hi iam new user of CXF Framework.
>  I have used Tomcat 7.014 , Helios Eclipse and CXF 2.41.
> 
> Iam trying to create a basic service from Java2WSDL.
> iam getting below error while starting my Tomcat server , please help me in
> resolving this error.
> 
> Jul 22, 2011 6:58:47 AM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service
> {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService from
> WSDL: wsdl/testservice.wsdl
> Jul 22, 2011 6:58:49 AM
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
> destroySingletons
> INFO: Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@29d294:
> defining beans
> [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.
> cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensio
> nPostProcessor,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf
> .binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorC
> onfigurer,testservice]; root of factory hierarchy
> Jul 22, 2011 6:58:49 AM
> org.springframework.beans.factory.support.DisposableBeanAdapter
> invokeCustomDestroyMethod
> WARNING: Invocation of destroy method 'shutdown' failed on bean with name
> 'cxf': org.springframework.beans.factory.BeanCreationNotAllowedException:
> Error creating bean with name
> 'org.apache.cxf.binding.soap.SoapBindingFactory': Singleton bean creation
> not allowed while the singletons of this factory are in destruction (Do not
> request a bean from a BeanFactory in a destroy method implementation!)
> Jul 22, 2011 6:58:49 AM org.springframework.web.context.ContextLoader
> initWebApplicationContext
> SEVERE: Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'testservice': Invocation of init method failed; nested exception
> is javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could not find
> definition for service
> {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBean(AbstractAutowireCapableBeanFactory.java:456) at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> stractBeanFactory.java:291) at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> ngleton(DefaultSingletonBeanRegistry.java:222) at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
> ractBeanFactory.java:288) at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
> ctBeanFactory.java:190) at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
> antiateSingletons(DefaultListableBeanFactory.java:580) at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
> toryInitialization(AbstractApplicationContext.java:895) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
> actApplicationContext.java:425) at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
> ntextLoader.java:276) at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
> extLoader.java:197) at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
> textLoaderListener.java:47) at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> 4723) at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
>         at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
>         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could not find
> definition for service
> {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
>         at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
>         at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20 more
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
> Could not find definition for service
> {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>         at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:139)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> WSDL(ReflectionServiceFactoryBean.java:382) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> eModel(ReflectionServiceFactoryBean.java:499) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> nServiceFactoryBean.java:241) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
> oryBean.java:202) at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
> ractWSDLBasedEndpointFactory.java:101) at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
> at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
> va:202) at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
>         ... 29 more
> Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> listenerStart
> SEVERE: Exception sending context initialized event to listener instance of
> class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'testservice': Invocation of init method failed; nested exception
> is javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could not find
> definition for service
> {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBean(AbstractAutowireCapableBeanFactory.java:456) at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
> stractBeanFactory.java:291) at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
> ngleton(DefaultSingletonBeanRegistry.java:222) at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
> ractBeanFactory.java:288) at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
> ctBeanFactory.java:190) at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
> antiateSingletons(DefaultListableBeanFactory.java:580) at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFac
> toryInitialization(AbstractApplicationContext.java:895) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
> actApplicationContext.java:425) at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
> ntextLoader.java:276) at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
> extLoader.java:197) at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
> textLoaderListener.java:47) at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> 4723) at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
>         at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
>         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could not find
> definition for service
> {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
>         at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
>         at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 20 more
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
> Could not find definition for service
> {http://impl.service.ws.pr.cb.fifthird.com/}TestServiceImplService.
>         at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:139)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> WSDL(ReflectionServiceFactoryBean.java:382) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> eModel(ReflectionServiceFactoryBean.java:499) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> nServiceFactoryBean.java:241) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
> oryBean.java:202) at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
> ractWSDLBasedEndpointFactory.java:101) at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
> at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
> va:202) at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
>         at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
>         ... 29 more
> Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Error listenerStart
> Jul 22, 2011 6:58:49 AM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Context [/PRWeb] startup failed due to previous errors
> Jul 22, 2011 6:58:49 AM org.apache.catalina.core.ApplicationContext log
> INFO: Closing Spring root WebApplicationContext
> Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler start
> INFO: Starting ProtocolHandler ["http-bio-8084"]
> Jul 22, 2011 6:58:49 AM org.apache.coyote.AbstractProtocolHandler start
> INFO: Starting ProtocolHandler ["ajp-bio-8012"]
> Jul 22, 2011 6:58:49 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 19328 ms
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Getting-ERROR-tp4621802p4621802.html Sent
> from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com