On Tue May 5 2009 5:31:32 pm Bruce Edge wrote:
> Daniel Kulp wrote:
> > Basically, there are three options to fix this:
> >
> > 1) Adjust the @WebService annotation on
> > core.dpm.lsi.com.DpmCorePortTypeImpl to specify the portName and and
> > serviceName that match the same values in the wsdl.
> >
> > 2) Adjust the wsdl so that they match the "auto generated" names
> > (DpmCorePortTypeImplService)
> >
> > 3) Adjust the spring config (cxf-servlet.xml) to add the
> > serviceName/endpointName attributes to the jaxws:endpoint tags.
>
> Here's the snipped from cxf-servlet.xml.
>
> <jaxws:endpoint id="dpmcore"
>       implementor="com.lsi.dpm.core.DpmCorePortTypeImpl"
>       address="dpmcore"
>       wsdlLocation="WEB-INF/wsdl/DpmCore.wsdl">
>    </jaxws:endpoint>
>
> This _is_ referring to the end point implementor.
> Where is the extra "Service" string being added?

From the JAX-WS/JWS specs.    If the @WebService annotation on 
DpmCorePortTypeImpl does not contain a serviceName attribute, then the 
servicename is defined as "implclass" + "Service", so 
DpmCorePortTypeImplService in your case.    Again, the fix would be to adjust 
the annotation.

Dan



>
> > Dan
> >
> > On Tue May 5 2009 5:09:32 pm Bruce Edge wrote:
> >> I had this working at some point late last night and rather than leave
> >> it alone I kept working.
> >>
> >> Now when I run my app with jetty-runner, I get this exception:
> >>
> >>
> >>
> >> org.springframework.beans.factory.BeanCreationException: Error creating
> >> bean with name 'dpmcore': 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://core.dpm.lsi.com/}DpmCorePortTypeImplService
> >> <http://core.dpm.lsi.com/%7DDpmCorePortTypeImplService>.
> >>         at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tor y.initializeBean(AbstractAutowireCapableBeanFactory.java:1337)
> >>
> >>         at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tor y.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
> >>
> >>         at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tor y$1.run(AbstractAutowireCapableBeanFactory.java:409)
> >>
> >>         at java.security.AccessController.doPrivileged(Native
> >> Method)
> >>
> >>         at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >>tor y.createBean(AbstractAutowireCapableBeanFactory.java:380)
> >>
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> >>t(A bstractBeanFactory.java:264)
> >>
> >>         at
> >> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> >>etS ingleton(DefaultSingletonBeanRegistry.java:221)
> >>
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> >>Abs tractBeanFactory.java:261)
> >>
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> >>str actBeanFactory.java:185)
> >>
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> >>str actBeanFactory.java:164)
> >>
> >>         at
> >> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> >>Ins tantiateSingletons(DefaultListableBeanFactory.java:429)
> >>
> >>         at
> >> org.springframework.context.support.AbstractApplicationContext.finishBea
> >>nFa ctoryInitialization(AbstractApplicationContext.java:729)
> >>
> >>         at
> >> org.springframework.context.support.AbstractApplicationContext.refresh(A
> >>bst ractApplicationContext.java:381)
> >>
> >>         at
> >> org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServ
> >>let .java:166)
> >>
> >>
> >> My main class is core.dpm.lsi.com.DpmCorePortTypeImpl, missing the
> >> trailing "Service"
> >>
> >> For the invokating command line I'm using:
> >> java -jar jetty-runner-7.0.0.pre5.jar  --log ../log/jetty.log --out
> >> ../log/jetty.out DpmCore.war
> >>
> >>
> >> I saw a reference to this in this posting wsdl:service name in .wsdl
> >> file <http://www.mail-archive.com/[email protected]/msg41954.html>
> >> but I don't understand the meaning of the stated fix:
> >>
> >> After modifying the wsdl:name name from
> >>
> >>     <wsdl:service name="Calculator">
> >>
> >> to
> >>
> >>     <wsdl:service name="CalculatorService">
> >>
> >> Anyone else run into this?
> >>
> >> Thanks, Bruce

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to