本文介绍了无法找到JAX-WS架构http://jax-ws.dev.java.net/spring/servlet.xsd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Spring框架实现JAX-WS。

I am implementing JAX-WS with Spring framework.

以下是我的Spring applicationContext.xml

The following is my Spring applicationContext.xml

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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://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
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd
    ">

然而,Eclipse抱怨:

However, Eclipse is complaining:

经过调查,我找到了以下网址:

不存在。
相反,它似乎转移到:

(您可以在浏览器中打开此链接)

After investigation, I find the URL:http://jax-ws.dev.java.net/spring/servlet.xsdDoes not exist.Instead, it seems be move to:http://jax-ws.java.net/spring/servlet.xsd(You can open this link in the brower)

因此,我更新了XSD来自
的架构URL

Therefore, I updated XSD schema URL fromhttp://jax-ws.dev.java.net/spring/servlet.xsdtohttp://jax-ws.java.net/spring/servlet.xsd

现在我的applicationContext.xml看起来像这样:

Now my applicationContext.xml looks like this:

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

实际上,通过此更改,Eclipse错误消失了。
问题是在Tomcat 7中启动Web服务后,我得到以下运行时错误:

Actually with this change the Eclipse error goes away.The problem is after launching the web service in Tomcat 7, I get the following runtime error instead:

请告知。

非常感谢。
问候,

Thank you very much.Regards,

推荐答案

您的问题是您从到。即使后者是正确的URL,它也与您的jaxws-spring.jar META-INF / spring.schema文件中定义的不匹配。该文件应包含以下内容

Your problem is that you change the location from http://jax-ws.dev.java.net/spring/servlet.xsd to http://jax-ws.java.net/spring/servlet.xsd. Even though the latter one is the right url, it does not match what is defined in your jaxws-spring.jar META-INF/spring.schema file. That file should have the following content

http\://jax-ws.dev.java.net/spring/core.xsd=spring-jax-ws-core.xsd
http\://jax-ws.dev.java.net/spring/servlet.xsd=spring-jax-ws-servlet.xsd
http\://jax-ws.dev.java.net/spring/local-transport.xsd=spring-jax-ws-local-transport.xsd

Spring使用此映射来搜索类路径中的模式而不是Internet。这些模式文件位于jaxws-spring.jar文件的根目录。

Spring uses this mapping to search the schema in the classpath rather than to internet. Those schema files are located at the root of the jaxws-spring.jar file.

请查看

这篇关于无法找到JAX-WS架构http://jax-ws.dev.java.net/spring/servlet.xsd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 19:23