Dan,

You were right on the money.  I had to specify the wsdlLocation and
serviceName in the ServiceImpl class.  I wasn't able to configure them using
spring as I couldn't properly set the target namespace.  In any event, these
annotations work and schema validation is functional for the body as well as
soap headers.

Thanks,
John


dkulp wrote:
> 
> 
> You aren't even getting close to where the validation would be considered.   
> The service isn't even starting up.
> 
> It LOOKS like your @WebService annotation on the 
> #singleSignOnServicesImpl_1_0_0   bean doesn't have the proper
> targetNamespace 
> or serviceName attribute on it that would match the service names in the
> wsdl.   
> That would be the first thing to check.
> 
> Dan
> 
> 
> On Mon April 13 2009 2:20:21 pm jp4 wrote:
>> A bit more information... Here is the stacktrace when trying to load the
>> wsdl
>>
>> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
>> Could not find definition for service
>> {http://www.foo.com/enterpriseservices/accountservices/singlesignon_1_0_0}S
>>ingleSignOnServicesImpl_1_0_0Service. at
>> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:126
>>) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFro
>>mWSDL(ReflectionServiceFactoryBean.java:325) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServi
>>ceModel(ReflectionServiceFactoryBean.java:429)
>>
>> jp4 wrote:
>> > I recently migrated to cxf 2.2 from jbossws and I'm trying to figure
>> out
>> > how to perform schema validation using the wsdlLocation attribute on my
>> > spring beans.  My .wsdl files are on the classpath (as are the xsd,
>> with
>> > the correct relative path) but when I refer to them using the following
>> > wsdlLocation="classpath:foo.wsdl" in my spring bean definition I get
>> the
>> > following error.  One thing that I should note is that my wsdl files
>> > perform xsd:include to include one or more xsd files for reuse.  In
>> > addition, some of the xsd files may include other xsd files.   Is this
>> > the cause of the error below?  In addition, I am able to get the schema
>> > validation to work by defining my bean like this...  I'd prefer a
>> simpler
>> > approach as some of our requests have a large number of xsd files...
>> Any
>> > advice would be greatly appreciated.
>> >
>> > Thanks,
>> >
>> > John
>> >
>> >     <jaxws:endpoint  id="SingleSignOnServicesImpl_1_0_0"
>> > implementor="#singleSignOnServicesImpl_1_0_0"
>> > address="/SingleSignOnServices_1_0_0"
>> > wsdlLocation="classpath:SingleSignOn_1_0_0.wsdl">
>> >            <jaxws:properties><entry key="schema-validation-enabled" 
>> > value="true"
>> > /></jaxws:properties>
>> >        <jaxws:schemaLocations>
>> >
>> <jaxws:schemaLocation>classpath:xsd/SingleSignOn_1_0_0.xsd</jaxws:schemaL
>> >ocation>
>> >
>> <jaxws:schemaLocation>classpath:xsd/AccountServicesCommon_1_0_0.xsd</jaxw
>> >s:schemaLocation>
>> >
>> <jaxws:schemaLocation>classpath:xsd/RequestAssertionKey_1_0_0.xsd</jaxws:
>> >schemaLocation>
>> >
>> <jaxws:schemaLocation>classpath:xsd/RequestLegacyAssertionKey_1_0_0.xsd</
>> >jaxws:schemaLocation>
>> >
>> <jaxws:schemaLocation>classpath:xsd/AuthenticateAssertionKey_1_0_0.xsd</j
>> >axws:schemaLocation>
>> >
>> <jaxws:schemaLocation>classpath:xsd/Common_1_0_0.xsd</jaxws:schemaLocatio
>> >n> </jaxws:schemaLocations>
>> >      </jaxws:endpoint>
>> >
>> > Caused by: javax.xml.ws.WebServiceException:
>> > org.apache.cxf.service.factory.ServiceConstructionException: Could not
>> > find definition for service
>> >
>> {http://www.foo.com/enterpriseservices/accountservices/singlesignon_1_0_0
>> >}SingleSignOnServicesImpl_1_0_0Service. at
>> > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:275) at
>> > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209) at
>> > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:404) at
>> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>> >:39) at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
>> >mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
>> >     at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact
>> >ory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1413)
>> > at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact
>> >ory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1374) at
>> >
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact
>> >ory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
> 
> -- 
> Daniel Kulp
> dk...@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wsdlLocation-and-xsd%3Aincludes-tp23025876p23031482.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to