Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to stop this javax.xml.ws.Endpoint service

i have like this below code in order to start to publish wsdl

    package my.mimos.stp.MelodyWS.webservice;

import javax.xml.ws.Endpoint;



public class Server {

    public static void main(String[] args) {

        Endpoint.publish("http://localhost:8081/Melody/MelodyService", new MelodyWS());

        System.out.println("Melody service is ready");

    }

}

what should i do if i want to stop that service? i have a changes in MelodyWS and would like to republish it.

like image 272
Hendra Syailendra Avatar asked May 09 '13 03:05

Hendra Syailendra


1 Answers

You have to keep a reference on the Endpoint object and call stop() method on it:

Endpoint ep = Endpoint.create(new MelodyWS());
ep.publish("http://localhost:8081/Melody/MelodyService");
..
ep.stop();
like image 173
Miljen Mikic Avatar answered Oct 18 '22 11:10

Miljen Mikic