Java 6 JAX-WS self hosted services listening on one interface only
JAX-WS included with Java 6 provides a built in HTTP server giving the ability to host web services without running a Java EE server. I've created several sample services to get myself familiar with the functionality and followed http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/ guide.
However, there is one issue that I can't get sorted out, and this how to publish a standalone service that listens on all interfaces of the machine, not just one. To explain the problem, when you use the sample publish code of: *Endpoint.publish("http://localhost:8080/test", new ServiceImpl());* the service implemented by ServiceImpl will be published to port 8080 on the loopback interface. This makes the service accessible using "http://localhost:8080/test" and "http://127.0.0.1:8080/test" from the local machine ONLY.
If you have other network interfaces, for example an ethernet connection with DHCP assigned address of 192.168.0.10 you need to publish the service with *Endpoint.publish("http://192.168.0.10:8080/test", new ServiceImpl());* for it to be accessible externally. When published this way, the service does not respond to requests to "http://localhost:8080/test" from the machine it was published on.
Does anyone know how to publish a JAX-WS service so that a wildcard InetSocketAddress is used in the resultant com.sun.net.httpserver.HttpServer ?
Using url of "http://:8080/test" doesn't work and binds to localhost.
Thanks in advance.

