简体   繁体   中英

JAX-WS Web Services Without Java EE Containers

I can easily publish web services using javax.xml.ws.Endpoint. endpoint.publish(getURL()); I would like to know why I have to use real IP to publisg the webservice to remote. In otherwords.

when I use the URL httpp://localhost:1970/XXXService

XXService could not be connected from remote machines.

But when httpp://47.168.96.47:1970/XXXService

is used it could be connected from any machine remotely or locally.

I have found the solution over again stackoverflow. Here is the question/answer [link] Publishing a WS with Jax-WS Endpoint

I have neither use localhost nor real ip. Instead Ihave used 0.0.0.0. It works now, service could be published externally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM