title: How to switch on validation according to WSDL - spring boot and spring-ws
body: <p>in my schema I have following element:    </p>
  
  <pre><code>&lt;xs:element name="deletePokemonsRequest"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="pokemonId" type="xs:int" minOccurs="1" maxOccurs="unbounded"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>And I have endpoint for it:  </p>
  
  <pre><code>@PayloadRoot(namespace = NAMESPACE_URI, localPart = "deletePokemonsRequest")
  @ResponsePayload
  public DeletePokemonsRequest deletePokemons(@RequestPayload DeletePokemonsRequest deletePokemons){
      pokemonDAO.deletePokemons(deletePokemons.getPokemonId());
      return deletePokemons;
  }
  </code></pre>
  
  <p>When I send on this endpoint:  </p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pok="www"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;pok:deletePokemonsRequest&gt;               
        &lt;/pok:deletePokemonsRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>It is accepted, but it should be rejected on validation stage. Why ? Because I set <code>minOccurs=1</code>, but it accepted envelope with <code>0</code> elements.<br>
  How to turn on validation according to WSDL ?</p>