KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > systest > type_test > xml > XMLServerImpl


1 package org.objectweb.celtix.systest.type_test.xml;
2
3 import javax.jws.WebService;
4 import javax.xml.ws.Endpoint;
5
6 import org.objectweb.celtix.systest.common.TestServerBase;
7 import org.objectweb.celtix.systest.type_test.TypeTestImpl;
8 import org.objectweb.type_test.doc.TypeTestPortType;
9
10 public class XMLServerImpl extends TestServerBase {
11
12     public void run() {
13
14         Object JavaDoc implementor = new XMLTypeTestImpl();
15         String JavaDoc address = "http://localhost:9008/XMLService/XMLPort/";
16         Endpoint.publish(address, implementor);
17     }
18
19     public static void main(String JavaDoc args[]) {
20         try {
21             XMLServerImpl s = new XMLServerImpl();
22             s.start();
23         } catch (Exception JavaDoc ex) {
24             ex.printStackTrace();
25             System.exit(-1);
26         } finally {
27             System.out.println("done!");
28         }
29     }
30     
31     @WebService(serviceName = "XMLService",
32                 portName = "XMLPort",
33                 endpointInterface = "org.objectweb.type_test.doc.TypeTestPortType",
34                 targetNamespace = "http://objectweb.org/type_test/doc")
35     @javax.xml.ws.BindingType(value = "http://celtix.objectweb.org/bindings/xmlformat")
36     class XMLTypeTestImpl extends TypeTestImpl implements TypeTestPortType {
37     }
38 }
39
Popular Tags