public static boolean testConnection() {
		String data = getEnvelope("SELECT * FROM numplan");
		Socket socket = null;
		OutputStream out = null;
		InputStream in = null;
		byte[] bArray = null;
		String SBuffer;
//		 data =
//		 "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" ";
//		 data = data
//		 +
//		 "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> ";
//		 data = data
//		 +
//		 "<SOAP-ENV:Body> <axl:executeSQLQuery xmlns:axl=\"http://www.cisco.com/AXL/7.0\" ";
//		 data = data
//		 +
//		 " xsi:schemaLocation=\"http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd\" ";
//		 data = data + "sequence=\"1234\">";
//		 data = data + "<sql>SELECT * FROM numplan</sql>";
//		 data = data
//		 + "</axl:executeSQLQuery> </SOAP-ENV:Body> </SOAP-ENV:Envelope>";

		String header = getHttpsHeader(data);
		header = header + data;
		StringBuffer sb = null;
		try {
			AXLTrustManager axl = new AXLTrustManager();
			X509TrustManager xtm = axl.new MyTrustManager();
			TrustManager[] mytm = { xtm };
			SSLContext ctx = SSLContext.getInstance("SSL");
			ctx.init(null, mytm, null);
			SSLSocketFactory sslFact = (SSLSocketFactory) ctx
					.getSocketFactory();
			socket = (SSLSocket) sslFact.createSocket(getKeys("ip"),
					Integer.parseInt("8443"));
			in = socket.getInputStream();
			bArray = new byte[2048];
			sb = new StringBuffer(2048);
			int ch = 0;
			out = socket.getOutputStream();
			out.write(header.getBytes());
			while ((ch = in.read(bArray)) != -1) {
				sb.append(new String(bArray, 0, ch));
			}
			socket.close();
			SBuffer = sb.toString();
		} catch (UnknownHostException e) {
			System.err.println("Error connecting to host: " + e.getMessage());
			return false;
		} catch (IOException ioe) {
			System.err.println("Error sending/receiving from server: "
					+ ioe.getMessage());
			try {
				if (socket != null) {
					socket.close();
				}
			} catch (Exception exc) {
				exc.printStackTrace();
				System.err.println("Error closing connection to server: "
						+ exc.getMessage());
			}
			return false;
		} catch (Exception ea) {
			System.err.println("Unknown exception " + ea.getMessage());
			return false;
		} finally {
			try {
				if (socket != null) {
					socket.close();
				}
			} catch (Exception exc) {
				exc.printStackTrace();
				System.err.println("Error closing connection to server: "
						+ exc.getMessage());
			}
		}
		return SBuffer.contains("HTTP/1.1 200 OK");
	}