import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;

public class Client {
    public static void main(String[] args) throws Exception {

        URL url = new URL("http://localhost:8080/YourProjectName/NumberService?wsdl");

        QName qname = new QName("http://prac10.mycompany.com/", "NumberServiceService");

        Service service = Service.create(url, qname);

        NumberService obj = service.getPort(NumberService.class);

        int num = 5;

        System.out.println("Square: " + obj.square(num));
        System.out.println("Cube: " + obj.cube(num));
    }
}
