1 package org.objectweb.celtix.systest.basicDOCBare; 2 3 import java.util.HashMap ; 4 import java.util.Map ; 5 6 import javax.xml.namespace.QName ; 7 import javax.xml.ws.Endpoint; 8 9 import org.objectweb.celtix.systest.common.TestServerBase; 10 11 public class Server extends TestServerBase { 12 13 14 protected void run() { 15 Object implementor = new PutLastTradedPriceImpl(); 16 String address = "http://localhost:9003/SOAPDocLitBareService/SoapPort"; 17 Endpoint ep = Endpoint.create(implementor); 18 Map <String , Object > props = new HashMap <String , Object >(2); 19 props.put(Endpoint.WSDL_SERVICE, new QName ("http://objectweb.org/hello_world_doc_lit_bare", 20 "SOAPService")); 21 props.put(Endpoint.WSDL_PORT, new QName ("http://objectweb.org/hello_world_doc_lit_bare", "SoapPort")); 22 ep.setProperties(props); 23 ep.publish(address); 24 } 25 26 27 public static void main(String [] args) { 28 try { 29 Server s = new Server(); 30 s.start(); 31 } catch (Exception ex) { 32 ex.printStackTrace(); 33 System.exit(-1); 34 } finally { 35 System.out.println("done!"); 36 } 37 } 38 } | Popular Tags |