The first time MyService
gets the URL from the WSDL document file (a local file). Because loads the file, it takes longer. This should be done only at the beginning of the application.
MyService service = new MyService(url, new QName(namespaceURI, localName));
Then, your customize the endpoint URL.
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, WSDL_URL);
If the URL is the same, maybe you can avoid this step. This is very useful when the URL is different, like when you change from the development environment to the production environment.