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 <[email protected]> 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
> [email protected]
> http://dankulp.com/blog
> Talend - http://www.talend.com
>

Reply via email to