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 WebServiceClientAnnot implements
025: javax.xml.ws.WebServiceClient {
026:
027: private String name;
028: private String targetNamespace;
029: private String wsdlLocation;
030:
031: /** A WebServiceClientAnnot cannot be instantiated. */
032: private WebServiceClientAnnot() {
033:
034: }
035:
036: private WebServiceClientAnnot(String name, String targetNamespace,
037: String wsdlLocation) {
038: this .name = name;
039: this .targetNamespace = targetNamespace;
040: this .wsdlLocation = wsdlLocation;
041: }
042:
043: public static WebServiceClientAnnot createWebServiceClientAnnotImpl() {
044: return new WebServiceClientAnnot();
045: }
046:
047: public static WebServiceClientAnnot createWebServiceClientAnnotImpl(
048: String name, String targetNamespace, String wsdlLocation) {
049: return new WebServiceClientAnnot(name, targetNamespace,
050: wsdlLocation);
051: }
052:
053: /** @return Returns the name. */
054: public String name() {
055: return name;
056: }
057:
058: /** @return Returns the targetNamespace. */
059: public String targetNamespace() {
060: return targetNamespace;
061: }
062:
063: /** @return Returns the wsdlLocation. */
064: public String wsdlLocation() {
065: return wsdlLocation;
066: }
067:
068: /** @param name The name to set. */
069: public void setName(String name) {
070: this .name = name;
071: }
072:
073: /** @param targetNamespace The targetNamespace to set. */
074: public void setTargetNamespace(String targetNamespace) {
075: this .targetNamespace = targetNamespace;
076: }
077:
078: /** @param wsdlLocation The wsdlLocation to set. */
079: public void setWsdlLocation(String wsdlLocation) {
080: this .wsdlLocation = wsdlLocation;
081: }
082:
083: //hmm, should we really do this
084: public Class<Annotation> annotationType() {
085: return Annotation.class;
086: }
087:
088: /**
089: * Convenience method for unit testing. We will print all of the
090: * data members here.
091: */
092: public String toString() {
093: StringBuffer sb = new StringBuffer();
094: String newLine = "\n";
095: sb.append(newLine);
096: sb.append("@WebServiceClient.name= " + name);
097: sb.append(newLine);
098: sb.append("@WebServiceClient.targetNamespace= "
099: + targetNamespace);
100: sb.append(newLine);
101: sb.append("@WebServiceClient.wsdlLocation= " + wsdlLocation);
102: sb.append(newLine);
103: return sb.toString();
104: }
105:
106: }
|