1

メトロスタックでSpringを使用してWebサービスを実装しようとしています。

セットアップは問題ないようですが、applicationContext.xml でエラーが発生します。

cvc-complex-type.2.4.c: 一致するワイルドカードは厳密ですが、要素 'wss:binding' の宣言が見つかりません。

公開された例は古く、Spring 3 ではバインディングを別の方法で定義する必要があると思います。

<?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:p="http://www.springframework.org/schema/p"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:ws="http://jax-ws.java.net/spring/core"
       xmlns:wss="http://jax-ws.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/aop
       http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

    <wss:binding url="/ws">
        <wss:service>
            <ws:service bean="#webService"/>
        </wss:service>
    </wss:binding>
    <!-- this bean implements web service methods -->
    <bean id="webService" class="com.test.TestService"/>
</beans>

バインディングをどのように構成する必要がありますか、または説明はどこにありますか。

4

1 に答える 1

3

まず、あなたはこれを見逃しているようですschemaLocation:

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

詳細はこちらですが、すでにご覧になっていると思います

于 2011-02-04T21:32:33.420 に答える