Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to locate Spring Namespace for JAX-WS

I want to integrate JAX-WS to my Spring project. Found this link: http://jax-ws-commons.java.net/spring/

I adopted it and integrated it to my 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> 

But every time I start Tomcat, I get this exception:

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 does not report any errors about the namespace. I found a few similar problems with google, but none fixed my error.

Thanks for your help!

like image 413
Tommy Avatar asked Mar 20 '11 19:03

Tommy


1 Answers

Same problem in this : link , you need jaxws-spring.jar from - http://download.java.net/maven/2/org/jvnet/jax-ws-commons/spring/jaxws-spring/

like image 109
mkyong Avatar answered Sep 29 '22 08:09

mkyong