title: Creating a Web Service Client in Eclipse
body: <p>I am following the Java EE 6 tutorial and trying to set-up a basic client for a web service. I am generating the required code using Eclipse.</p>
  <p>Method:</p>
  <ol>
  <li>Create a new Java project</li>
  <li>Start the [Web Service Client] wizard</li>
  <li>Provide the [Service Definition] and select [Develop Client]</li>
  </ol>
  <p>This generates the code, but I get the following errors (repeated multiple times):</p>
  <blockquote>
  <p>endpoint.Hello cannot be resolved to a type   HelloProxy.java /com.examples.helloclientapp/src/endpoint   line</p>
  <p>Hello cannot be resolved to a type    HelloProxy.java /com.examples.helloclientapp/src/endpoint</p>
  </blockquote>
  <p>This is the code for the webservice I am using (which works and I can access the wsdl):</p>
  <pre><code>package endpoint;
  
  import javax.jws.WebMethod;
  import javax.jws.WebService;
  
  @WebService
  public class Hello {
  
      private String message = new String(&quot;Hello, &quot;);
  
      public void Hello() {
      }
  
      @WebMethod
      public String sayHello(String name) {
          return message + name + &quot;.&quot;;
      }
  
  }
  </code></pre>
  <p>The generated code that is giving me a problem is the HelloProxy. It seems to be missing the Hello class (this did not get generated):</p>
  <pre><code>package endpoint;
  
  public class HelloProxy implements endpoint.Hello {
    private String _endpoint = null;
  
    // This was not generated
    private endpoint.Hello hello = null;
    
    public HelloProxy() {
      _initHelloProxy();
    }
    
    public HelloProxy(String endpoint) {
      _endpoint = endpoint;
      _initHelloProxy();
    }
    
    private void _initHelloProxy() {
      try {
        hello = (new endpoint.HelloServiceLocator()).getHelloPort();
        if (hello != null) {
          if (_endpoint != null)
            ((javax.xml.rpc.Stub)hello)._setProperty(&quot;javax.xml.rpc.service.endpoint.address&quot;, _endpoint);
          else
            _endpoint = (String)((javax.xml.rpc.Stub)hello)._getProperty(&quot;javax.xml.rpc.service.endpoint.address&quot;);
        }
        
      }
      catch (javax.xml.rpc.ServiceException serviceException) {}
    }
    
    public String getEndpoint() {
      return _endpoint;
    }
    
    public void setEndpoint(String endpoint) {
      _endpoint = endpoint;
      if (hello != null)
        ((javax.xml.rpc.Stub)hello)._setProperty(&quot;javax.xml.rpc.service.endpoint.address&quot;, _endpoint);
      
    }
    
    public endpoint.Hello getHello() {
      if (hello == null)
        _initHelloProxy();
      return hello;
    }
    
    
  }
  </code></pre>
  <p>The other files that were generated are (If needed I can give the contents):</p>
  <ul>
  <li>Hello_PortType.java</li>
  <li>HelloPortBindingStub.java</li>
  <li>HelloService.java</li>
  <li>HelloServiceLocator.java</li>
  </ul>
  <p>Is there something wrong with the webservice that is causing the Hello class to not be generated?</p>