You can initialize an endpoint either by calling its constructor or by looking it up in a naming service. For information about creating administered objects for endpoints, see Using SOAP Administered Objects.
The following code uses a constructor to create a URLEndpoint:
myEndpoint = new URLEndpoint("http://somehost/myServlet");