title: Can not initialize the default wsdl from classpath:wsdl
body: <p>I'm following an example to understand how SOAP works. I have generated code from wsdl using Apache cxf and I can log SOAP web service request e response. Apparently  all works fine. I have just a problem to set a relative path. I've followed this solution  <a href="https://stackoverflow.com/questions/4455195/how-to-avoid-the-need-to-specify-the-wsdl-location-in-a-cxf-or-jax-ws-generated/9875701#9875701">How to avoid the need to specify the WSDL location in a CXF or JAX-WS generated webservice client?</a>, but there isn't way to solve the log error on console.</p>
  <p>The error message on console:</p>
  <pre><code>jun 03, 2021 2:17:38 PM io.codejournal.maven.wsdl2java.NumberConversion &lt;clinit&gt;
  INFO: Can not initialize the default wsdl from classpath:wsdl/dataaccess-numberconversion.wsdl
  </code></pre>
  <p>this is my pom.xml:</p>
  <pre><code>&lt;properties&gt;
        &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
        &lt;java.version&gt;11&lt;/java.version&gt;
        &lt;maven.compiler.source&gt;${java.version}&lt;/maven.compiler.source&gt;
        &lt;maven.compiler.target&gt;${java.version}&lt;/maven.compiler.target&gt;
     &lt;/properties&gt;
     &lt;dependencies&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;com.sun.xml.ws&lt;/groupId&gt;
          &lt;artifactId&gt;jaxws-rt&lt;/artifactId&gt;
          &lt;version&gt;2.3.3&lt;/version&gt;
        &lt;/dependency&gt;
       &lt;dependency&gt;
          &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
          &lt;artifactId&gt;cxf-rt-frontend-simple&lt;/artifactId&gt;
          &lt;version&gt;3.1.18&lt;/version&gt;
      &lt;/dependency&gt;         
    &lt;/dependencies&gt;
     &lt;build&gt;  
        &lt;plugins&gt;
          &lt;plugin&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
            &lt;version&gt;3.4.2&lt;/version&gt;
            &lt;executions&gt;
              &lt;execution&gt;
                &lt;id&gt;generate-sources&lt;/id&gt;
                &lt;phase&gt;generate-sources&lt;/phase&gt;
                &lt;goals&gt;
                  &lt;goal&gt;wsdl2java&lt;/goal&gt;
                &lt;/goals&gt;
                &lt;configuration&gt;
                  &lt;wsdlOptions&gt;
                    &lt;wsdlOption&gt;
                      &lt;wsdl&gt;${basedir}/src/main/resources/dataaccess-numberconversion.wsdl&lt;/wsdl&gt;
                      &lt;wsdlLocation&gt;classpath:wsdl/dataaccess-numberconversion.wsdl&lt;/wsdlLocation&gt;
                      &lt;packagenames&gt;
                        &lt;packagename&gt;io.codejournal.maven.wsdl2java&lt;/packagename&gt;
                      &lt;/packagenames&gt;
                    &lt;/wsdlOption&gt;
                  &lt;/wsdlOptions&gt;
                &lt;/configuration&gt;
              &lt;/execution&gt;
            &lt;/executions&gt;
          &lt;/plugin&gt;
        &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  <p>My service class:</p>
  <pre><code>@WebServiceClient(name = &quot;NumberConversion&quot;,
                    wsdlLocation = &quot;classpath:wsdl/dataaccess-numberconversion.wsdl&quot;,
                    targetNamespace = &quot;http://www.dataaccess.com/webservicesserver/&quot;)
  public class NumberConversion extends Service {
  
      public final static URL WSDL_LOCATION;
  
      public final static QName SERVICE = new QName(&quot;http://www.dataaccess.com/webservicesserver/&quot;, &quot;NumberConversion&quot;);
      public final static QName NumberConversionSoap = new QName(&quot;http://www.dataaccess.com/webservicesserver/&quot;, &quot;NumberConversionSoap&quot;);
      public final static QName NumberConversionSoap12 = new QName(&quot;http://www.dataaccess.com/webservicesserver/&quot;, &quot;NumberConversionSoap12&quot;);
      static {
          URL url = NumberConversion.class.getClassLoader().getResource(&quot;wsdl/dataaccess-numberconversion.wsdl&quot;);
          if (url == null) {
              java.util.logging.Logger.getLogger(NumberConversion.class.getName())
                  .log(java.util.logging.Level.INFO,
                       &quot;Can not initialize the default wsdl from {0}&quot;, &quot;classpath:wsdl/dataaccess-numberconversion.wsdl&quot;);
          }
          WSDL_LOCATION = url;
      }
  
      public NumberConversion(URL wsdlLocation) {
          super(wsdlLocation, SERVICE);
      }
  
      public NumberConversion(URL wsdlLocation, QName serviceName) {
          super(wsdlLocation, serviceName);
      }
  
      public NumberConversion() {
          super(WSDL_LOCATION, SERVICE);
      }
  
      public NumberConversion(WebServiceFeature ... features) {
          super(WSDL_LOCATION, SERVICE, features);
      }
  
      public NumberConversion(URL wsdlLocation, WebServiceFeature ... features) {
          super(wsdlLocation, SERVICE, features);
      }
  
      public NumberConversion(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
          super(wsdlLocation, serviceName, features);
      }
     
      /**
       *
       * @return
       *     returns NumberConversionSoapType
       */
      @WebEndpoint(name = &quot;NumberConversionSoap&quot;)
      public NumberConversionSoapType getNumberConversionSoap() {
          return super.getPort(NumberConversionSoap, NumberConversionSoapType.class);
      }
  
      /**
       *
       * @param features
       *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the &lt;code&gt;features&lt;/code&gt; parameter will have their default values.
       * @return
       *     returns NumberConversionSoapType
       */
      @WebEndpoint(name = &quot;NumberConversionSoap&quot;)
      public NumberConversionSoapType getNumberConversionSoap(WebServiceFeature... features) {
          return super.getPort(NumberConversionSoap, NumberConversionSoapType.class, features);
      }
  
  
      /**
       *
       * @return
       *     returns NumberConversionSoapType
       */
      @WebEndpoint(name = &quot;NumberConversionSoap12&quot;)
      public NumberConversionSoapType getNumberConversionSoap12() {
          return super.getPort(NumberConversionSoap12, NumberConversionSoapType.class);
      }
  
      /**
       *
       * @param features
       *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the &lt;code&gt;features&lt;/code&gt; parameter will have their default values.
       * @return
       *     returns NumberConversionSoapType
       */
      @WebEndpoint(name = &quot;NumberConversionSoap12&quot;)
      public NumberConversionSoapType getNumberConversionSoap12(WebServiceFeature... features) {
          return super.getPort(NumberConversionSoap12, NumberConversionSoapType.class, features);
      }
  
  }
  </code></pre>
  <p>When I run this code URL <code>url = NumberConversion.class.getClassLoader().getResource(&quot;wsdl/dataaccess-numberconversion.wsdl&quot;);</code> ,
  I'll get a null value back. It is the wrong path that NumberConversion.class.getClassLoader() calls, because this class is in another package.</p>
  <p>Any idea how to set in the right way?</p>