title: Consuming Java Webservice with JQuery, knowing only the WSDL location
body: <p>in the past I already successfully consumed .Net Webservices with jQuery. However now I'm trying to do the same with Java Webservices and I can't figure out how.</p>
  
  <p>In Eclipse I created a new dynamic web project that includes the following example class:</p>
  
  <pre><code>public class MessagesService {
  
  public int checkForMessages(String email, String password){
  
      return 42;
  }
  </code></pre>
  
  <p>From this class I created a Web Service by using the Eclipse integrated guide. It created me a WSDL file under the directory WebContent/wsdl. Now I can easily access the WSDL from my browser typing in: <a href="http://localhost:8080/MyProject/wsdl/MessagesService.wsdl" rel="nofollow">http://localhost:8080/MyProject/wsdl/MessagesService.wsdl</a></p>
  
  <p>Now that I want to call the checkForMessages method I don't really know what to enter in the URL field:</p>
  
  <pre><code>  function CallService() {
          $.ajax({
              type: "GET",
              url: Url,
  </code></pre>
  
  <p>Can you please help me with that?</p>
  
  <p>Thanks,
  Sebastian</p>