title: Spring WS SimpleXsdSchema can not access xsd schema included in wsdl
body: <p>The wsdl I am working does not have seperate xsd file. XSD Schema is included in wsdl file as shown below</p>
  <pre><code>&lt;wsdl:definitions name=&quot;myProject&quot;
                    targetNamespace=&quot;http://www.company.gr/myProject/definitions&quot;
                    xmlns:tns=&quot;http://www.company.gr/myProject/definitions&quot;
                    xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot;
                    xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
                    xmlns:xsd1=&quot;http://www.company.gr/myProject/schemas&quot;&gt;
  
      &lt;wsdl:types&gt;
          &lt;schema
                  targetNamespace=&quot;http://www.company.gr/myProject/schemas&quot;
                  xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
  
          &lt;simpleType name=&quot;aaa&quot;&gt;
              ...
          &lt;/simpleType&gt;
  </code></pre>
  <p>...</p>
  <p>And I would like add a validation interceptor with the following code:</p>
  <pre><code>@Override
  public void addInterceptors(List&lt;EndpointInterceptor&gt; interceptors) {
      PayloadValidatingInterceptor validatingInterceptor = new PayloadValidatingInterceptor();
      validatingInterceptor.setValidateRequest(true);
      validatingInterceptor.setValidateResponse(true);
      validatingInterceptor.setXsdSchema(mySchema());
      interceptors.add(validatingInterceptor);
  }
  
  @Bean
  public XsdSchema mySchema(){
      return new SimpleXsdSchema(new ClassPathResource(&quot;**myWSDL.wsdl#types**&quot;));
  }
  </code></pre>
  <p>But the schema can't be found when using <strong>myWSDL.wsdl#types</strong> .</p>
  <p>Is there a way to access the schema without restructuring the wsdl to externalize the xsd schema?</p>