Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxws]

197 views
Skip to first unread message

SqUaLL

unread,
Sep 18, 2007, 2:06:11 AM9/18/07
to cxf-zh
今天准备把以前的XFire移稙到CXF上来
做了一把实验老是说spring的schema找不到
cxf用的2.01,看了一下META-INF中是有spring.schema文件的
那位知道帮忙看看

willem

unread,
Sep 18, 2007, 2:20:55 AM9/18/07
to cxf-zh
能否把你Spring的配置文件贴出来?
或者参考一下我这给你的例子

<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-extension-http-
binding.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>

<jaxws:endpoint id="endpoint1"

implementor="org.apache.hello_world_soap_http.GreeterImpl"
address="/services/Greeter1"
wsdlLocation="/wsdl/hello_world.wsdl"
/>

</beans>

姜宁 (Willem)
------------------
http://willem.bokeland.com/

SqUaLL

unread,
Sep 18, 2007, 2:22:55 AM9/18/07
to cxf-zh
<?xml version="1.0" encoding="UTF-8"?>

<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" />

<jaxws:endpoint id="platform.userServiceEndpoint"
implementor="#platform.userService" address="/service/
IRemoteUserService">
<jaxws:serviceFactory>
<ref bean='jaxws-and-aegis-service-factory' />
</jaxws:serviceFactory>
</jaxws:endpoint>

<jaxws:endpoint id="platform.portletServiceEndpoint"
implementor="#platform.portletService" address="/service/
IRemotePortletService">
<jaxws:serviceFactory>
<ref bean='jaxws-and-aegis-service-factory' />
</jaxws:serviceFactory>
</jaxws:endpoint>
</beans>

willem

unread,
Sep 18, 2007, 2:39:06 AM9/18/07
to cxf-zh
单看你的配置文件没有发现什么问题。
查一下你的class path中是否包含了cxf-rt-frontend-jaxws-*.jar,
还有能说一下你是怎么加载这个配置文件的。


对了你的spring 版本是什么,CXF使用的是spring2.0.4


姜宁 (Willem)
------------------
http://willem.bokeland.com/

> http://cxf.apache.org/jaxwshttp://cxf.apache.org/schemas/jaxws.xsd">

SqUaLL

unread,
Sep 18, 2007, 3:57:15 AM9/18/07
to cxf-zh
搞定了,果然是差依赖的jar包
感觉cxf比xfire复杂了很多,而且依赖的包太多了
Reply all
Reply to author
Forward
0 new messages