You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Maurer Uwe <u....@enbw.com> on 2008/06/03 10:45:13 UTC

Re: CXF delivers transformed WSDL on ?wsdl Request

Hi,

back from vacation I am still struggling with my litte problem on loading
the WSDL from file during runtime of my application...

Finally I've found the "buildServiceFromClass" logfile entry. As suggested,
I added "wsdlLocation" to my configuration in cxf-servlet.xml:


	<jaxws:endpoint id="FooService"
	 	wsdlLocation="Web-inf/wsdl/main.wsdl"
		implementor="#fooService"
		address="/FooService" />

Now the log says "buildServiceFromWSDL" - but now I get a "file not found"
error when I start Tomcat (see stacktrace below). It seems that my wsdl file
is lookup up in Tomcats "bin" directory? Is this a bug?

Thanks for any further hints,
Uwe


<stacktrace>

2008-06-03 10:27:53,729 ERROR
[org.springframework.web.context.ContextLoader] - Context initialization
failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'KonzessionsAbgabenSatzBereitstellen_v1': Invocation of init
method failed; nested exception is javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Failed to
create service.
Caused by: 
javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Failed to
create service.
	at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:258)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:194)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:380)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1240)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1205)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:425)
....
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Failed to create service.
	at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:83)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
WSDL(ReflectionServiceFactoryBean.java:299)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
eModel(ReflectionServiceFactoryBean.java:392)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
nServiceFactoryBean.java:180)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
oryBean.java:163)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
ractWSDLBasedEndpointFactory.java:79)
	at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114)
	at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
va:160)
	at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:322)
	at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:244)
	... 43 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
Problem parsing 'Web-inf/wsdl/main.wsdl'.: java.io.FileNotFoundException:
D:\ws\tools\apache-tomcat-5.5.17\bin\Web-inf\wsdl\main.wsdl (Das System kann
den angegebenen Pfad nicht finden)
	at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
	at
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:20
6)
	at
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:170
)
	at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
	... 52 more
Caused by: java.io.FileNotFoundException:
D:\ws\tools\apache-tomcat-5.5.17\bin\Web-inf\wsdl\main.wsdl (Das System kann
den angegebenen Pfad nicht finden)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at java.io.FileInputStream.<init>(FileInputStream.java:66)
	at
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:7
0)
	at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection
.java:161)
	at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(
XMLEntityManager.java:973)
	at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersi
on(XMLVersionDetector.java:184)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Con
figuration.java:798)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Con
figuration.java:764)
	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:14
8)
	at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:25
0)
	at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBu
ilderImpl.java:292)
	... 58 more

</stacktrace>




