瀏覽代碼

加入山西医科大学单点登陆

wangliang 1 年之前
父節點
當前提交
29377072e9

+ 0 - 14
cas/pom.xml

@@ -68,20 +68,6 @@
             <scope>system</scope>
             <systemPath>${project.basedir}/src/main/resources/lib/cas-client-core-3.2.1.jar</systemPath>
         </dependency>
-<!--        <dependency>-->
-<!--            <groupId>com.qmth.cas</groupId>-->
-<!--            <artifactId>apache-jakarta-commons-codec</artifactId>-->
-<!--            <version>1.6</version>-->
-<!--            <scope>system</scope>-->
-<!--            <systemPath>${project.basedir}/src/main/resources/lib/apache-jakarta-commons-codec.jar</systemPath>-->
-<!--        </dependency>-->
-<!--        <dependency>-->
-<!--            <groupId>com.qmth.cas</groupId>-->
-<!--            <artifactId>apache-jakarta-commons-httpclient</artifactId>-->
-<!--            <version>1.6</version>-->
-<!--            <scope>system</scope>-->
-<!--            <systemPath>${project.basedir}/src/main/resources/lib/apache-jakarta-commons-httpclient.jar</systemPath>-->
-<!--        </dependency>-->
     </dependencies>
 
     <build>

+ 0 - 117
cas/src/main/java/com/qmth/teachcloud/cas/util/bjwlxy/ResponseWithHttpClient.java

@@ -1,117 +0,0 @@
-//package com.qmth.teachcloud.cas.util.bjwlxy;
-//
-//import org.apache.commons.httpclient.*;
-//import org.apache.commons.httpclient.methods.PostMethod;
-//
-//import java.io.BufferedReader;
-//import java.io.IOException;
-//import java.io.InputStreamReader;
-//import java.io.UnsupportedEncodingException;
-//import java.util.Map;
-//
-//public class ResponseWithHttpClient {
-//    private static MultiThreadedHttpConnectionManager manager = new MultiThreadedHttpConnectionManager();
-//
-//    private static int connectionTimeOut = 20000;
-//
-//    private static int socketTimeOut = 10000;
-//
-//    private static int MaxtotalConnections = 40;
-//
-//    private static int MaxConnectionsPerHost = 35;
-//
-//    private static boolean mark = false;
-//
-//    public static void SetPara() {
-//        manager.getParams().setConnectionTimeout(connectionTimeOut);
-//        manager.getParams().setSoTimeout(socketTimeOut);
-//        manager.getParams().setDefaultMaxConnectionsPerHost(MaxConnectionsPerHost);
-//        manager.getParams().setMaxTotalConnections(MaxtotalConnections);
-//        mark = true;
-//    }
-//
-//    public static String getResponseWithHttpClient(String url, String encode) {
-//        HttpClient client = new HttpClient((HttpConnectionManager) manager);
-//        if (mark) {
-//            SetPara();
-//        }
-//        PostMethod postMethod = new PostMethod(url);
-//        postMethod.getParams().setParameter("http.protocol.content-charset", encode);
-//        String result = null;
-//        StringBuffer buffer = new StringBuffer();
-//        BufferedReader reader = null;
-//        try {
-//            client.executeMethod((HttpMethod) postMethod);
-//            reader = new BufferedReader(new InputStreamReader(postMethod.getResponseBodyAsStream(), postMethod.getResponseCharSet()));
-//            String inputLine = null;
-//            while ((inputLine = reader.readLine()) != null) {
-//                buffer.append(inputLine);
-//            }
-//            result = buffer.toString();
-//            result = ConverterStringCode(buffer.toString(), postMethod.getResponseCharSet(), encode);
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//            result = "";
-//        } finally {
-//        }
-//        try {
-//            postMethod.releaseConnection();
-//            reader.close();
-//        } catch (IOException iOException) {
-//        }
-//        return result;
-//    }
-//
-//    public static String getResponseWithHttpClient(String url, String encode, Map<String, String> content) {
-//        HttpClient client = new HttpClient((HttpConnectionManager) manager);
-//        if (mark) {
-//            SetPara();
-//        }
-//        PostMethod postMethod = new PostMethod(url);
-//        if (content != null && content.size() > 0) {
-//            int index = 0;
-//            NameValuePair[] nvArray = new NameValuePair[content.size()];
-//            for (Map.Entry<String, String> entry : content.entrySet()) {
-//                nvArray[index] = new NameValuePair(entry.getKey(), entry.getValue());
-//                index++;
-//            }
-//            postMethod.setRequestBody(nvArray);
-//        }
-//        postMethod.getParams().setParameter("http.protocol.content-charset", encode);
-//        String result = null;
-//        StringBuffer buffer = new StringBuffer();
-//        BufferedReader reader = null;
-//        try {
-//            client.executeMethod((HttpMethod) postMethod);
-//            reader = new BufferedReader(new InputStreamReader(postMethod.getResponseBodyAsStream(), postMethod.getResponseCharSet()));
-//            String inputLine = null;
-//            while ((inputLine = reader.readLine()) != null) {
-//                buffer.append(inputLine);
-//            }
-//            result = buffer.toString();
-//            result = ConverterStringCode(buffer.toString(), postMethod.getResponseCharSet(), encode);
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//            result = "";
-//        } finally {
-//        }
-//        try {
-//            postMethod.releaseConnection();
-//            reader.close();
-//        } catch (IOException iOException) {
-//        }
-//        return result;
-//    }
-//
-//    private static String ConverterStringCode(String source, String srcEncode, String destEncode) {
-//        if (source != null) {
-//            try {
-//                return new String(source.getBytes(srcEncode), destEncode);
-//            } catch (UnsupportedEncodingException e) {
-//                e.printStackTrace();
-//                return "";
-//            }
-//        }
-//        return "";
-//    }
-//}

二進制
cas/src/main/resources/lib/apache-jakarta-commons-codec.jar


二進制
cas/src/main/resources/lib/apache-jakarta-commons-httpclient.jar