Subversion Repositories SmartDukaan

Rev

Rev 20640 | Go to most recent revision | Details | Compare with Previous | 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
20664 amit.gupta 25
    //private java.lang.String BasicHttpBinding_Service_1_0_address = "https://ws.dev.aramex.net/ShippingAPI.V2/Shipping/Service_1_0.svc";
26
    private java.lang.String BasicHttpBinding_Service_1_0_address = "http://ws.aramex.net/shippingapi/shipping/service_1_0.svc";
20640 amit.gupta 27
 
28
    public java.lang.String getBasicHttpBinding_Service_1_0Address() {
29
        return BasicHttpBinding_Service_1_0_address;
30
    }
31
 
32
    // The WSDD service name defaults to the port name.
33
    private java.lang.String BasicHttpBinding_Service_1_0WSDDServiceName = "BasicHttpBinding_Service_1_0";
34
 
35
    public java.lang.String getBasicHttpBinding_Service_1_0WSDDServiceName() {
36
        return BasicHttpBinding_Service_1_0WSDDServiceName;
37
    }
38
 
39
    public void setBasicHttpBinding_Service_1_0WSDDServiceName(java.lang.String name) {
40
        BasicHttpBinding_Service_1_0WSDDServiceName = name;
41
    }
42
 
43
    public com.aramex.stub.Service_1_0_PortType getBasicHttpBinding_Service_1_0() throws javax.xml.rpc.ServiceException {
44
       java.net.URL endpoint;
45
        try {
46
            endpoint = new java.net.URL(BasicHttpBinding_Service_1_0_address);
47
        }
48
        catch (java.net.MalformedURLException e) {
49
            throw new javax.xml.rpc.ServiceException(e);
50
        }
51
        return getBasicHttpBinding_Service_1_0(endpoint);
52
    }
53
 
54
    public com.aramex.stub.Service_1_0_PortType getBasicHttpBinding_Service_1_0(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
55
        try {
56
            com.aramex.stub.BasicHttpBinding_Service_1_0Stub _stub = new com.aramex.stub.BasicHttpBinding_Service_1_0Stub(portAddress, this);
57
            _stub.setPortName(getBasicHttpBinding_Service_1_0WSDDServiceName());
58
            return _stub;
59
        }
60
        catch (org.apache.axis.AxisFault e) {
61
            return null;
62
        }
63
    }
64
 
65
    public void setBasicHttpBinding_Service_1_0EndpointAddress(java.lang.String address) {
66
        BasicHttpBinding_Service_1_0_address = address;
67
    }
68
 
69
    /**
70
     * For the given interface, get the stub implementation.
71
     * If this service has no port for the given interface,
72
     * then ServiceException is thrown.
73
     */
74
    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
75
        try {
76
            if (com.aramex.stub.Service_1_0_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
77
                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);
78
                _stub.setPortName(getBasicHttpBinding_Service_1_0WSDDServiceName());
79
                return _stub;
80
            }
81
        }
82
        catch (java.lang.Throwable t) {
83
            throw new javax.xml.rpc.ServiceException(t);
84
        }
85
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
86
    }
87
 
88
    /**
89
     * For the given interface, get the stub implementation.
90
     * If this service has no port for the given interface,
91
     * then ServiceException is thrown.
92
     */
93
    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
94
        if (portName == null) {
95
            return getPort(serviceEndpointInterface);
96
        }
97
        java.lang.String inputPortName = portName.getLocalPart();
98
        if ("BasicHttpBinding_Service_1_0".equals(inputPortName)) {
99
            return getBasicHttpBinding_Service_1_0();
100
        }
101
        else  {
102
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
103
            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
104
            return _stub;
105
        }
106
    }
107
 
108
    public javax.xml.namespace.QName getServiceName() {
109
        return new javax.xml.namespace.QName("http://tempuri.org/", "Service_1_0");
110
    }
111
 
112
    private java.util.HashSet ports = null;
113
 
114
    public java.util.Iterator getPorts() {
115
        if (ports == null) {
116
            ports = new java.util.HashSet();
117
            ports.add(new javax.xml.namespace.QName("http://tempuri.org/", "BasicHttpBinding_Service_1_0"));
118
        }
119
        return ports.iterator();
120
    }
121
 
122
    /**
123
    * Set the endpoint address for the specified port name.
124
    */
125
    public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
126
 
127
if ("BasicHttpBinding_Service_1_0".equals(portName)) {
128
            setBasicHttpBinding_Service_1_0EndpointAddress(address);
129
        }
130
        else 
131
{ // Unknown Port Name
132
            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
133
        }
134
    }
135
 
136
    /**
137
    * Set the endpoint address for the specified port name.
138
    */
139
    public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
140
        setEndpointAddress(portName.getLocalPart(), address);
141
    }
142
 
143
}