> -----Ursprüngliche Nachricht-----
> Von: Daniel Kulp [mailto:dkulp@apache.org]
> Gesendet: Mittwoch, 14. Mai 2008 17:54
> An: users@cxf.apache.org
> Betreff: Re: CXF delivers transformed WSDL on ?wsdl Request
> 
> 
> 
> On May 14, 2008, at 9:08 AM, Maurer Uwe wrote:
> > Thanks for your hints - however: it still does not work.
> >
> > First: I did not find any log messages about "buildServiceFromClass" 
> > or "buildServiceFromWSDL" in catalina.out.
> 
> 
> Hmm...   that's not good.   Can you grep through all the 
> files in logs  
> for those strings?    Do you have some setting or something that is  
> changing the default java.util.logging log levels?    That's very  
> strange.
> 
> 
> > Second:
> > I replaced the configuration in cxf-servlet.xml
> >
> > <jaxws:endpoint id="FooService"
> > 	implementor="#fooService"
> > 	address="/FooService">
> > </jaxws:endpoint>
> >
> > with a new one like:
> >
> >
> > <jaxws:endpoint id="FooService"
> > 	implementor="#fooService"
> > 	wsdlLocation="wsdl/main.wsdl"
> > 	createdFromAPI="false"
> > 	address="/FooService">
> > </jaxws:endpoint>
> >
> > The service seems to start but when I try to access the service and
> > to read
> > the URL, I get a text saying "No service was found." There are no  
> > error
> > messages in catalina.out however.
> >
> 
> Where is the WSDL in the war?   Usually, it would be in WEB-INF/wsdl  
> or similar in which case the location should be specified as WEB-INF/ 
> wsdl/main.wsdl.
> 
> Dan
> 
> 
> 
> 
> > Any hints? Thanks in advance.
> >
> > --
> > Uwe Maurer
> > Software Architect / SIS OIBKV
> >
> > ____EnBW Systeme Infrastruktur Support GmbH
> > Tel.: +49 (7 21) 63- 1 45 17
> > Mobil: +49 (175) 2 28 98 34
> > mailto:u.maurer@enbw.com
> >
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Daniel Kulp [mailto:dkulp@apache.org]
> >> Gesendet: Dienstag, 13. Mai 2008 17:49
> >> An: users@cxf.apache.org
> >> Betreff: Re: CXF delivers transformed WSDL on ?wsdl Request
> >>
> >>
> >>
> >> In the catalina.out file or other log file, can you look for lines 
> >> that look something like:
> >>
> >> May 12, 2008 1:06:07 PM 
> >> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> >> buildServiceFromClass
> >>
> >> or
> >>
> >> May 12, 2008 1:06:07 PM 
> >> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> >> buildServiceFromWSDL
> >>
> >>
> >> The second is what we want to see.   In the first case, it
> >> builds the
> >> WSDL based on the annotations in the class and such.   The second
> >> should be using the wsdl properly.     If you see the
> >> buildServiceFromClass form, you'll need to update the 
> spring config 
> >> (or annotations) to specify the wsdlLocation.
> >>
> >>
> >> Dan
> >>
> >>
> >>
> >>
> >> On May 13, 2008, at 8:52 AM, Maurer Uwe wrote:
> >>
> >>> Hi,
> >>>
> >>> I am developing a "contract first" webservice using CXF 
> on Tomcat. 
> >>> The WSDL file is originally built by SAP Netweaver and consists of
> >> three files:
> >>>
> >>> ./main.wsdl
> >>> 	- defines <wsdl:service> and imports
> >> ./bindings/Http_document.wsdl
> >>> via <wsdl:import> ./bindings/Http_document.wsdl
> >>> 	- defines <wsdl:binding> and imports 
> >>> ../porttypes/Http_fooservice_document.wsdl
> >>> ./porttypes/http_fooservice_document.wsdl
> >>> 	- defines <wsdl:types>
> >>>
> >>> I impleneted my service using a JAXB binding generated from the 
> >>> WSDL2Java tool. I deploy the three files in a war in WEB-INF/wsdl
> >> directory. The
> >>> service itselfs runs - BUT:
> >>>
> >>> A request with parameter ?wsdl returns a different WSDL
> >> file than the
> >>> original. There are only two files left:
> >>>
> >>> One defining <wsdl:service> and <wsdl:types> and another
> >> includes one
> >>> defining <wsdl:binding>. Also some names (Faults) differ. 
> This leads 
> >>> to compatibility problems with the service clients.
> >>>
> >>> Can anyone explain this behaviour to me?
> >>> How can I manage, that the original WSDLs are delivered
> >> through the ?
> >>> wsdl
> >>> request?
> >>>
> >>> Yours,
> >>> Uwe
> >>
> >> ---
> >> Daniel Kulp
> >> dkulp@apache.org
> >> http://www.dankulp.com/blog
> >>
> >>
> >>
> >>
> >>
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 
> 
> 
> 

Re: CXF delivers transformed WSDL on ?wsdl Request

