01: package org.objectweb.celtix.systest.js;
02:
03: import java.io.File;
04:
05: import org.objectweb.celtix.js.rhino.ProviderFactory;
06:
07: import org.objectweb.celtix.systest.common.TestServerBase;
08:
09: public class Server extends TestServerBase {
10:
11: protected void run() {
12: try {
13: ProviderFactory pf = new ProviderFactory();
14: String f = getClass().getResource(
15: "resources/hello_world.js").getFile();
16: pf
17: .createAndPublish(
18: new File(f),
19: "http://localhost:9000/SoapContext/SoapPort",
20: false);
21: f = getClass().getResource("resources/hello_world.jsx")
22: .getFile();
23: pf.createAndPublish(new File(f), "http://localhost:9100",
24: false);
25: } catch (Exception ex) {
26: ex.printStackTrace();
27: }
28: }
29:
30: public static void main(String[] args) {
31: try {
32: Server s = new Server();
33: s.start();
34: } catch (Exception ex) {
35: ex.printStackTrace();
36: System.exit(-1);
37: } finally {
38: System.out.println("done!");
39: }
40: }
41: }
|