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.jaxws;
19:
20: import java.net.URL;
21:
22: import javax.jws.WebService;
23: import javax.xml.ws.Endpoint;
24:
25: import org.apache.cxf.jaxws.EndpointImpl;
26: import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
27: import org.apache.hello_world_soap_http.DocLitBareGreeterImpl;
28: import org.apache.hello_world_soap_http.GreeterImpl;
29:
30: public class Server extends AbstractBusTestServerBase {
31:
32: protected void run() {
33: URL url = getClass().getResource("fault-stack-trace.xml");
34: if (url != null) {
35: System.setProperty("cxf.config.file.url", url.toString());
36: }
37: Object implementor;
38: String address;
39:
40: implementor = new GreeterImplMultiPort();
41: address = "http://localhost:9020/MultiPort/GreeterPort";
42: Endpoint.publish(address, implementor);
43:
44: implementor = new DocLitBareGreeterMultiPort();
45: address = "http://localhost:9021/MultiPort/DocBarePort";
46: Endpoint.publish(address, implementor);
47:
48: implementor = new GreeterImpl();
49: address = "http://localhost:9000/SoapContext/SoapPort";
50: Endpoint.publish(address, implementor);
51:
52: //publish port with soap12 binding
53: address = "http://localhost:9009/SoapContext/SoapPort";
54: EndpointImpl e = (EndpointImpl) Endpoint.create(
55: javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING,
56: implementor);
57: e.publish(address);
58:
59: implementor = new DocLitBareGreeterImpl();
60: address = "http://localhost:7600/SoapContext/SoapPort";
61: Endpoint.publish(address, implementor);
62:
63: implementor = new GreeterImplBogus();
64: address = "http://localhost:9015/SoapContext/SoapPort";
65: Endpoint.publish(address, implementor);
66:
67: }
68:
69: public static void main(String[] args) {
70: try {
71: Server s = new Server();
72: s.start();
73: } catch (Exception ex) {
74: ex.printStackTrace();
75: System.exit(-1);
76: } finally {
77: System.out.println("done!");
78: }
79: }
80:
81: @WebService(serviceName="SOAPServiceBogusAddressTest",portName="SoapPort",endpointInterface="org.apache.hello_world_soap_http.Greeter",targetNamespace="http://apache.org/hello_world_soap_http",wsdlLocation="testutils/hello_world.wsdl")
82: public class GreeterImplBogus extends GreeterImpl {
83:
84: }
85:
86: @WebService(serviceName="SOAPServiceMultiPortTypeTest",portName="GreeterPort",endpointInterface="org.apache.hello_world_soap_http.Greeter",targetNamespace="http://apache.org/hello_world_soap_http",wsdlLocation="testutils/hello_world.wsdl")
87: public class GreeterImplMultiPort extends GreeterImpl {
88:
89: }
90:
91: @WebService(serviceName="SOAPServiceMultiPortTypeTest",portName="DocLitBarePort",endpointInterface="org.apache.hello_world_soap_http.DocLitBare",targetNamespace="http://apache.org/hello_world_soap_http",wsdlLocation="testutils/hello_world.wsdl")
92: public class DocLitBareGreeterMultiPort extends
93: DocLitBareGreeterImpl {
94:
95: }
96: }
|