View Javadoc

1   /***
2    * Authentication_ServiceLocator.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
6    */
7   
8   package no.feide.moria.webservices.v2_1;
9   
10  public class Authentication_ServiceLocator extends org.apache.axis.client.Service implements no.feide.moria.webservices.v2_1.Authentication_Service {
11  
12      public Authentication_ServiceLocator() {
13      }
14  
15  
16      public Authentication_ServiceLocator(org.apache.axis.EngineConfiguration config) {
17          super(config);
18      }
19  
20      // Use to get a proxy class for Authentication
21      private java.lang.String Authentication_address = "http://localhost:8080/moria2/v2_1/Authentication";
22  
23      public java.lang.String getAuthenticationAddress() {
24          return Authentication_address;
25      }
26  
27      // The WSDD service name defaults to the port name.
28      private java.lang.String AuthenticationWSDDServiceName = "Authentication";
29  
30      public java.lang.String getAuthenticationWSDDServiceName() {
31          return AuthenticationWSDDServiceName;
32      }
33  
34      public void setAuthenticationWSDDServiceName(java.lang.String name) {
35          AuthenticationWSDDServiceName = name;
36      }
37  
38      public no.feide.moria.webservices.v2_1.Authentication_PortType getAuthentication() throws javax.xml.rpc.ServiceException {
39         java.net.URL endpoint;
40          try {
41              endpoint = new java.net.URL(Authentication_address);
42          }
43          catch (java.net.MalformedURLException e) {
44              throw new javax.xml.rpc.ServiceException(e);
45          }
46          return getAuthentication(endpoint);
47      }
48  
49      public no.feide.moria.webservices.v2_1.Authentication_PortType getAuthentication(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
50          try {
51              no.feide.moria.webservices.v2_1.AuthenticationSoapBindingStub _stub = new no.feide.moria.webservices.v2_1.AuthenticationSoapBindingStub(portAddress, this);
52              _stub.setPortName(getAuthenticationWSDDServiceName());
53              return _stub;
54          }
55          catch (org.apache.axis.AxisFault e) {
56              return null;
57          }
58      }
59  
60      public void setAuthenticationEndpointAddress(java.lang.String address) {
61          Authentication_address = address;
62      }
63  
64      /***
65       * For the given interface, get the stub implementation.
66       * If this service has no port for the given interface,
67       * then ServiceException is thrown.
68       */
69      public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
70          try {
71              if (no.feide.moria.webservices.v2_1.Authentication_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
72                  no.feide.moria.webservices.v2_1.AuthenticationSoapBindingStub _stub = new no.feide.moria.webservices.v2_1.AuthenticationSoapBindingStub(new java.net.URL(Authentication_address), this);
73                  _stub.setPortName(getAuthenticationWSDDServiceName());
74                  return _stub;
75              }
76          }
77          catch (java.lang.Throwable t) {
78              throw new javax.xml.rpc.ServiceException(t);
79          }
80          throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
81      }
82  
83      /***
84       * For the given interface, get the stub implementation.
85       * If this service has no port for the given interface,
86       * then ServiceException is thrown.
87       */
88      public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
89          if (portName == null) {
90              return getPort(serviceEndpointInterface);
91          }
92          java.lang.String inputPortName = portName.getLocalPart();
93          if ("Authentication".equals(inputPortName)) {
94              return getAuthentication();
95          }
96          else  {
97              java.rmi.Remote _stub = getPort(serviceEndpointInterface);
98              ((org.apache.axis.client.Stub) _stub).setPortName(portName);
99              return _stub;
100         }
101     }
102 
103     public javax.xml.namespace.QName getServiceName() {
104         return new javax.xml.namespace.QName("http://v2_1.webservices.moria.feide.no", "Authentication");
105     }
106 
107     private java.util.HashSet ports = null;
108 
109     public java.util.Iterator getPorts() {
110         if (ports == null) {
111             ports = new java.util.HashSet();
112             ports.add(new javax.xml.namespace.QName("http://v2_1.webservices.moria.feide.no", "Authentication"));
113         }
114         return ports.iterator();
115     }
116 
117     /***
118     * Set the endpoint address for the specified port name.
119     */
120     public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
121         if ("Authentication".equals(portName)) {
122             setAuthenticationEndpointAddress(address);
123         }
124         else { // Unknown Port Name
125             throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
126         }
127     }
128 
129     /***
130     * Set the endpoint address for the specified port name.
131     */
132     public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
133         setEndpointAddress(portName.getLocalPart(), address);
134     }
135 
136 }