??????? ???????sdk??
????http://aliyundm.oss-cn-hangzhou.aliyuncs.com/example/aliyun-java-sdk-smsV1.zip ????
?????????????:getAcsResponse??doAction???????????????getAcsResponse??
????/**
????*
????* @param toPhone ?????????????
????* @param code ?????
????* @return
????*/
????public String getAcsResponse(String toPhone?? String code) {
????SingleSendSmsResponse httpResponse = new SingleSendSmsResponse();
????String result = "";
????try {
????IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou"??accessKey?? accessSecret);
????DefaultProfile.addEndpoint("cn-hangzhou"?? "cn-hangzhou"?? "Sms"??"sms.aliyuncs.com");
????IAcsClient client = new DefaultAcsClient(profile);
????SingleSendSmsRequest request = new SingleSendSmsRequest();
????request.setSignName(sign);// ??????????????????
????request.setTemplateCode(templateCode);// ??????????????CODE
????JSONObject jsonCode = new JSONObject();
????jsonCode.accumulate("code"?? code);
????request.setParamString(jsonCode.toString());
????request.setRecNum(toPhone);
????request.setAcceptFormat(FormatType.JSON); // ????json
????httpResponse = client.getAcsResponse(request);
????logger.info("send msgcode response: {} "?? httpResponse.toString());
????result = ConstUtils.ERROR_0;
????} catch (ClientException e) {
????e.printStackTrace();// //InvalidSignName.Malformed : The specified// sign name is wrongly formed.
????logger.error("send msgcode error :{}"?? e.getMessage());
????result = e.getErrCode();
????}
????return result;
????}