001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019:
020: package org.apache.axis2.jaxws.description.builder;
021:
022: import java.lang.annotation.Annotation;
023:
024: public class WebServiceProviderAnnot implements
025: javax.xml.ws.WebServiceProvider {
026:
027: private String wsdlLocation = "";
028: private String serviceName = "";
029: private String portName = "";
030: private String targetNamespace = "";
031:
032: /** A WebServiceProviderAnnot cannot be instantiated. */
033: private WebServiceProviderAnnot() {
034:
035: }
036:
037: private WebServiceProviderAnnot(String wsdlLocation,
038: String serviceName, String portName, String targetNamespace) {
039: this .targetNamespace = targetNamespace;
040: this .serviceName = serviceName;
041: this .wsdlLocation = wsdlLocation;
042: this .portName = portName;
043: }
044:
045: public static WebServiceProviderAnnot createWebServiceAnnotImpl() {
046: return new WebServiceProviderAnnot();
047: }
048:
049: public static WebServiceProviderAnnot createWebServiceAnnotImpl(
050: String name, String targetNamespace, String serviceName,
051: String wsdlLocation, String endpointInterface,
052: String portName) {
053: return new WebServiceProviderAnnot(wsdlLocation, serviceName,
054: portName, targetNamespace);
055: }
056:
057: /** @return Returns the portName. */
058: public String portName() {
059: return portName;
060: }
061:
062: /** @return Returns the serviceName. */
063: public String serviceName() {
064: return serviceName;
065: }
066:
067: /** @return Returns the targetNamespace. */
068: public String targetNamespace() {
069: return targetNamespace;
070: }
071:
072: /** @return Returns the wsdlLocation. */
073: public String wsdlLocation() {
074: return wsdlLocation;
075: }
076:
077: /** @param portName The portName to set. */
078: public void setPortName(String portName) {
079: this .portName = portName;
080: }
081:
082: /** @param serviceName The serviceName to set. */
083: public void setServiceName(String serviceName) {
084: this .serviceName = serviceName;
085: }
086:
087: /** @param targetNamespace The targetNamespace to set. */
088: public void setTargetNamespace(String targetNamespace) {
089: this .targetNamespace = targetNamespace;
090: }
091:
092: /** @param wsdlLocation The wsdlLocation to set. */
093: public void setWsdlLocation(String wsdlLocation) {
094: this .wsdlLocation = wsdlLocation;
095: }
096:
097: public Class<Annotation> annotationType() {
098: return Annotation.class;
099: }
100:
101: /**
102: * Convenience method for unit testing. We will print all of the
103: * data members here.
104: */
105: public String toString() {
106: StringBuffer sb = new StringBuffer();
107: String newLine = "\n";
108: sb.append(newLine);
109: sb.append("@WebServiceProvider.serviceName= " + serviceName);
110: sb.append(newLine);
111: sb.append("@WebServiceProvider.targetNamespace= "
112: + targetNamespace);
113: sb.append(newLine);
114: sb.append("@WebServiceProvider.wsdlLocation= " + wsdlLocation);
115: sb.append(newLine);
116: sb.append("@WebServiceProvider.portName= " + portName);
117: sb.append(newLine);
118: return sb.toString();
119: }
120: }
|