gpt4 book ai didi

jax-ws - 匹配通配符是严格的,但找不到元素 'wss:binding' 的声明

转载 作者:行者123 更新时间:2023-12-05 01:04:59 25 4
gpt4 key购买 nike

运行 maven clean install 时,出现以下错误:

The matching wildcard is strict, but no declaration can be found for element 'wss:binding'



我不明白为什么会出现此错误,因为它是 https://jax-ws-commons.java.net/spring/ 示例中的复制粘贴.我的依赖项中也有 xbean-spring v3.16。

我查了 http://jax-ws.java.net/spring/servlet.xsd存在元素绑定(bind)!

这是我复制/粘贴的文件:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
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.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://jax-ws.java.net/spring/core
http://jax-ws.java.net/spring/core.xsd
http://jax-ws.java.net/spring/servlet
http://jax-ws.java.net/spring/servlet.xsd">

<context:component-scan base-package="com.example.ws.soap.service.impl" />

<wss:binding url="/service/desoteServicePort">
<wss:service>
<ws:service bean="#desoteService" />
</wss:service>
</wss:binding>

</beans>

我的文件有什么问题?

最佳答案

命名空间不匹配。您声明了命名空间:

<beans ...
xmlns:ws="http://jax-ws.dev.java.net/spring/core"
xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"

但是当您与架构位置进行关联时,您使用了不同的命名空间:
  xsi:schemaLocation=" ...

http://jax-ws.java.net/spring/core http://.../core.xsd
http://jax-ws.java.net/spring/servlet http://.../servlet.xsd">

您声明的命名空间中有一个额外的“dev”,它不存在于您与 XSD 位置关联的命名空间中。

您可能会混淆不同版本的 Spring。

关于jax-ws - 匹配通配符是严格的,但找不到元素 'wss:binding' 的声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22049154/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com