try { URL wsdlDocumentLocation = new URL("http://localhost:8080/bookstore/BookManager?wsdl"); QName serviceName = new QName("http://businesslogic.lab07.aipi.cs.pub.ro/BookManager", "BookManager"); Service service = Service.create(wsdlDocumentLocation, serviceName); } catch (MalformedURLException malformedURLException) { System.out.println("An exception had occurred: " + malformedURLException.getMessage()); if (Constants.DEBUG) { malformedURLException.printStackTrace(); } }