Posted by Daniel Kulp <dk...@apache.org>.
Would you happen to have xalan on the classpath or in your war?  The  
loss of the namespace prefix is a xalan bug.   It's SUPPOSEDLY fixed  
in xalan 2.7.1, but that version has other problems that makes it not  
usable (and isn't in maven either).    In most cases, you can remove  
xalan jar and just use the transformers built into the JDK.   That  
version doesn't have the bug.

For CXF 2.1.1/2.0.7, we're switching to our own routines for printing  
the DOMs which doesn't drop the namespaces.   You can try the latest  
snapshots to make sure.

Dan



On Jun 6, 2008, at 3:54 AM, Maurer Uwe wrote:

> Hello,
>
> this worked for me:
>
>> 2) Update the <jaxws:endpoint> element in your config to add the
>> qnames for the service name and portname.
>
> I changed my configuration like this...:
>
> 	<jaxws:endpoint id="FooService"
> 	 	wsdlLocation="WEB-INF/wsdl/main.wsdl"
> 		implementor="#fooService"
> 		address="/FooService"
> 		endpointName="ns0:HttpPort_Document"
> 		serviceName="ns0:FooService"
> 		xmlns:ns0="urn:FooService"
> 		/>
>
> ...and now my service responds properly and is accessible from the  
> clients.
> Thanks a lot for your support!
>
> There is one question remaining:
> The original main.wsdl file is
>
> <wsdl:definitions
> 	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	name="FooService"
> 	targetNamespace="urn:FooService"
> 	xmlns:bns0="urn:FooService/Http/document"
> 	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>  <wsdl:import location="./bindings/Http_document.wsdl"
>               namespace="urn:FooService/Http/document"/>
>  <wsdl:service name="FooService">
>    <wsdl:port name="HttpPort_Document" binding="bns0:HttpBinding">
>      <soap:address
> location="http://dev-was.foo.net:50000/FooService/Http? 
> style=document"/>
>    </wsdl:port>
>  </wsdl:service>
> </wsdl:definitions>
>
>
> Mind the "bns0" namespace definition and its use in wsdl:port@binding.
> My running Service responds with this file:
>
> <wsdl:definitions
>      name="FooService"
>      targetNamespace="urn:FooService">
>  <wsdl:import
> location="http://localhost:8080/FooService/FooService?wsdl=./bindings/Http_d
> ocument.wsdl"
>               namespace="urn:FooService/Http/document"/>
>  <wsdl:service name="FooService">
> 	<wsdl:port binding="bns0:HttpBinding" name="HttpPort_Document">
>      <soap:address location="http://localhost:8080/FooService/FooService 
> "/>
>    </wsdl:port>
>  </wsdl:service>
> </wsdl:definitions>
>
> The "bns0" namespace definition is gone but it is still used within
> wsdl:port@binding! I understand that CXF has to change the original  
> input
> file (e.g. soap:address) but I do not understand what magic happens  
> here
> with the bns0 definition an its use.
>
> Any hints? Thanks in advance.
>
> Uwe

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Re: CXF delivers transformed WSDL on ?wsdl Request

Posted by Maurer Uwe <u....@enbw.com>.
Hello,

this worked for me:

> 2) Update the <jaxws:endpoint> element in your config to add the  
> qnames for the service name and portname.

I changed my configuration like this...:

	<jaxws:endpoint id="FooService"
	 	wsdlLocation="WEB-INF/wsdl/main.wsdl"
		implementor="#fooService"
		address="/FooService"
		endpointName="ns0:HttpPort_Document"
		serviceName="ns0:FooService"
		xmlns:ns0="urn:FooService" 
		/>

...and now my service responds properly and is accessible from the clients.
Thanks a lot for your support!

There is one question remaining:
The original main.wsdl file is

<wsdl:definitions 
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	name="FooService" 
	targetNamespace="urn:FooService" 
	xmlns:bns0="urn:FooService/Http/document" 
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <wsdl:import location="./bindings/Http_document.wsdl"
               namespace="urn:FooService/Http/document"/>
  <wsdl:service name="FooService">
    <wsdl:port name="HttpPort_Document" binding="bns0:HttpBinding">
      <soap:address
location="http://dev-was.foo.net:50000/FooService/Http?style=document"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


Mind the "bns0" namespace definition and its use in wsdl:port@binding. 
My running Service responds with this file:

<wsdl:definitions
      name="FooService" 
      targetNamespace="urn:FooService">
  <wsdl:import
