View Javadoc

1   /**
2    * ListBoxSvcLocator.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
6    */
7   
8   package org.sirius.server.win32lib.controls.listbox;
9   
10  public class ListBoxSvcLocator extends org.apache.axis.client.Service implements
11          org.sirius.server.win32lib.controls.listbox.ListBoxSvc {
12  
13      // Use to get a proxy class for ListBoxSvcPort
14      private java.lang.String  ListBoxSvcPort_address        = "http://localhost:8990/win32lib/listboxsvc";
15  
16      // The WSDD service name defaults to the port name.
17      private java.lang.String  ListBoxSvcPortWSDDServiceName = "ListBoxSvcPort";
18  
19      private java.util.HashSet ports                         = null;
20  
21      public ListBoxSvcLocator() {
22      }
23  
24      public ListBoxSvcLocator(final java.lang.String wsdlLoc,
25              final javax.xml.namespace.QName sName)
26              throws javax.xml.rpc.ServiceException {
27          super(wsdlLoc, sName);
28      }
29  
30      public ListBoxSvcLocator(final org.apache.axis.EngineConfiguration config) {
31          super(config);
32      }
33  
34      @Override
35      public org.sirius.server.win32lib.controls.listbox.IListBoxContract getListBoxSvcPort()
36              throws javax.xml.rpc.ServiceException {
37          java.net.URL endpoint;
38          try {
39              endpoint = new java.net.URL(ListBoxSvcPort_address);
40          } catch (java.net.MalformedURLException e) {
41              throw new javax.xml.rpc.ServiceException(e);
42          }
43          return getListBoxSvcPort(endpoint);
44      }
45  
46      @Override
47      public org.sirius.server.win32lib.controls.listbox.IListBoxContract getListBoxSvcPort(
48              final java.net.URL portAddress)
49              throws javax.xml.rpc.ServiceException {
50          try {
51              org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub _stub = new org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub(
52                      portAddress, this);
53              _stub.setPortName(getListBoxSvcPortWSDDServiceName());
54              return _stub;
55          } catch (org.apache.axis.AxisFault e) {
56              return null;
57          }
58      }
59  
60      @Override
61      public java.lang.String getListBoxSvcPortAddress() {
62          return ListBoxSvcPort_address;
63      }
64  
65      public java.lang.String getListBoxSvcPortWSDDServiceName() {
66          return ListBoxSvcPortWSDDServiceName;
67      }
68  
69      /**
70       * For the given interface, get the stub implementation. If this service has
71       * no port for the given interface, then ServiceException is thrown.
72       */
73      @Override
74      public java.rmi.Remote getPort(final Class serviceEndpointInterface)
75              throws javax.xml.rpc.ServiceException {
76          try {
77              if (org.sirius.server.win32lib.controls.listbox.IListBoxContract.class
78                      .isAssignableFrom(serviceEndpointInterface)) {
79                  org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub _stub = new org.sirius.server.win32lib.controls.listbox.ListBoxSvcPortStub(
80                          new java.net.URL(ListBoxSvcPort_address), this);
81                  _stub.setPortName(getListBoxSvcPortWSDDServiceName());
82                  return _stub;
83              }
84          } catch (java.lang.Throwable t) {
85              throw new javax.xml.rpc.ServiceException(t);
86          }
87          throw new javax.xml.rpc.ServiceException(
88                  "There is no stub implementation for the interface:  "
89                          + (serviceEndpointInterface == null ? "null"
90                                  : serviceEndpointInterface.getName()));
91      }
92  
93      /**
94       * For the given interface, get the stub implementation. If this service has
95       * no port for the given interface, then ServiceException is thrown.
96       */
97      @Override
98      public java.rmi.Remote getPort(final javax.xml.namespace.QName portName,
99              final Class serviceEndpointInterface)
100             throws javax.xml.rpc.ServiceException {
101         if (portName == null) {
102             return getPort(serviceEndpointInterface);
103         }
104         java.lang.String inputPortName = portName.getLocalPart();
105         if ("ListBoxSvcPort".equals(inputPortName)) {
106             return getListBoxSvcPort();
107         } else {
108             java.rmi.Remote _stub = getPort(serviceEndpointInterface);
109             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
110             return _stub;
111         }
112     }
113 
114     @Override
115     public java.util.Iterator getPorts() {
116         if (ports == null) {
117             ports = new java.util.HashSet();
118             ports.add(new javax.xml.namespace.QName(
119                     "http://listbox.controls.win32lib.server.sirius.org/",
120                     "ListBoxSvcPort"));
121         }
122         return ports.iterator();
123     }
124 
125     @Override
126     public javax.xml.namespace.QName getServiceName() {
127         return new javax.xml.namespace.QName(
128                 "http://listbox.controls.win32lib.server.sirius.org/",
129                 "ListBoxSvc");
130     }
131 
132     /**
133      * Set the endpoint address for the specified port name.
134      */
135     public void setEndpointAddress(final java.lang.String portName,
136             final java.lang.String address)
137             throws javax.xml.rpc.ServiceException {
138 
139         if ("ListBoxSvcPort".equals(portName)) {
140             setListBoxSvcPortEndpointAddress(address);
141         } else { // Unknown Port Name
142             throw new javax.xml.rpc.ServiceException(
143                     " Cannot set Endpoint Address for Unknown Port" + portName);
144         }
145     }
146 
147     /**
148      * Set the endpoint address for the specified port name.
149      */
150     public void setEndpointAddress(final javax.xml.namespace.QName portName,
151             final java.lang.String address)
152             throws javax.xml.rpc.ServiceException {
153         setEndpointAddress(portName.getLocalPart(), address);
154     }
155 
156     public void setListBoxSvcPortEndpointAddress(final java.lang.String address) {
157         ListBoxSvcPort_address = address;
158     }
159 
160     public void setListBoxSvcPortWSDDServiceName(final java.lang.String name) {
161         ListBoxSvcPortWSDDServiceName = name;
162     }
163 
164 }