1 /***
2 * SampleServiceLocator.java
3 *
4 * This file was auto-generated from WSDL
5 * by the Apache Axis WSDL2Java emitter.
6 */
7
8 package org.astrogrid.security.sample;
9
10 public class SampleServiceLocator
11 extends org.apache.axis.client.Service
12 implements org.astrogrid.security.sample.SampleService {
13
14
15 private final java.lang.String SecuritySample_address
16 = "http://localhost:8080/axis/services/security-sample";
17
18 public java.lang.String getSecuritySampleAddress() {
19 return SecuritySample_address;
20 }
21
22
23 private java.lang.String SecuritySampleWSDDServiceName = "SecuritySample";
24
25 public java.lang.String getSecuritySampleWSDDServiceName() {
26 return SecuritySampleWSDDServiceName;
27 }
28
29 public void setSecuritySampleWSDDServiceName(java.lang.String name) {
30 SecuritySampleWSDDServiceName = name;
31 }
32
33 public org.astrogrid.security.sample.SamplePortType getSecuritySamplePort()
34 throws javax.xml.rpc.ServiceException {
35 java.net.URL endpoint;
36 try {
37 endpoint = new java.net.URL(SecuritySample_address);
38 }
39 catch (java.net.MalformedURLException e) {
40 throw new javax.xml.rpc.ServiceException(e);
41 }
42 return getSecuritySamplePort(endpoint);
43 }
44
45 public org.astrogrid.security.sample.SamplePortType getSecuritySamplePort(java.net.URL portAddress)
46 throws javax.xml.rpc.ServiceException {
47 try {
48 org.astrogrid.security.sample.SecuritySampleSoapBindingStub _stub = new org.astrogrid.security.sample.SecuritySampleSoapBindingStub(portAddress, this);
49 _stub.setPortName(getSecuritySampleWSDDServiceName());
50 return _stub;
51 }
52 catch (org.apache.axis.AxisFault e) {
53 return null;
54 }
55 }
56
57 /***
58 * For the given interface, get the stub implementation.
59 * If this service has no port for the given interface,
60 * then ServiceException is thrown.
61 */
62 public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
63 try {
64 if (org.astrogrid.security.sample.SampleImpl.class.isAssignableFrom(serviceEndpointInterface)) {
65 org.astrogrid.security.sample.SecuritySampleSoapBindingStub _stub = new org.astrogrid.security.sample.SecuritySampleSoapBindingStub(new java.net.URL(SecuritySample_address), this);
66 _stub.setPortName(getSecuritySampleWSDDServiceName());
67 return _stub;
68 }
69 }
70 catch (java.lang.Throwable t) {
71 throw new javax.xml.rpc.ServiceException(t);
72 }
73 throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
74 }
75
76 /***
77 * For the given interface, get the stub implementation.
78 * If this service has no port for the given interface,
79 * then ServiceException is thrown.
80 */
81 public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
82 if (portName == null) {
83 return getPort(serviceEndpointInterface);
84 }
85 String inputPortName = portName.getLocalPart();
86 if ("SecuritySample".equals(inputPortName)) {
87 return getSecuritySamplePort();
88 }
89 else {
90 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
91 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
92 return _stub;
93 }
94 }
95
96 public javax.xml.namespace.QName getServiceName() {
97 return new javax.xml.namespace.QName("http://localhost:8080/astrogrid-security-sample-service-/services/security-sample", "SampleImplService");
98 }
99
100 private java.util.HashSet ports = null;
101
102 public java.util.Iterator getPorts() {
103 if (ports == null) {
104 ports = new java.util.HashSet();
105 ports.add(new javax.xml.namespace.QName("SecuritySample"));
106 }
107 return ports.iterator();
108 }
109
110 }