|  | @ -23,7 +23,7 @@ import javax.jws.WebService;
 | 
												
													
														
															|  | public class SQLWebService implements ISQLWebService {
 |  | public class SQLWebService implements ISQLWebService {
 | 
												
													
														
															|  |     public static JdbcTemplate jdbcTemplate = null;
 |  |     public static JdbcTemplate jdbcTemplate = null;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     public void initJDBC() {
 |  | 
 | 
												
													
														
															|  | 
 |  |     public void initJDBC() throws Exception{
 | 
												
													
														
															|  |         if (jdbcTemplate == null) {
 |  |         if (jdbcTemplate == null) {
 | 
												
													
														
															|  |             //jdbc:oracle:thin:hos/hos@//172.19.103.71:1521/orcl
 |  |             //jdbc:oracle:thin:hos/hos@//172.19.103.71:1521/orcl
 | 
												
													
														
															|  |             //jdbc:mysql://172.19.103.71:1521/orcl?user=hos&password=hos&useUnicode=true&characterEncoding=UTF-8
 |  |             //jdbc:mysql://172.19.103.71:1521/orcl?user=hos&password=hos&useUnicode=true&characterEncoding=UTF-8
 | 
												
											
												
													
														
															|  | @ -104,10 +104,10 @@ public class SQLWebService implements ISQLWebService {
 | 
												
													
														
															|  |             String endDate,
 |  |             String endDate,
 | 
												
													
														
															|  |             String mobile,
 |  |             String mobile,
 | 
												
													
														
															|  |             String reportType) {
 |  |             String reportType) {
 | 
												
													
														
															|  |         initJDBC();
 |  | 
 | 
												
													
														
															|  |         WSReturnModel wsReturnModel = new WSReturnModel();
 |  |         WSReturnModel wsReturnModel = new WSReturnModel();
 | 
												
													
														
															|  |         wsReturnModel.setTransactionCode(TransactionCode);
 |  |         wsReturnModel.setTransactionCode(TransactionCode);
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  | 
 |  |             initJDBC();
 | 
												
													
														
															|  |             StringBuffer sb = new StringBuffer("select * from HDSD01_01 where 1=1 ");
 |  |             StringBuffer sb = new StringBuffer("select * from HDSD01_01 where 1=1 ");
 | 
												
													
														
															|  |             if (!StringUtils.isEmpty(endDate)) {
 |  |             if (!StringUtils.isEmpty(endDate)) {
 | 
												
													
														
															|  |                 sb.append(" and HDSD00_05_026 < '" + endDate + "'");
 |  |                 sb.append(" and HDSD00_05_026 < '" + endDate + "'");
 | 
												
											
												
													
														
															|  | @ -167,10 +167,10 @@ public class SQLWebService implements ISQLWebService {
 | 
												
													
														
															|  |             String TransactionCode,
 |  |             String TransactionCode,
 | 
												
													
														
															|  |             String reportId,
 |  |             String reportId,
 | 
												
													
														
															|  |             String reportType) {
 |  |             String reportType) {
 | 
												
													
														
															|  |         initJDBC();
 |  | 
 | 
												
													
														
															|  |         WSReturnModel wsReturnModel = new WSReturnModel();
 |  |         WSReturnModel wsReturnModel = new WSReturnModel();
 | 
												
													
														
															|  |         wsReturnModel.setTransactionCode(TransactionCode);
 |  |         wsReturnModel.setTransactionCode(TransactionCode);
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  | 
 |  |             initJDBC();
 | 
												
													
														
															|  |             StringBuffer sb = new StringBuffer("select * from HDSD01_01 where 1=1 ");
 |  |             StringBuffer sb = new StringBuffer("select * from HDSD01_01 where 1=1 ");
 | 
												
													
														
															|  |             if (!StringUtils.isEmpty(reportId)) {
 |  |             if (!StringUtils.isEmpty(reportId)) {
 | 
												
													
														
															|  |                 sb.append(" and HDSD00_05_026 < '" + reportId + "'");
 |  |                 sb.append(" and HDSD00_05_026 < '" + reportId + "'");
 | 
												
											
												
													
														
															|  | @ -241,10 +241,10 @@ public class SQLWebService implements ISQLWebService {
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     public static void main(String[] args) throws Exception {
 |  |     public static void main(String[] args) throws Exception {
 | 
												
													
														
															|  |         JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
 |  |         JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
 | 
												
													
														
															|  |         Client client = factory.createClient("http://localhost:8080/service/sql?wsdl");
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |         Client client = factory.createClient("http://172.19.103.71:8080/service/sql?wsdl");
 | 
												
													
														
															|  | 
 |  |         //Client client = factory.createClient("http://localhost:8080/service/sql?wsdl");
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  |             Object[] result = client.invoke("ExcuteSQL", "1000", "select * from stde_adapter_metadata"); // 按照方法的参数来提供值
 |  | 
 | 
												
													
														
															|  | 
 |  |             Object[] result = client.invoke("ExcuteSQL", "10000", "select count(1) as COUNT,max(to_number(HDSD03_01_031)) as MAX_KEYVALUE from HDSC01_02 where 1=1 order by to_number(HDSD03_01_031)"); // 按照方法的参数来提供值
 | 
												
													
														
															|  |             if (result != null && result.length > 0) {
 |  |             if (result != null && result.length > 0) {
 | 
												
													
														
															|  |                 System.out.println(result[0]); // 通过getUsername来获取对象的username属性
 |  |                 System.out.println(result[0]); // 通过getUsername来获取对象的username属性
 | 
												
													
														
															|  |             }
 |  |             }
 |