Subversion Repositories SmartDukaan

Rev

Rev 20664 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20640 amit.gupta 1
/**
2
 * Service_1_0_ServiceLocator.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 com.aramex.stub;
9
 
10
public class Service_1_0_ServiceLocator extends org.apache.axis.client.Service implements com.aramex.stub.Service_1_0_Service {
11
 
12
    public Service_1_0_ServiceLocator() {
13
    }
14
 
15
 
16
    public Service_1_0_ServiceLocator(org.apache.axis.EngineConfiguration config) {
17
        super(config);
18
    }
19
 
20
    public Service_1_0_ServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
21
        super(wsdlLoc, sName);
22
    }
23
 
24
    // Use to get a proxy class for BasicHttpBinding_Service_1_0
25
    private java.lang.String BasicHttpBinding_Service_1_0_address = "https://ws.dev.aramex.net/ShippingAPI.V2/Shipping/Service_1_0.svc";
26
 
27
    public java.lang.String getBasicHttpBinding_Service_1_0Address() {
28
        return BasicHttpBinding_Service_1_0_address;
29
    }
30
 
31
    // The WSDD service name defaults to the port name.
32
    private java.lang.String BasicHttpBinding_Service_1_0WSDDServiceName = "BasicHttpBinding_Service_1_0";
33
 
34
    public java.lang.String getBasicHttpBinding_Service_1_0WSDDServiceName() {
35
        return BasicHttpBinding_Service_1_0WSDDServiceName;
36
    }
37
 
38
    public void setBasicHttpBinding_Service_1_0WSDDServiceName(java.lang.String name) {
39
        BasicHttpBinding_Service_1_0WSDDServiceName = name;
40
    }
41
 
42
    public com.aramex.stub.Service_1_0_PortType getBasicHttpBinding_Service_1_0() throws javax.xml.rpc.ServiceException {
43
       java.net.URL endpoint;
44
        try {
45
            endpoint = new java.net.URL(BasicHttpBinding_Service_1_0_address);
46
        }
47
        catch (java.net.MalformedURLException e) {
48
            throw new javax.xml.rpc.ServiceException(e);
49
        }
50
        return getBasicHttpBinding_Service_1_0(endpoint);
51
    }
52
 
53
    public com.aramex.stub.Service_1_0_PortType getBasicHttpBinding_Service_1_0(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
54
        try {
55
            com.aramex.stub.BasicHttpBinding_Service_1_0Stub _stub = new com.aramex.stub.BasicHttpBinding_Service_1_0Stub(portAddress, this);
56
            _stub.setPortName(getBasicHttpBinding_Service_1_0WSDDServiceName());
57
            return _stub;
58
        }
59
        catch (org.apache.axis.AxisFault e) {
60
            return null;
61
        }
62
    }
63
 
64
    public void setBasicHttpBinding_Service_1_0EndpointAddress(java.lang.String address) {
65
        BasicHttpBinding_Service_1_0_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 getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
74
        try {
75
            if (com.aramex.stub.Service_1_0_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
76
                com.aramex.stub.BasicHttpBinding_Service_1_0Stub _stub = new com.aramex.stub.BasicHttpBinding_Service_1_0Stub(new java.net.URL(BasicHttpBinding_Service_1_0_address), this);
77
                _stub.setPortName(getBasicHttpBinding_Service_1_0WSDDServiceName());
78
                return _stub;
79
            }
80
        }
81
        catch (java.lang.Throwable t) {
82
            throw new javax.xml.rpc.ServiceException(t);
83
        }
84
        throw new javax.xml.rpc.ServiceException("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 getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
93
        if (portName == null) {
94
            return getPort(serviceEndpointInterface);
95
        }
96
        java.lang.String inputPortName = portName.getLocalPart();
97
        if ("BasicHttpBinding_Service_1_0".equals(inputPortName)) {
98
            return getBasicHttpBinding_Service_1_0();
99
        }
100
        else  {
101
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
102
            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
103
            return _stub;
104
        }
105
    }
106
 
107
    public javax.xml.namespace.QName getServiceName() {
108
        return new javax.xml.namespace.QName("http://tempuri.org/", "Service_1_0");
109
    }
110
 
111
    private java.util.HashSet ports = null;
112
 
113
    public java.util.Iterator getPorts() {
114
        if (ports == null) {
115
            ports = new java.util.HashSet();
116
            ports.add(new javax.xml.namespace.QName("http://tempuri.org/", "BasicHttpBinding_Service_1_0"));
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 portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
125
 
126
if ("BasicHttpBinding_Service_1_0".equals(portName)) {
127
            setBasicHttpBinding_Service_1_0EndpointAddress(address);
128
        }
129
        else 
130
{ // Unknown Port Name
131
            throw new javax.xml.rpc.ServiceException(" 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 portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
139
        setEndpointAddress(portName.getLocalPart(), address);
140
    }
141
 
142
}