李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
 
package com.chinaztt.mes.common.gsm.escort;
 
import org.apache.commons.lang3.StringUtils;
 
import java.io.File;
import java.io.FileInputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
 
 
/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.9-b130926.1035
 * Generated source version: 2.2
 *
 * @author ZTT
 */
@WebServiceClient(name = "EscortService", targetNamespace = "http://tempuri.org/", wsdlLocation = "http://192.168.20.25:8000/SalesServices/EscortService.asmx?wsdl")
public class EscortServiceGsm
    extends Service
{
 
    private final static URL ESCORTSERVICE_WSDL_LOCATION;
    private final static WebServiceException ESCORTSERVICE_EXCEPTION;
    private final static QName ESCORTSERVICE_QNAME = new QName("http://tempuri.org/", "EscortService");
 
    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL(getServerWsdlLocationUrl());
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        ESCORTSERVICE_WSDL_LOCATION = url;
        ESCORTSERVICE_EXCEPTION = e;
    }
 
    public EscortServiceGsm() {
        super(__getWsdlLocation(), ESCORTSERVICE_QNAME);
    }
 
    public EscortServiceGsm(WebServiceFeature... features) {
        super(__getWsdlLocation(), ESCORTSERVICE_QNAME, features);
    }
 
    public EscortServiceGsm(URL wsdlLocation) {
        super(wsdlLocation, ESCORTSERVICE_QNAME);
    }
 
    public EscortServiceGsm(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, ESCORTSERVICE_QNAME, features);
    }
 
    public EscortServiceGsm(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }
 
    public EscortServiceGsm(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }
 
    /**
     * 
     * @return
     *     returns EscortServiceSoap
     */
    @WebEndpoint(name = "EscortServiceSoap")
    public EscortServiceSoap getEscortServiceSoap() {
        return super.getPort(new QName("http://tempuri.org/", "EscortServiceSoap"), EscortServiceSoap.class);
    }
 
    /**
     * 
     * @param features
     *     A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return
     *     returns EscortServiceSoap
     */
    @WebEndpoint(name = "EscortServiceSoap")
    public EscortServiceSoap getEscortServiceSoap(WebServiceFeature... features) {
        return super.getPort(new QName("http://tempuri.org/", "EscortServiceSoap"), EscortServiceSoap.class, features);
    }
 
    /**
     * 
     * @return
     *     returns EscortServiceSoap
     */
    @WebEndpoint(name = "EscortServiceSoap12")
    public EscortServiceSoap getEscortServiceSoap12() {
        return super.getPort(new QName("http://tempuri.org/", "EscortServiceSoap12"), EscortServiceSoap.class);
    }
 
    /**
     * 
     * @param features
     *     A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return
     *     returns EscortServiceSoap
     */
    @WebEndpoint(name = "EscortServiceSoap12")
    public EscortServiceSoap getEscortServiceSoap12(WebServiceFeature... features) {
        return super.getPort(new QName("http://tempuri.org/", "EscortServiceSoap12"), EscortServiceSoap.class, features);
    }
 
    private static URL __getWsdlLocation() {
        if (ESCORTSERVICE_EXCEPTION!= null) {
            throw ESCORTSERVICE_EXCEPTION;
        }
        return ESCORTSERVICE_WSDL_LOCATION;
    }
 
    /**
     * 根据配置获取GSM地址路径
     *
     * @return
     */
    private static String getServerWsdlLocationUrl() {
//        String baseURL = getBaseURL();
        FileInputStream in = null;
        try {
//            in = new FileInputStream(baseURL + File.separator + "db.properties");
//            Properties properties = new Properties();
//            properties.load(in);
//            String wsdlLocation = properties.getProperty("gsm.update.escortService");
//            if (StringUtils.isNotEmpty(wsdlLocation)) {
//                return wsdlLocation;
//            } else {
                return "http://192.168.20.25:8000/SalesServices/EscortService.asmx?WSDL";
//            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
 
    /**
     * 获取到db.properties的地址文件夹
     *
     * @return
     */
//    private static String getBaseURL() {
//        File directory = new File("");
//        String basePath = directory.getAbsolutePath();
//        basePath = basePath.substring(0, basePath.lastIndexOf(File.separator)) + File.separator + "qcadoo";
//        return basePath;
//    }
}