KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > example > webservice > authentication > AuthenticationServiceLocator


1 /**
2  * AuthenticationServiceLocator.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.example.webservice.authentication;
9
10 public class AuthenticationServiceLocator extends org.apache.axis.client.Service implements org.alfresco.example.webservice.authentication.AuthenticationService {
11
12     public AuthenticationServiceLocator() {
13     }
14
15
16     public AuthenticationServiceLocator(org.apache.axis.EngineConfiguration config) {
17         super(config);
18     }
19
20     public AuthenticationServiceLocator(java.lang.String JavaDoc wsdlLoc, javax.xml.namespace.QName JavaDoc sName) throws javax.xml.rpc.ServiceException JavaDoc {
21         super(wsdlLoc, sName);
22     }
23
24     // Use to get a proxy class for AuthenticationService
25
private java.lang.String JavaDoc AuthenticationService_address = "http://localhost:8080/alfresco/api/AuthenticationService";
26
27     public java.lang.String JavaDoc getAuthenticationServiceAddress() {
28         return AuthenticationService_address;
29     }
30
31     // The WSDD service name defaults to the port name.
32
private java.lang.String JavaDoc AuthenticationServiceWSDDServiceName = "AuthenticationService";
33
34     public java.lang.String JavaDoc getAuthenticationServiceWSDDServiceName() {
35         return AuthenticationServiceWSDDServiceName;
36     }
37
38     public void setAuthenticationServiceWSDDServiceName(java.lang.String JavaDoc name) {
39         AuthenticationServiceWSDDServiceName = name;
40     }
41
42     public org.alfresco.example.webservice.authentication.AuthenticationServiceSoapPort getAuthenticationService() throws javax.xml.rpc.ServiceException JavaDoc {
43        java.net.URL JavaDoc endpoint;
44         try {
45             endpoint = new java.net.URL JavaDoc(AuthenticationService_address);
46         }
47         catch (java.net.MalformedURLException JavaDoc e) {
48             throw new javax.xml.rpc.ServiceException JavaDoc(e);
49         }
50         return getAuthenticationService(endpoint);
51     }
52
53     public org.alfresco.example.webservice.authentication.AuthenticationServiceSoapPort getAuthenticationService(java.net.URL JavaDoc portAddress) throws javax.xml.rpc.ServiceException JavaDoc {
54         try {
55             org.alfresco.example.webservice.authentication.AuthenticationServiceSoapBindingStub _stub = new org.alfresco.example.webservice.authentication.AuthenticationServiceSoapBindingStub(portAddress, this);
56             _stub.setPortName(getAuthenticationServiceWSDDServiceName());
57             return _stub;
58         }
59         catch (org.apache.axis.AxisFault e) {
60             return null;
61         }
62     }
63
64     public void setAuthenticationServiceEndpointAddress(java.lang.String JavaDoc address) {
65         AuthenticationService_address = address;
66     }
67
68     /**
69      * For the given interface, get the stub implementation.
70      * If this service has no port for the given interface,
71      * then ServiceException is thrown.
72      */

73     public java.rmi.Remote JavaDoc getPort(Class JavaDoc serviceEndpointInterface) throws javax.xml.rpc.ServiceException JavaDoc {
74         try {
75             if (org.alfresco.example.webservice.authentication.AuthenticationServiceSoapPort.class.isAssignableFrom(serviceEndpointInterface)) {
76                 org.alfresco.example.webservice.authentication.AuthenticationServiceSoapBindingStub _stub = new org.alfresco.example.webservice.authentication.AuthenticationServiceSoapBindingStub(new java.net.URL JavaDoc(AuthenticationService_address), this);
77                 _stub.setPortName(getAuthenticationServiceWSDDServiceName());
78                 return _stub;
79             }
80         }
81         catch (java.lang.Throwable JavaDoc t) {
82             throw new javax.xml.rpc.ServiceException JavaDoc(t);
83         }
84         throw new javax.xml.rpc.ServiceException JavaDoc("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
85     }
86
87     /**
88      * For the given interface, get the stub implementation.
89      * If this service has no port for the given interface,
90      * then ServiceException is thrown.
91      */

92     public java.rmi.Remote JavaDoc getPort(javax.xml.namespace.QName JavaDoc portName, Class JavaDoc serviceEndpointInterface) throws javax.xml.rpc.ServiceException JavaDoc {
93         if (portName == null) {
94             return getPort(serviceEndpointInterface);
95         }
96         java.lang.String JavaDoc inputPortName = portName.getLocalPart();
97         if ("AuthenticationService".equals(inputPortName)) {
98             return getAuthenticationService();
99         }
100         else {
101             java.rmi.Remote JavaDoc _stub = getPort(serviceEndpointInterface);
102             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
103             return _stub;
104         }
105     }
106
107     public javax.xml.namespace.QName JavaDoc getServiceName() {
108         return new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/authentication/1.0", "AuthenticationService");
109     }
110
111     private java.util.HashSet JavaDoc ports = null;
112
113     public java.util.Iterator JavaDoc getPorts() {
114         if (ports == null) {
115             ports = new java.util.HashSet JavaDoc();
116             ports.add(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/authentication/1.0", "AuthenticationService"));
117         }
118         return ports.iterator();
119     }
120
121     /**
122     * Set the endpoint address for the specified port name.
123     */

124     public void setEndpointAddress(java.lang.String JavaDoc portName, java.lang.String JavaDoc address) throws javax.xml.rpc.ServiceException JavaDoc {
125         
126 if ("AuthenticationService".equals(portName)) {
127             setAuthenticationServiceEndpointAddress(address);
128         }
129         else
130 { // Unknown Port Name
131
throw new javax.xml.rpc.ServiceException JavaDoc(" Cannot set Endpoint Address for Unknown Port" + portName);
132         }
133     }
134
135     /**
136     * Set the endpoint address for the specified port name.
137     */

138     public void setEndpointAddress(javax.xml.namespace.QName JavaDoc portName, java.lang.String JavaDoc address) throws javax.xml.rpc.ServiceException JavaDoc {
139         setEndpointAddress(portName.getLocalPart(), address);
140     }
141
142 }
143
Popular Tags