cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Getting ERROR
Date Wed, 27 Jul 2011 19:24:06 GMT
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 <dkulp@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

Mime
View raw message