You need to either:
1) set the service name in the @WebService annotation of the service class to match what's in the wsdl. 2) Set the serviceName (and probably endpointName) properties on the JaxWsProxyFactoryBean Be default, if neither is specified, it follows the JAX-WS rules to map your classname to a service name and checks the wsdl for that. In your case, it isn't found. Dan On Tuesday 30 September 2008, C. Manchet wrote: > Hi, > > The JaxWsProxyFactoryBean creation fails if the name attribute of > <wsdl:service> doesn't ended with "Service". > > Example : > > --> In the WSDL I have : <wsdl:service name="Securite">. > The generated corresponding Service class : Securite.java > In the Spring configuration file : > <bean id="securiteServiceFactory" > class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> > <property name="serviceClass" > value="test.securite.client.cxf.Securite"/> <property name="address" > value="http://localhost:9000/securitecxf/services/Securite"/> > <property name="wsdlURL" value="classpath:wsdl/securite.wsdl" /> > </bean> > > I have the exception : > org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'securiteProxy' defined in class path resource > [beans_securite.xml]: Instantiation of bean failed; nested exception > is org.springframework.beans.factory.BeanDefinitionStoreException: > Factory method [public java.lang.Object > org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; > nested exception is > org.apache.cxf.service.factory.ServiceConstructionException: Could not > find definition for service > {http://cxf.client.securite.test/}SecuriteService. > > --> If I modify the service name in the WDSL (<wsdl:service > name="SecuriteService">, and so the generated corresponding Service > class is SecuriteService.java) and use the above Spring configuration > file, it's OK. > > --> If I set the serviceClass property to > "test.securite.client.cxf.SecuriteService" (that is the correct value > of the property), I have this exception :"Could not find definition > for service {http://cxf.client.securite.test/}SecuriteServiceService". > > Thanks for you reply -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
