CuriousMind
CuriousMind

Reputation: 8903

soap web service Endpoint publish

I am implementing some soap based web-services, and I have some confusion on publishing the wsdl.

Piece of code:

    public class HelloWorldPublisher{  
          public static void main(String[] args) {  
             Endpoint.publish("http://localhost:9999/ws/hello", new HelloWorldImpl());  
         }  
    }

Now, when I ran this, it generated WSDL, and I could access it using link:

http://localhost:9999/ws/hello?wsdl

How is this possible? There is no server listening on port 9999 and still I was able to get the wsdl.

Any clarification would be great.

Upvotes: 1

Views: 1667

Answers (1)

Pulkit
Pulkit

Reputation: 4084

What you are using is RPC style of JAX-WS. Once you do Endpoint.publish java uses by default a light-weight HTTP server implementation that is included in java development kit. It uses an embedded container which is something running inside the same JVM. Try to open source code of Endpoint.publish

Upvotes: 1

Related Questions