cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdprao <gdp...@yahoo.com>
Subject Re: contract-first with only xsd
Date Mon, 01 Oct 2007 13:54:26 GMT

Hi,

I have tried contract-first XSD approach in my service. I have generated
JAXB mappings from the XSD and used them in my service.  The service is
working fine without specifying <jaxws:schemaLocation>. If I use that, I am
getting the following exception at startup.  I am using CXF2.0.1. Any help
is appreciated.

applictionContext-cxf.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:jaxws="http://cxf.apache.org/jaxws"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

	<import resource="classpath:META-INF/cxf/cxf.xml" />
	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
	<import
		resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml" />
	<import resource="classpath:META-INF/cxf/cxf-extension-xml.xml" />

<jaxws:endpoint id="serviceSoapEndPoint"
		implementor="#serviceImplementor" address="/MyService">
		<jaxws:schemaLocations>
			<jaxws:schemaLocation>
				classpath:com/mydomain/schemas/serviceSchema.xsd
			</jaxws:schemaLocation>
		</jaxws:schemaLocations>
	</jaxws:endpoint>

007-10-01 06:34:16,346 - ERROR
(org.apache.catalina.core.StandardContext:listenerStart:3767) - Exception
sending context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Cannot locate BeanDefinitionParser for element
[schemaLocation]
Offending resource: ServletContext resource
[/WEB-INF/applicationContext-cxf.xml]
	at
org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
	at
org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
	at
org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
	at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:79)
	at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
	at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
	at
org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.getAndRegisterFirstChild(AbstractBeanDefinitionParser.java:175)
	at
org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.setFirstChildAsProperty(AbstractBeanDefinitionParser.java:139)
	at
org.apache.cxf.jaxws.spring.EndpointDefinitionParser.doParse(EndpointDefinitionParser.java:112)
	at
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:81)
	at
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
	at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
	at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)







BigEHokie wrote:
> 
> Here's just a quick sample.
> 
> I'm not stating this is the proper or correct way to do anything.
> However, this is how we are currently using CXF.
> 
> The CXF guys can provide you with better direction on how you SHOULD be
> creating your services.  They might tell you this approach is a bad
> approach.
> 
> Eric
> 
> On Tue, 2007-09-18 at 06:49 -0700, moraleslos wrote:
>> Hi--
>> 
>> Having gone through the Spring Web Services (SWS) manifesto about
>> contract-first as well as their sample examples, I wonder how CXF matches
>> up
>> with SWS.  I know that CXF allows contract-first development, but is it
>> as
>> simple as SWS?  For example, with SWS, all I need to do is define the XSD
>> for my types (the messages and such being passed or returned).  I can
>> then
>> have SWS generate the WSDL using basic conventions and the XSDs defined.
>> The
>> only other thing to do is to implement the endpoints (Java) that will
>> handle
>> the service.  From looking through the CXF site, it looks that if you do
>> contract-first, you must define the WSDL along with the XSDs and Java
>> service implementations (probably using JSR-181).  Is this the case?  
>> 
>> Thanks in advance!
>> 
>> -los
> 
>  
> 

-- 
View this message in context: http://www.nabble.com/contract-first-with-only-xsd-tf4474467.html#a12979566
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message