Java调用WebService接口实现发送手机短信验证码功能教程.docxVIP

  • 23
  • 0
  • 约 15页
  • 2017-05-13 发布于湖北
  • 举报

Java调用WebService接口实现发送手机短信验证码功能教程.docx

近来由于项目需要,需要用到手机短信验证码的功能,其中最主要的是用到了第三方提供的短信平台接口WebService客户端接口,下面我把我在项目中用到的记录一下,以便给大家提供个思路,由于本人的文采有限,还请大家见谅! 一:首先上几张案例截图,以便大家可以了解一下短信验证码的流程,这里我在做的过程中也参考了很多网站的短信验证码,比如:58同城,汽车之家等。 1.点击获取验证码之前的样式: 2.输入正确的手机号后点击获取验证码之后的样式: 3.如果手机号已经被注册的样式: 4.如果一个手机号一天发送超过3次就提示不能发送: 二:前台的注册页面的代码:reg.jsp %@?page?language=java?import=java.util.*?pageEncoding=UTF-8%?? %@taglib?prefix=s?uri=/struts-tags%?? %@page?import=.csrc.base.action.FindAllData%?? %?? ????String?path?=?request.getContextPath();?? ????String?basePath?=?request.getScheme()?+?://?? ????????????+?request.getServerName()?+?:?+?request.getServerPort()?? ????????????+?path?+?/;?? %?? !DOCTYPE?HTML?PUBLIC?-//W3C//DTD?HTML?4.01?Transitional//EN?? html?? head?? base?href=%=basePath%?? title中国证券会证券期货违法违规举报中心-注册/title?? meta?http-equiv=pragma?content=no-cache?? meta?http-equiv=cache-control?content=no-cache?? meta?http-equiv=expires?content=0?? meta?http-equiv=keywords?content=keyword1,keyword2,keyword3?? meta?http-equiv=description?content=This?is?my?page?? link?rel=shortcut?icon?type=image/x-icon?href=%=request.getContextPath()%/images/favicon.ico?/?? link?rel=stylesheet?type=text/css?? ????href=%=request.getContextPath()%/css/main.css?? link?? ????href=%=request.getContextPath()%/formValidator1/style/validator.css?? ????rel=stylesheet?type=text/css?/?? style?type=text/css?? button?{?? ????background:?#F0F0F0?repeat-x;?? ????padding-top:?3px;??? ????border-top?:?1px?solid?#708090;?? ????border-right:?1px?solid?#708090;?? ????border-bottom:?1px?solid?#708090;?? ????border-left:?1px?solid?#708090;?? ????width:?auto;?? ????line-height:?12pt;??? ????font-size?:?10pt;?? ????cursor:?hand;?? ????font-size:?10pt;?? ????border-top:?1px?solid?#708090;?? }?? /style?? script?src=%=request.getContextPath()%/js/jquery-1.7.2.min.js?? ????type=text/javascript/script?? script?src=%=request.getContextPath()%/formValidator1/formValidator-4.0.1.js?? ????type=text/javascript/script?? script?src=%=request.getContextPath()%/formValidator1/formVal

文档评论(0)

1亿VIP精品文档

相关文档