View Javadoc

1   /**
2    * Copyright (C) 2008 Atlassian
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  /**
18   * JiraSoapServiceServiceLocator.java
19   *
20   * This file was auto-generated from WSDL
21   * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
22   */
23  
24  package com.atlassian.theplugin.jira.api.soap.axis;
25  
26  public class JiraSoapServiceServiceLocator extends org.apache.axis.client.Service implements com.atlassian.theplugin.jira.api.soap.axis.JiraSoapServiceService {
27  
28      public JiraSoapServiceServiceLocator() {
29      }
30  
31  
32      public JiraSoapServiceServiceLocator(org.apache.axis.EngineConfiguration config) {
33          super(config);
34      }
35  
36      public JiraSoapServiceServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
37          super(wsdlLoc, sName);
38      }
39  
40      // Use to get a proxy class for JirasoapserviceV2
41      private java.lang.String JirasoapserviceV2_address = "http://jira.atlassian.com/rpc/soap/jirasoapservice-v2";
42  
43      public java.lang.String getJirasoapserviceV2Address() {
44          return JirasoapserviceV2_address;
45      }
46  
47      // The WSDD service name defaults to the port name.
48      private java.lang.String JirasoapserviceV2WSDDServiceName = "jirasoapservice-v2";
49  
50      public java.lang.String getJirasoapserviceV2WSDDServiceName() {
51          return JirasoapserviceV2WSDDServiceName;
52      }
53  
54      public void setJirasoapserviceV2WSDDServiceName(java.lang.String name) {
55          JirasoapserviceV2WSDDServiceName = name;
56      }
57  
58      public com.atlassian.theplugin.jira.api.soap.axis.JiraSoapService getJirasoapserviceV2() throws javax.xml.rpc.ServiceException {
59         java.net.URL endpoint;
60          try {
61              endpoint = new java.net.URL(JirasoapserviceV2_address);
62          }
63          catch (java.net.MalformedURLException e) {
64              throw new javax.xml.rpc.ServiceException(e);
65          }
66          return getJirasoapserviceV2(endpoint);
67      }
68  
69      public com.atlassian.theplugin.jira.api.soap.axis.JiraSoapService getJirasoapserviceV2(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
70          try {
71              com.atlassian.theplugin.jira.api.soap.axis.JirasoapserviceV2SoapBindingStub _stub = new com.atlassian.theplugin.jira.api.soap.axis.JirasoapserviceV2SoapBindingStub(portAddress, this);
72              _stub.setPortName(getJirasoapserviceV2WSDDServiceName());
73              return _stub;
74          }
75          catch (org.apache.axis.AxisFault e) {
76              return null;
77          }
78      }
79  
80      public void setJirasoapserviceV2EndpointAddress(java.lang.String address) {
81          JirasoapserviceV2_address = address;
82      }
83  
84      /**
85       * For the given interface, get the stub implementation.
86       * If this service has no port for the given interface,
87       * then ServiceException is thrown.
88       */
89      public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
90          try {
91              if (com.atlassian.theplugin.jira.api.soap.axis.JiraSoapService.class.isAssignableFrom(serviceEndpointInterface)) {
92                  com.atlassian.theplugin.jira.api.soap.axis.JirasoapserviceV2SoapBindingStub _stub = new com.atlassian.theplugin.jira.api.soap.axis.JirasoapserviceV2SoapBindingStub(new java.net.URL(JirasoapserviceV2_address), this);
93                  _stub.setPortName(getJirasoapserviceV2WSDDServiceName());
94                  return _stub;
95              }
96          }
97          catch (java.lang.Throwable t) {
98              throw new javax.xml.rpc.ServiceException(t);
99          }
100         throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
101     }
102 
103     /**
104      * For the given interface, get the stub implementation.
105      * If this service has no port for the given interface,
106      * then ServiceException is thrown.
107      */
108     public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
109         if (portName == null) {
110             return getPort(serviceEndpointInterface);
111         }
112         java.lang.String inputPortName = portName.getLocalPart();
113         if ("jirasoapservice-v2".equals(inputPortName)) {
114             return getJirasoapserviceV2();
115         }
116         else  {
117             java.rmi.Remote _stub = getPort(serviceEndpointInterface);
118             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
119             return _stub;
120         }
121     }
122 
123     public javax.xml.namespace.QName getServiceName() {
124         return new javax.xml.namespace.QName("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "JiraSoapServiceService");
125     }
126 
127     private java.util.HashSet ports = null;
128 
129     public java.util.Iterator getPorts() {
130         if (ports == null) {
131             ports = new java.util.HashSet();
132             ports.add(new javax.xml.namespace.QName("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "jirasoapservice-v2"));
133         }
134         return ports.iterator();
135     }
136 
137     /**
138     * Set the endpoint address for the specified port name.
139     */
140     public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
141         
142 if ("JirasoapserviceV2".equals(portName)) {
143             setJirasoapserviceV2EndpointAddress(address);
144         }
145         else 
146 { // Unknown Port Name
147             throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
148         }
149     }
150 
151     /**
152     * Set the endpoint address for the specified port name.
153     */
154     public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
155         setEndpointAddress(portName.getLocalPart(), address);
156     }
157 
158 }