javax.xml.ws.Endpoint cannot publish multiple endpoints in a single network address

This will work:

       Endpoint.publish("http://localhost:9999/ws/order", new OrderPortImpl()); 
   

But this won’t:

       Endpoint.publish("http://localhost:9999/ws/order", new OrderPortImpl()); 
       Endpoint.publish("http://localhost:9999/ws/product", new ProductPortImpl());  
   

In the latter case, you will see java.net.BindException: Address already in use

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.