location="http://localhost:8080/FooService/FooService?wsdl=./bindings/Http_d
ocument.wsdl"
               namespace="urn:FooService/Http/document"/>
  <wsdl:service name="FooService">
	<wsdl:port binding="bns0:HttpBinding" name="HttpPort_Document">
      <soap:address location="http://localhost:8080/FooService/FooService"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

The "bns0" namespace definition is gone but it is still used within
wsdl:port@binding! I understand that CXF has to change the original input
file (e.g. soap:address) but I do not understand what magic happens here
with the bns0 definition an its use.

Any hints? Thanks in advance.

Uwe

Re: AW: CXF delivers transformed WSDL on ?wsdl Request

Posted by Daniel Kulp <dk...@apache.org>.
On Jun 3, 2008, at 7:00 AM, Maurer Uwe wrote:

>> Maybe the path is case sensitive - try WEB-INF instead of Web-inf?
>
> I already tried. "Web-inf" seems to be the correct string. Trying  
> WEB-INF
> leads to another (!) error:
>
>
> javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could  
> not find
> definition for service
> {http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.

This is good.  That means the WSDL is actually loaded and found.    
Thus, WEB-INF is what you want, not Web-inf.



> (see stacktrace below)
>
> Still there is the question, why CXF tries to load WSDL from the "bin"
> directory of Tomcat.

If it cannot find the wsdl as a resource, it just tries to create a  
"File" object from the string.   That resolves from whatever location/ 
directory the current process is running from.   Since it couldn't  
find Web-inf/wsdl/main.wsdl as it needs to be WEB-INF, it tried a file.

In anycase, the new error is the important one.   It basically says it  
could not find a service definition in the wsdl that matched that  
name.   Couple ways around it:

1) Update the @WebService annotation on the FooDocumentImpl class to  
have the serviceName/portName attributes that match the values in the  
wsdl.

2) Update the <jaxws:endpoint> element in your config to add the  
qnames for the service name and portname.

Dan




>
> Uwe
>
>
>
> <stacktrace>
> org.springframework.beans.factory.BeanCreationException: Error  
> creating bean
> with name 'KonzessionsAbgabenSatzBereitstellen_v1': 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:// 
> service.ka.soa.hund.enbw.com/}FooService.
> Caused by:
> javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException: Could  
> not find
> definition for service
> {http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.
> 	at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:258)
> 	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:194)
> 	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:380)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org 
> .springframework 
> .beans.factory.support.AbstractAutowireCapableBeanFactory
> .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1240)
> 	at
> org 
> .springframework 
> .beans.factory.support.AbstractAutowireCapableBeanFactory
> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1205)
> 	at
> org 
> .springframework 
> .beans.factory.support.AbstractAutowireCapableBeanFactory
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
> 	at
> org 
> .springframework 
> .beans.factory.support.AbstractAutowireCapableBeanFactory
> .createBean(AbstractAutowireCapableBeanFactory.java:425)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory 
> $1.getObject(Ab
> stractBeanFactory.java:251)
> 	at
> org 
> .springframework 
> .beans.factory.support.DefaultSingletonBeanRegistry.getSi
> ngleton(DefaultSingletonBeanRegistry.java:156)
> 	at
> org 
> .springframework 
> .beans.factory.support.AbstractBeanFactory.getBean(Abstra
> ctBeanFactory.java:248)
> 	at
> org 
> .springframework 
> .beans.factory.support.AbstractBeanFactory.getBean(Abstra
> ctBeanFactory.java:160)
> 	at
> org 
> .springframework 
> .beans.factory.support.DefaultListableBeanFactory.preInst
> antiateSingletons(DefaultListableBeanFactory.java:287)
> 	at
> org 
> .springframework 
> .context.support.AbstractApplicationContext.refresh(Abstr
> actApplicationContext.java:352)
> 	at
> org.springframework.web.context.ContextLoader.createWebApplicationContext 
> (Co
> ntextLoader.java:244)
> 	at
> org.springframework.web.context.ContextLoader.initWebApplicationContext 
> (Cont
> extLoader.java:187)
> 	at
> org.springframework.web.context.ContextLoaderListener.contextInitialized 
> (Con
> textLoaderListener.java:49)
> 	at
> org 
> .apache 
> .catalina.core.StandardContext.listenerStart(StandardContext.java:
> 3729)
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java: 
> 4187)
> 	at
> org 
> .apache 
> .catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
> 59)
> 	at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java: 
> 739)
> 	at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
> 	at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
> 	at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
> 	at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
> 	at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
> 	at
> org 
> .apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java: 
> 310)
> 	at
> org 
> .apache 
> .catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:119)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
> 	at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> 	at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> 	at
> org.apache.catalina.core.StandardService.start(StandardService.java: 
> 450)
> 	at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> Caused by:  
> org.apache.cxf.service.factory.ServiceConstructionException:
> Could not find definition for service
> {http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.
> 	at
> org 
> .apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java: 
> 114)
> 	at
> org 
> .apache 
> .cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> WSDL(ReflectionServiceFactoryBean.java:300)
> 	at
> org 
> .apache 
> .cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> eModel(ReflectionServiceFactoryBean.java:392)
> 	at
> org 
> .apache 
> .cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> nServiceFactoryBean.java:180)
> 	at
> org 
> .apache 
> .cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
> oryBean.java:163)
> 	at
> org 
> .apache 
> .cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
> ractWSDLBasedEndpointFactory.java:79)
> 	at
> org 
> .apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java: 
> 114)
> 	at
> org 
> .apache 
> .cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
> va:160)
> 	at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:322)
> 	at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:244)
> 	... 43 more
> </stacktrace>
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: Ian Roberts [mailto:i.roberts@dcs.shef.ac.uk]
>> Gesendet: Dienstag, 3. Juni 2008 12:49
>> An: users@cxf.apache.org
>> Betreff: Re: CXF delivers transformed WSDL on ?wsdl Request
>>
>>
>> Maurer Uwe wrote:
>>> 	<jaxws:endpoint id="FooService"
>>> 	 	wsdlLocation="Web-inf/wsdl/main.wsdl"
>>> 		implementor="#fooService"
>>> 		address="/FooService" />
>>
>> Maybe the path is case sensitive - try WEB-INF instead of Web-inf?
>>
>> Ian
>>
>> -- 
>> Ian Roberts               | Department of Computer Science
>> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
>>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Antwort: AW: CXF delivers transformed WSDL on ?wsdl Request [Virus checked]

Posted by ja...@external.t-mobile.at.
error with WEB-INF looks better in my opinion.
The problem is probably missing annotation in implementation class, or 
#fooService is AOP proxy and then implementorClass attribute has to be 
used also.
Any maybe it's enough to define service attribute as alternative to 
annots.




"Maurer Uwe" <u....@enbw.com> 
06/03/2008 13:00
Bitte antworten an
users@cxf.apache.org


An
<us...@cxf.apache.org>
Kopie

Thema
AW: CXF delivers transformed WSDL on ?wsdl Request  [Virus checked]






> Maybe the path is case sensitive - try WEB-INF instead of Web-inf?

I already tried. "Web-inf" seems to be the correct string. Trying WEB-INF
leads to another (!) error:

javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not 
find
definition for service
{http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.

(see stacktrace below)

Still there is the question, why CXF tries to load WSDL from the "bin"
directory of Tomcat.

Uwe



<stacktrace>
org.springframework.beans.factory.BeanCreationException: Error creating 
bean
with name 'KonzessionsAbgabenSatzBereitstellen_v1': 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://service.ka.soa.hund.enbw.com/}FooService.
Caused by: 
javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not 
find
definition for service
{http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.
                 at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:258)
                 at 
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:194)
                 at 
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:380)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
                 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
                 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1240)
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1205)
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:425)
                 at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:251)
                 at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:156)
                 at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:248)
                 at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:160)
                 at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:287)
                 at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:352)
                 at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:244)
                 at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:187)
                 at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:49)
                 at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3729)
                 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
                 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
