加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – 无法找到JAX-WS的Spring Namespace

发布时间:2020-12-15 00:49:25 所属栏目:Java 来源:网络整理
导读:我想将JAX-WS集成到我的 Spring项目中.找到此链接: http://jax-ws-commons.java.net/spring/ 我采用它并将其集成到我的applicationContext.xml: ?xml version="1.0" encoding="UTF-8"?beans xmlns="http://www.springframework.org/schema/beans" xmlns:xs
我想将JAX-WS集成到我的 Spring项目中.找到此链接:
http://jax-ws-commons.java.net/spring/

我采用它并将其集成到我的applicationContext.xml:

<?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:context="http://www.springframework.org/schema/context" 
   xmlns:task="http://www.springframework.org/schema/task"
   xmlns:ws="http://jax-ws.dev.java.net/spring/core" 
   xmlns:wss="http://jax-ws.dev.java.net/spring/servlet" 
   xsi:schemaLocation="http://www.springframework.org/schema/beans 
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-3.0.xsd
           http://www.springframework.org/schema/task
           http://www.springframework.org/schema/task/spring-task-3.0.xsd
           http://jax-ws.dev.java.net/spring/core
           http://jax-ws.dev.java.net/spring/core.xsd
           http://jax-ws.dev.java.net/spring/servlet
           http://jax-ws.dev.java.net/spring/servlet.xsd">

    <context:annotation-config />
    <context:component-scan base-package="cloud" />
    <task:annotation-driven/>

    <wss:binding url="/notification" service="#notificationService"></wss:binding>  
    <ws:service id="notificationService" bean="#notificationImpl"></ws:service> 

    <bean id="notificationImpl" class="cloud.balancer.Notification" /> 
</beans>

但每次启动Tomcat时,我都会遇到以下异常:

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://jax-ws.dev.java.net/spring/servlet]
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

Eclipse不会报告有关命名空间的任何错误.我发现谷歌有一些类似的问题,但没有修复我的错误.

谢谢你的帮助!

解决方法

同样的问题: link,你需要来自- http://download.java.net/maven/2/org/jvnet/jax-ws-commons/spring/jaxws-spring/的jaxws-spring.jar

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读