title: Connecting Remotely with Java Web Services
body: <p>Can someone please tell me what I'm doing wrong?
  I'm trying to put together a quick web service test just to see if I can get it to work for now.
  The problem I'm having is that, as shown below, it does not work, but if I change the URL and replace "<code>myWebsite.com</code>" with "<code>localhost</code>" it works. So, I know the server side is working (I've still checked and double checked it though). But I'll need this to work through remote clients, and I just cannot get it to work.
  Any help would be greatly appreciated.</p>
  
  <pre><code>package stickman.Server;
  
  import java.net.*;
  import javax.xml.namespace.*;
  import javax.xml.ws.*;
  import stickman.Combined.*;
  public class TestApp {
  
  public static void main(String[] args) throws Exception {
  
      // --------------------------------------------
      // changing "myWebite.com" to "localhost" works
      URL url = new URL(
          "http://myWebsite.com:32768/home/rhyan/workspace/Stickman/bin/stickman/Server");
      // --------------------------------------------
  
      QName qname = new QName("http://Server.stickman/","StickmanServerService");
      Service service = Service.create(url, qname);
      StickmanServerInterface ssi = service.getPort(StickmanServerInterface.class);
  
      Account a = ssi.getAccount("This is a test");
      System.out.println(a.getUserId());
  
  }
  
  }
  </code></pre>
  
  <p>Edit: here's the error tracking...</p>
  
  <pre><code>Exception in thread "main" com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
  
  java.net.ConnectException: Connection refused
  java.net.ConnectException: Connection refused
  
  at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:161)
  at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:133)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:254)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.&lt;init&gt;(WSServiceDelegate.java:217)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.&lt;init&gt;(WSServiceDelegate.java:165)
  at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:93)
  at javax.xml.ws.Service.&lt;init&gt;(Service.java:76)
  at javax.xml.ws.Service.create(Service.java:700)
  at stickman.Server.ServerTestApp.main(ServerTestApp.java:17)
  </code></pre>