+ }\r
+ String context = args[0];\r
+ String clazzName = args[1];\r
+ try {\r
+ Class<?> clazz = Class.forName(clazzName);\r
+ if (!clazz.isAnnotationPresent(WebService.class)) {\r
+ System.out.println("Can only start web services. "\r
+ + "Please check whether the class provided is "\r
+ + "annotated with Webservice annotation");\r
+ System.exit(1);\r
+ }\r
+ Endpoint.publish("http://127.0.0.1:7979/" + context,\r
+ clazz.newInstance());\r
+ } catch (InstantiationException e) {\r
+ e.printStackTrace();\r
+ System.exit(1);\r
+ } catch (IllegalAccessException e) {\r
+ e.printStackTrace();\r
+ System.exit(1);\r
+ } catch (ClassNotFoundException e) {\r
+ e.printStackTrace();\r
+ System.exit(1);\r
+ } catch (IllegalArgumentException e) {\r
+ e.printStackTrace();\r
+ System.exit(1);\r
+ }\r