X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=webservices%2Fcompbio%2Fws%2Fserver%2FSimpleWSPublisher.java;h=3e3a34bd673d5d1035a8217bae39299d14fb9e6a;hb=ba2d4e920e433bd080f448248e7dacade69a27a0;hp=323031774ce7465fa2fb7006164f64619ed6c8d2;hpb=9f81a03cf11728726a45917773e3c42195b471c2;p=jabaws.git diff --git a/webservices/compbio/ws/server/SimpleWSPublisher.java b/webservices/compbio/ws/server/SimpleWSPublisher.java index 3230317..3e3a34b 100644 --- a/webservices/compbio/ws/server/SimpleWSPublisher.java +++ b/webservices/compbio/ws/server/SimpleWSPublisher.java @@ -28,46 +28,47 @@ import javax.xml.ws.Endpoint; * @author pvtroshin * @date October 2009 */ +@Deprecated public class SimpleWSPublisher { - public SimpleWSPublisher(Object exec, String context) { + public SimpleWSPublisher(Object exec, String context) { - } + } - public static void main(String[] args) { - if (args.length != 2) { - System.out.println("Usage: "); - System.out.println("SimpleWSPublisher context class"); - System.out - .println("where context is a context name, the name after the address by " - + "which web service can be called e.g. Clustal " - + " and class is a web service implementation class"); + public static void main(String[] args) { + if (args.length != 2) { + System.out.println("Usage: "); + System.out.println("SimpleWSPublisher context class"); + System.out + .println("where context is a context name, the name after the address by " + + "which web service can be called e.g. Clustal " + + " and class is a web service implementation class"); + } + String context = args[0]; + String clazzName = args[1]; + try { + Class clazz = Class.forName(clazzName); + if (!clazz.isAnnotationPresent(WebService.class)) { + System.out.println("Can only start web services. " + + "Please check whether the class provided is " + + "annotated with Webservice annotation"); + System.exit(1); + } + Endpoint.publish("http://127.0.0.1:7979/" + context, + clazz.newInstance()); + } catch (InstantiationException e) { + e.printStackTrace(); + System.exit(1); + } catch (IllegalAccessException e) { + e.printStackTrace(); + System.exit(1); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + System.exit(1); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + System.exit(1); + } } - String context = args[0]; - String clazzName = args[1]; - try { - Class clazz = Class.forName(clazzName); - if (!clazz.isAnnotationPresent(WebService.class)) { - System.out.println("Can only start web services. " - + "Please check whether the class provided is " - + "annotated with Webservice annotation"); - System.exit(1); - } - Endpoint.publish("http://127.0.0.1:7979/" + context, clazz - .newInstance()); - } catch (InstantiationException e) { - e.printStackTrace(); - System.exit(1); - } catch (IllegalAccessException e) { - e.printStackTrace(); - System.exit(1); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - System.exit(1); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - System.exit(1); - } - } }