1 16 package org.apache.wsdl.impl; 17 18 import org.apache.wsdl.WSDLEndpoint; 19 import org.apache.wsdl.WSDLInterface; 20 import org.apache.wsdl.WSDLService; 21 22 import javax.xml.namespace.QName ; 23 import java.util.HashMap ; 24 25 28 public class WSDLServiceImpl extends ComponentImpl implements WSDLService { 29 33 private QName name; 34 35 38 private WSDLInterface serviceInterface; 39 40 43 private HashMap endpoints = new HashMap (); 44 45 50 public HashMap getEndpoints() { 51 return endpoints; 52 } 53 54 59 public void setEndpoints(HashMap endpoints) { 60 this.endpoints = endpoints; 61 } 62 63 68 public void setEndpoint(WSDLEndpoint endpoint) { 69 this.endpoints.put(endpoint.getName(), endpoint); 70 } 71 72 78 public WSDLEndpoint getEndpoint(QName qName) { 79 return (WSDLEndpoint) this.endpoints.get(qName); 80 81 } 82 83 88 public QName getName() { 89 return name; 90 } 91 92 97 public void setName(QName name) { 98 this.name = name; 99 } 100 101 107 public String getNamespace() { 108 if (null == this.name) { 109 throw new WSDLProcessingException( 110 "Target Namespace not set and the Service Name is null"); 111 } 112 return this.name.getNamespaceURI(); 113 } 114 115 120 public WSDLInterface getServiceInterface() { 121 return serviceInterface; 122 } 123 124 129 public void setServiceInterface(WSDLInterface serviceInterface) { 130 this.serviceInterface = serviceInterface; 131 } 132 } 133 | Popular Tags |