01: package org.objectweb.celtix.systest.schema_validation;
02:
03: import java.net.URL;
04:
05: import javax.xml.ws.Endpoint;
06:
07: import org.objectweb.celtix.systest.common.TestServerBase;
08:
09: public class ValidationServer extends TestServerBase {
10:
11: private String oldConfig;
12:
13: public ValidationServer() {
14: oldConfig = System.getProperty("celtix.config.file");
15: URL url = getClass().getResource("celtix-config.xml");
16: if (url != null) {
17: System.setProperty("celtix.config.file", url.toString());
18: }
19: }
20:
21: protected void run() {
22: Object implementor = new SchemaValidationImpl();
23: String address = "http://localhost:9900/SoapContext/SoapPort";
24: Endpoint.publish(address, implementor);
25: }
26:
27: public boolean stopInProcess() throws Exception {
28: System.setProperty("celtix.config.file", oldConfig);
29: return super .stopInProcess();
30: }
31:
32: public static void main(String[] args) {
33: try {
34: ValidationServer s = new ValidationServer();
35: s.start();
36: } catch (Exception ex) {
37: ex.printStackTrace();
38: System.exit(-1);
39: } finally {
40: System.out.println("done!");
41: }
42: }
43: }
|