The corresponding template is strict, but no ad was found for the 'wss: binding' element

When running maven clean install, I get the following error:

The corresponding template is strict, but ads cannot be found for the element 'wss: binding'

I do not understand why this error appears, since this is a copy-paste from the example at https://jax-ws-commons.java.net/spring/ . I also have xbean-spring v3.16 in my dependencies.

I checked the http://jax-ws.java.net/spring/servlet.xsd element binding!

Here is the file I copied / pasted:

<?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>

What happened to my file?

+4
source share
3 answers

. :

<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.

+3

@helderdarocha, , . ~ JAX-WS Commons.

, ( ) :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:ws="http://jax-ws.dev.java.net/spring/core"
       xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.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">
+3

, , , .

, :

  • xsd applicationContext.xml. doc. :

    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

, dev url core servlet. .

  1. jaxws spring maven pom. :

    <dependency> <groupId>org.jvnet.jax-ws-commons.spring</groupId> <artifactId>jaxws-spring</artifactId> <version>1.9</version> <exclusions> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </exclusion> <exclusion> <groupId>org.jvnet.staxex</groupId> <artifactId>stax-ex</artifactId> </exclusion> </exclusions> </dependency>

!

0

Source: https://habr.com/ru/post/1529033/


All Articles