01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.systest.http;
19:
20: import java.net.URL;
21:
22: import javax.xml.ws.Endpoint;
23:
24: import org.apache.cxf.Bus;
25: import org.apache.cxf.bus.spring.SpringBusFactory;
26: import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
27:
28: public class SessionServer extends AbstractBusTestServerBase {
29:
30: @Override
31: protected void run() {
32: Object implementor;
33: String address;
34: URL configure = SessionServer.class
35: .getResource("resources/SessionServer.xml");
36: System.out.println("the configure is " + configure);
37: Bus bus = new SpringBusFactory().createBus(configure, true);
38: SpringBusFactory.setDefaultBus(bus);
39: implementor = new GreeterSessionImpl();
40: address = "http://localhost:9020/SoapContext/GreeterPort";
41: Endpoint.publish(address, implementor);
42:
43: }
44:
45: public static void main(String[] args) {
46: try {
47: System.out.println("!!!!start");
48: SessionServer s = new SessionServer();
49: s.start();
50: } catch (Exception ex) {
51: ex.printStackTrace();
52: System.exit(-1);
53: } finally {
54: System.out.println("done!");
55: }
56: }
57:
58: }
|