title: How to validate WSDL URL is up and running or not from Java?
body: <p>I wanted to check WSDL url is valid or not from Java code. So that I can use another url based on that.</p>
  
  <p>So I am checking the code like this.</p>
  
  <pre><code>private boolean isValidWsdlURL(String wsdlUrl) 
  {
      UrlValidator urlValidator = new UrlValidator();
      if(urlValidator.isValid(wsdlUrl)) 
      {
          return true;
      }
      logger.info("WSDL URL is not valid...");
      return false;
  }
  </code></pre>
  
  <p>But its alwys returning false though I have valid URL.
  <strong>WSDL URL Ex:</strong> <a href="http://www.sample.com/MyWsdlService?wsdl" rel="nofollow">http://www.sample.com/MyWsdlService?wsdl</a></p>
  
  <p>Because URL ends with ?wsdl
  How to check the code? Looks we need only "<a href="http://www.sample.com" rel="nofollow">http://www.sample.com</a>" for UrlValidator to pass.</p>