59)
                 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                 at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
                 at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
                 at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
                 at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
                 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
                 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
                 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
                 at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
                 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
                 at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
                 at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
                 at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
                 at 
org.apache.catalina.startup.Catalina.start(Catalina.java:551)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
                 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
                 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at 
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
                 at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Could not find definition for service
{http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.
                 at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
                 at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
WSDL(ReflectionServiceFactoryBean.java:300)
                 at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
eModel(ReflectionServiceFactoryBean.java:392)
                 at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
nServiceFactoryBean.java:180)
                 at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
oryBean.java:163)
                 at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
ractWSDLBasedEndpointFactory.java:79)
                 at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114)
                 at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
va:160)
                 at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:322)
                 at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:244)
                 ... 43 more
</stacktrace>


> -----Ursprüngliche Nachricht-----
> Von: Ian Roberts [mailto:i.roberts@dcs.shef.ac.uk] 
> Gesendet: Dienstag, 3. Juni 2008 12:49
> An: users@cxf.apache.org
> Betreff: Re: CXF delivers transformed WSDL on ?wsdl Request
> 
> 
> Maurer Uwe wrote:
> >              <jaxws:endpoint id="FooService"
> >                              wsdlLocation="Web-inf/wsdl/main.wsdl"
> >                              implementor="#fooService"
> >                              address="/FooService" />
> 
> Maybe the path is case sensitive - try WEB-INF instead of Web-inf?
> 
> Ian
> 
> -- 
> Ian Roberts               | Department of Computer Science
> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
> 




AW: CXF delivers transformed WSDL on ?wsdl Request

Posted by Maurer Uwe <u....@enbw.com>.
> Maybe the path is case sensitive - try WEB-INF instead of Web-inf?

I already tried. "Web-inf" seems to be the correct string. Trying WEB-INF
leads to another (!) error:

javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service
{http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.

(see stacktrace below)

Still there is the question, why CXF tries to load WSDL from the "bin"
directory of Tomcat.

Uwe



<stacktrace>
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'KonzessionsAbgabenSatzBereitstellen_v1': 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://service.ka.soa.hund.enbw.com/}FooService.
Caused by: 
javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service
{http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.
	at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:258)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:194)
	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:380)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1240)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1205)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:425)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:251)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:156)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:248)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:160)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:287)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:352)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:244)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:187)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:49)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3729)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
59)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
	at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
	at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
	at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Could not find definition for service
{http://service.ka.soa.hund.enbw.com/}FooDocumentImplService.
	at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
WSDL(ReflectionServiceFactoryBean.java:300)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
eModel(ReflectionServiceFactoryBean.java:392)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
nServiceFactoryBean.java:180)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
oryBean.java:163)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
ractWSDLBasedEndpointFactory.java:79)
	at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114)
	at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
va:160)
	at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:322)
	at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:244)
	... 43 more
</stacktrace>


> -----Ursprüngliche Nachricht-----
> Von: Ian Roberts [mailto:i.roberts@dcs.shef.ac.uk] 
> Gesendet: Dienstag, 3. Juni 2008 12:49
> An: users@cxf.apache.org
> Betreff: Re: CXF delivers transformed WSDL on ?wsdl Request
> 
> 
> Maurer Uwe wrote:
> > 	<jaxws:endpoint id="FooService"
> > 	 	wsdlLocation="Web-inf/wsdl/main.wsdl"
> > 		implementor="#fooService"
> > 		address="/FooService" />
> 
> Maybe the path is case sensitive - try WEB-INF instead of Web-inf?
> 
> Ian
> 
> -- 
> Ian Roberts               | Department of Computer Science
> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
> 

Re: CXF delivers transformed WSDL on ?wsdl Request

Posted by Ian Roberts <i....@dcs.shef.ac.uk>.
Maurer Uwe wrote:
> 	<jaxws:endpoint id="FooService"
> 	 	wsdlLocation="Web-inf/wsdl/main.wsdl"
> 		implementor="#fooService"
> 		address="/FooService" />

Maybe the path is case sensitive - try WEB-INF instead of Web-inf?

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK