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.geronimo.cxf;
19:
20: import java.net.URL;
21:
22: import javax.xml.namespace.QName;
23:
24: import org.apache.cxf.service.factory.AbstractServiceConfiguration;
25: import org.apache.geronimo.jaxws.PortInfo;
26:
27: /**
28: * Used to overwrite serviceName and portName values of WebService annotation.
29: */
30: public class CXFServiceConfiguration extends
31: AbstractServiceConfiguration {
32:
33: private PortInfo portInfo;
34: private URL wsdlURL;
35:
36: public CXFServiceConfiguration(PortInfo portInfo, URL wsdlURL) {
37: this .portInfo = portInfo;
38: this .wsdlURL = wsdlURL;
39: }
40:
41: public String getServiceName() {
42: if (this .portInfo.getWsdlService() != null) {
43: return this .portInfo.getWsdlService().getLocalPart();
44: } else {
45: return null;
46: }
47: }
48:
49: public String getServiceNamespace() {
50: if (this .portInfo.getWsdlService() != null) {
51: return this .portInfo.getWsdlService().getNamespaceURI();
52: } else {
53: return null;
54: }
55: }
56:
57: public QName getEndpointName() {
58: return this .portInfo.getWsdlPort();
59: }
60:
61: public String getWsdlURL() {
62: return (this.wsdlURL == null) ? null : this.wsdlURL.toString();
63: }
64:
65: }
|