小猪的Android入门之路 Day 8 part 4
Android网络编程浅析——Android网络数据的上传
——转载请注明出处:coder-pig
本节引言:
在part 3中我们已经学习了Android网络数据的下载,难点是多线程断点续传下载;
有下载,当然也有上传啦,本节就来研究下Android中的网络数据的上传!
1.使用GET或者Post方式上传数据给服务器
2.使用开源框架HttpClient上传数据到服务区
3.发送xml数据给服务器
4.通过Http协议上传文件
5.WebService平台的了解以及简单应用
好了,开始本节的内容吧!
本节学习路线图
注意:在查询城市天气那个demo中可以不适用地区码,直接发送城市名即可!
正文:
使用GET方法或者POST方法上传数据
核心代码比较:
GET服务类:
<a target=_blank id="L1" href="http://blog.csdn.net/coder_pig/article/details/39381479#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/coder_pig/article/details/39381479#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/coder_pig/article/details/39381479#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/coder_pig/article/details/39381479#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/coder_pig/article/details/39381479#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/coder_pig/article/details/39381479#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/coder_pig/article/details/39381479#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> <a target=_blank id="L8" href="http://blog.csdn.net/coder_pig/article/details/39381479#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;"> 8</a> <a target=_blank id="L9" href="http://blog.csdn.net/coder_pig/article/details/39381479#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;"> 9</a> <a target=_blank id="L10" href="http://blog.csdn.net/coder_pig/article/details/39381479#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a> <a target=_blank id="L11" href="http://blog.csdn.net/coder_pig/article/details/39381479#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a> <a target=_blank id="L12" href="http://blog.csdn.net/coder_pig/article/details/39381479#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a> <a target=_blank id="L13" href="http://blog.csdn.net/coder_pig/article/details/39381479#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a> <a target=_blank id="L14" href="http://blog.csdn.net/coder_pig/article/details/39381479#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a> <a target=_blank id="L15" href="http://blog.csdn.net/coder_pig/article/details/39381479#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a> <a target=_blank id="L16" href="http://blog.csdn.net/coder_pig/article/details/39381479#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a> <a target=_blank id="L17" href="http://blog.csdn.net/coder_pig/article/details/39381479#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a> <a target=_blank id="L18" href="http://blog.csdn.net/coder_pig/article/details/39381479#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a> <a target=_blank id="L19" href="http://blog.csdn.net/coder_pig/article/details/39381479#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a> <a target=_blank id="L20" href="http://blog.csdn.net/coder_pig/article/details/39381479#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a> <a target=_blank id="L21" href="http://blog.csdn.net/coder_pig/article/details/39381479#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a> <a target=_blank id="L22" href="http://blog.csdn.net/coder_pig/article/details/39381479#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a> <a target=_blank id="L23" href="http://blog.csdn.net/coder_pig/article/details/39381479#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a> <a target=_blank id="L24" href="http://blog.csdn.net/coder_pig/article/details/39381479#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a> <a target=_blank id="L25" href="http://blog.csdn.net/coder_pig/article/details/39381479#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a> <a target=_blank id="L26" href="http://blog.csdn.net/coder_pig/article/details/39381479#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a> <a target=_blank id="L27" href="http://blog.csdn.net/coder_pig/article/details/39381479#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a> <a target=_blank id="L28" href="http://blog.csdn.net/coder_pig/article/details/39381479#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a> <a target=_blank id="L29" href="http://blog.csdn.net/coder_pig/article/details/39381479#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a> <a target=_blank id="L30" href="http://blog.csdn.net/coder_pig/article/details/39381479#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a> <a target=_blank id="L31" href="http://blog.csdn.net/coder_pig/article/details/39381479#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a> <a target=_blank id="L32" href="http://blog.csdn.net/coder_pig/article/details/39381479#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a> <a target=_blank id="L33" href="http://blog.csdn.net/coder_pig/article/details/39381479#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a> <a target=_blank id="L34" href="http://blog.csdn.net/coder_pig/article/details/39381479#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a> <a target=_blank id="L35" href="http://blog.csdn.net/coder_pig/article/details/39381479#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a> <a target=_blank id="L36" href="http://blog.csdn.net/coder_pig/article/details/39381479#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a> <a target=_blank id="L37" href="http://blog.csdn.net/coder_pig/article/details/39381479#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a> <a target=_blank id="L38" href="http://blog.csdn.net/coder_pig/article/details/39381479#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a> <a target=_blank id="L39" href="http://blog.csdn.net/coder_pig/article/details/39381479#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a> <a target=_blank id="L40" href="http://blog.csdn.net/coder_pig/article/details/39381479#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a> <a target=_blank id="L41" href="http://blog.csdn.net/coder_pig/article/details/39381479#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a> <a target=_blank id="L42" href="http://blog.csdn.net/coder_pig/article/details/39381479#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a> <a target=_blank id="L43" href="http://blog.csdn.net/coder_pig/article/details/39381479#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a> <a target=_blank id="L44" href="http://blog.csdn.net/coder_pig/article/details/39381479#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a> <a target=_blank id="L45" href="http://blog.csdn.net/coder_pig/article/details/39381479#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a> <a target=_blank id="L46" href="http://blog.csdn.net/coder_pig/article/details/39381479#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a> <a target=_blank id="L47" href="http://blog.csdn.net/coder_pig/article/details/39381479#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a> <a target=_blank id="L48" href="http://blog.csdn.net/coder_pig/article/details/39381479#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a> <a target=_blank id="L49" href="http://blog.csdn.net/coder_pig/article/details/39381479#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a> <a target=_blank id="L50" href="http://blog.csdn.net/coder_pig/article/details/39381479#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a> <a target=_blank id="L51" href="http://blog.csdn.net/coder_pig/article/details/39381479#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a> <a target=_blank id="L52" href="http://blog.csdn.net/coder_pig/article/details/39381479#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a> <a target=_blank id="L53" href="http://blog.csdn.net/coder_pig/article/details/39381479#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a> <a target=_blank id="L54" href="http://blog.csdn.net/coder_pig/article/details/39381479#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a> |
来自CODE的代码片
GETService.java
POST服务类:
<a target=_blank id="L1" href="http://blog.csdn.net/coder_pig/article/details/39381479#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/coder_pig/article/details/39381479#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/coder_pig/article/details/39381479#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/coder_pig/article/details/39381479#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/coder_pig/article/details/39381479#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/coder_pig/article/details/39381479#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/coder_pig/article/details/39381479#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> <a target=_blank id="L8" href="http://blog.csdn.net/coder_pig/article/details/39381479#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;"> 8</a> <a target=_blank id="L9" href="http://blog.csdn.net/coder_pig/article/details/39381479#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;"> 9</a> <a target=_blank id="L10" href="http://blog.csdn.net/coder_pig/article/details/39381479#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a> <a target=_blank id="L11" href="http://blog.csdn.net/coder_pig/article/details/39381479#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a> <a target=_blank id="L12" href="http://blog.csdn.net/coder_pig/article/details/39381479#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a> <a target=_blank id="L13" href="http://blog.csdn.net/coder_pig/article/details/39381479#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a> <a target=_blank id="L14" href="http://blog.csdn.net/coder_pig/article/details/39381479#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a> <a target=_blank id="L15" href="http://blog.csdn.net/coder_pig/article/details/39381479#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a> <a target=_blank id="L16" href="http://blog.csdn.net/coder_pig/article/details/39381479#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a> <a target=_blank id="L17" href="http://blog.csdn.net/coder_pig/article/details/39381479#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a> <a target=_blank id="L18" href="http://blog.csdn.net/coder_pig/article/details/39381479#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a> <a target=_blank id="L19" href="http://blog.csdn.net/coder_pig/article/details/39381479#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a> <a target=_blank id="L20" href="http://blog.csdn.net/coder_pig/article/details/39381479#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a> <a target=_blank id="L21" href="http://blog.csdn.net/coder_pig/article/details/39381479#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a> <a target=_blank id="L22" href="http://blog.csdn.net/coder_pig/article/details/39381479#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a> <a target=_blank id="L23" href="http://blog.csdn.net/coder_pig/article/details/39381479#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a> <a target=_blank id="L24" href="http://blog.csdn.net/coder_pig/article/details/39381479#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a> <a target=_blank id="L25" href="http://blog.csdn.net/coder_pig/article/details/39381479#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a> <a target=_blank id="L26" href="http://blog.csdn.net/coder_pig/article/details/39381479#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a> <a target=_blank id="L27" href="http://blog.csdn.net/coder_pig/article/details/39381479#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a> <a target=_blank id="L28" href="http://blog.csdn.net/coder_pig/article/details/39381479#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a> <a target=_blank id="L29" href="http://blog.csdn.net/coder_pig/article/details/39381479#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a> <a target=_blank id="L30" href="http://blog.csdn.net/coder_pig/article/details/39381479#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a> <a target=_blank id="L31" href="http://blog.csdn.net/coder_pig/article/details/39381479#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a> <a target=_blank id="L32" href="http://blog.csdn.net/coder_pig/article/details/39381479#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a> <a target=_blank id="L33" href="http://blog.csdn.net/coder_pig/article/details/39381479#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a> <a target=_blank id="L34" href="http://blog.csdn.net/coder_pig/article/details/39381479#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a> <a target=_blank id="L35" href="http://blog.csdn.net/coder_pig/article/details/39381479#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a> <a target=_blank id="L36" href="http://blog.csdn.net/coder_pig/article/details/39381479#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a> <a target=_blank id="L37" href="http://blog.csdn.net/coder_pig/article/details/39381479#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a> <a target=_blank id="L38" href="http://blog.csdn.net/coder_pig/article/details/39381479#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a> <a target=_blank id="L39" href="http://blog.csdn.net/coder_pig/article/details/39381479#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a> <a target=_blank id="L40" href="http://blog.csdn.net/coder_pig/article/details/39381479#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a> <a target=_blank id="L41" href="http://blog.csdn.net/coder_pig/article/details/39381479#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a> <a target=_blank id="L42" href="http://blog.csdn.net/coder_pig/article/details/39381479#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a> <a target=_blank id="L43" href="http://blog.csdn.net/coder_pig/article/details/39381479#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a> <a target=_blank id="L44" href="http://blog.csdn.net/coder_pig/article/details/39381479#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a> <a target=_blank id="L45" href="http://blog.csdn.net/coder_pig/article/details/39381479#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a> <a target=_blank id="L46" href="http://blog.csdn.net/coder_pig/article/details/39381479#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a> <a target=_blank id="L47" href="http://blog.csdn.net/coder_pig/article/details/39381479#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a> <a target=_blank id="L48" href="http://blog.csdn.net/coder_pig/article/details/39381479#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a> <a target=_blank id="L49" href="http://blog.csdn.net/coder_pig/article/details/39381479#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a> <a target=_blank id="L50" href="http://blog.csdn.net/coder_pig/article/details/39381479#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a> <a target=_blank id="L51" href="http://blog.csdn.net/coder_pig/article/details/39381479#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a> <a target=_blank id="L52" href="http://blog.csdn.net/coder_pig/article/details/39381479#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a> <a target=_blank id="L53" href="http://blog.csdn.net/coder_pig/article/details/39381479#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a> <a target=_blank id="L54" href="http://blog.csdn.net/coder_pig/article/details/39381479#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a> <a target=_blank id="L55" href="http://blog.csdn.net/coder_pig/article/details/39381479#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a> <a target=_blank id="L56" href="http://blog.csdn.net/coder_pig/article/details/39381479#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a> <a target=_blank id="L57" href="http://blog.csdn.net/coder_pig/article/details/39381479#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a> <a target=_blank id="L58" href="http://blog.csdn.net/coder_pig/article/details/39381479#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a> <a target=_blank id="L59" href="http://blog.csdn.net/coder_pig/article/details/39381479#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a> <a target=_blank id="L60" href="http://blog.csdn.net/coder_pig/article/details/39381479#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a> <a target=_blank id="L61" href="http://blog.csdn.net/coder_pig/article/details/39381479#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a> |
来自CODE的代码片
POSTService.java
ps:相信细心的朋友都看出来这两个服务类不同的地方了,get是直接发送请求的,而post还需要设置相关的参数,
最后是以流的方式提交数据的!
完整项目下载:http://pan.baidu.com/s/1qWobnvm
效果图:
ps:另外还要说一点的是,传递中文可能出现乱码的情况,笔者之前也在这里纠结了半天,改来改去还是不行,后来发现是自己
的myeclpise的问题,上述运行结果是到同学的电脑运行的结果,乱码的话是因为tomcat默认支持的事iso8859-1编码方式
下面提供两个简单的解决乱码问题的方法(其实更重要的是注意编码的统一!!!)
1.在servlet取出数据的时候,使用下述代码进行转码:
修改后:(utf-8不行的话再改成gbk试试)
ps:如上述方法都不行的话,就可能是tomcat的问题了,建议别直接使用myeclpise提供的tomcat;自己下载个tomcat配置下
如果还是乱码;去别人电脑试试,如果可以就说明是编译器的问题了;如果还是不行的话,我也帮不了你了
使用开源框架HttpClient发送请求:
核心代码:(直接使用httpClient发送post请求)
<a target=_blank id="L1" href="http://blog.csdn.net/coder_pig/article/details/39381479#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/coder_pig/article/details/39381479#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/coder_pig/article/details/39381479#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/coder_pig/article/details/39381479#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/coder_pig/article/details/39381479#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/coder_pig/article/details/39381479#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/coder_pig/article/details/39381479#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> <a target=_blank id="L8" href="http://blog.csdn.net/coder_pig/article/details/39381479#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;"> 8</a> <a target=_blank id="L9" href="http://blog.csdn.net/coder_pig/article/details/39381479#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;"> 9</a> <a target=_blank id="L10" href="http://blog.csdn.net/coder_pig/article/details/39381479#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a> <a target=_blank id="L11" href="http://blog.csdn.net/coder_pig/article/details/39381479#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a> <a target=_blank id="L12" href="http://blog.csdn.net/coder_pig/article/details/39381479#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a> <a target=_blank id="L13" href="http://blog.csdn.net/coder_pig/article/details/39381479#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a> <a target=_blank id="L14" href="http://blog.csdn.net/coder_pig/article/details/39381479#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a> <a target=_blank id="L15" href="http://blog.csdn.net/coder_pig/article/details/39381479#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a> <a target=_blank id="L16" href="http://blog.csdn.net/coder_pig/article/details/39381479#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a> <a target=_blank id="L17" href="http://blog.csdn.net/coder_pig/article/details/39381479#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a> <a target=_blank id="L18" href="http://blog.csdn.net/coder_pig/article/details/39381479#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a> <a target=_blank id="L19" href="http://blog.csdn.net/coder_pig/article/details/39381479#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a> <a target=_blank id="L20" href="http://blog.csdn.net/coder_pig/article/details/39381479#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a> <a target=_blank id="L21" href="http://blog.csdn.net/coder_pig/article/details/39381479#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a> <a target=_blank id="L22" href="http://blog.csdn.net/coder_pig/article/details/39381479#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a> <a target=_blank id="L23" href="http://blog.csdn.net/coder_pig/article/details/39381479#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a> <a target=_blank id="L24" href="http://blog.csdn.net/coder_pig/article/details/39381479#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a> |
来自CODE的代码片
HttpClientPostService.java
代码使用示例:
用户向某个jsp页面发送请求,如果没登陆的话返回提示没有没有权限访问页面;
点击登录后,验证账号密码是否正确,正确的话弹出Toast信息,并显示服务端反馈的内容
服务端使用到了session,相信学过jsp的同学都知道,可以通过这个判断用户是否为登录状态!
这里就直接套用疯狂讲义中的demo
效果图:
代码下载:http://pan.baidu.com/s/1kTgJRxX
核心代码解析:
①服务端如何判断用户是否登录?
答:点击登录按钮指向的是login.jsp,在这里完成登录,同时把状态写入到session
session.setAttribute("user" , name);
同时在该页面中匹配账号密码是否正确,否则返回不同的结果,成功或者失败!
当我们点击访问页面,请求指向的事secret.jsp页面,该页面先取出session中的name对应的值
与"jay"进行匹配,有的话,根据判断结果返回不同的处理结果:
<%Object user = session.getAttribute("user");
if(user != null && user.toString().trim().equals("jay"))....%>
else{out.println("您没有被授权访问该页面");}%>
②客户端提交请求,解析响应结果:
- // 创建一个HttpGet对象
- HttpGet get = new HttpGet("http://10.13.20.32:8080/foo/secret.jsp");
- // 发送GET请求
- HttpResponse httpResponse = httpClient.execute(get);
- //获得服务器反馈的结果
- HttpEntity entity = httpResponse.getEntity();
- if (entity != null)
- {
- // 读取服务器响应
- BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent()));
- String line = null;
- while ((line = br.readLine()) != null)
- {
- Message msg = new Message();
- msg.what = 0x123;
- msg.obj = line;
- handler.sendMessage(msg);
- }
发送xml数据给服务器:
和前面的差不多,这里只贴核心业务代码,要用的时候直接复制即可!
<a target=_blank id="L1" href="http://blog.csdn.net/coder_pig/article/details/39381479#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/coder_pig/article/details/39381479#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/coder_pig/article/details/39381479#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/coder_pig/article/details/39381479#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/coder_pig/article/details/39381479#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/coder_pig/article/details/39381479#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/coder_pig/article/details/39381479#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> <a target=_blank id="L8" href="http://blog.csdn.net/coder_pig/article/details/39381479#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;"> 8</a> <a target=_blank id="L9" href="http://blog.csdn.net/coder_pig/article/details/39381479#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;"> 9</a> <a target=_blank id="L10" href="http://blog.csdn.net/coder_pig/article/details/39381479#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a> <a target=_blank id="L11" href="http://blog.csdn.net/coder_pig/article/details/39381479#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a> <a target=_blank id="L12" href="http://blog.csdn.net/coder_pig/article/details/39381479#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a> <a target=_blank id="L13" href="http://blog.csdn.net/coder_pig/article/details/39381479#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a> <a target=_blank id="L14" href="http://blog.csdn.net/coder_pig/article/details/39381479#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a> <a target=_blank id="L15" href="http://blog.csdn.net/coder_pig/article/details/39381479#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a> <a target=_blank id="L16" href="http://blog.csdn.net/coder_pig/article/details/39381479#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a> <a target=_blank id="L17" href="http://blog.csdn.net/coder_pig/article/details/39381479#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a> <a target=_blank id="L18" href="http://blog.csdn.net/coder_pig/article/details/39381479#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a> <a target=_blank id="L19" href="http://blog.csdn.net/coder_pig/article/details/39381479#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a> <a target=_blank id="L20" href="http://blog.csdn.net/coder_pig/article/details/39381479#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a> <a target=_blank id="L21" href="http://blog.csdn.net/coder_pig/article/details/39381479#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a> <a target=_blank id="L22" href="http://blog.csdn.net/coder_pig/article/details/39381479#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a> <a target=_blank id="L23" href="http://blog.csdn.net/coder_pig/article/details/39381479#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a> <a target=_blank id="L24" href="http://blog.csdn.net/coder_pig/article/details/39381479#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a> <a target=_blank id="L25" href="http://blog.csdn.net/coder_pig/article/details/39381479#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a> <a target=_blank id="L26" href="http://blog.csdn.net/coder_pig/article/details/39381479#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a> <a target=_blank id="L27" href="http://blog.csdn.net/coder_pig/article/details/39381479#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a> <a target=_blank id="L28" href="http://blog.csdn.net/coder_pig/article/details/39381479#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a> <a target=_blank id="L29" href="http://blog.csdn.net/coder_pig/article/details/39381479#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a> |
来自CODE的代码片
SendXML.java
使用Http协议完成文件上传操作:
相信大家在使用app的时候,都要完成一个注册用户的流程,而注册的时候,通常都是需要
用户上传图片作为自己的用户头像的,这里提供一个使用Http协议完成文件上传的业务代码:
另外,一般使用http上传的文件比较小,通常是小于2M的!
<a target=_blank id="L1" href="http://blog.csdn.net/coder_pig/article/details/39381479#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/coder_pig/article/details/39381479#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/coder_pig/article/details/39381479#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/coder_pig/article/details/39381479#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/coder_pig/article/details/39381479#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/coder_pig/article/details/39381479#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/coder_pig/article/details/39381479#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> <a target=_blank id="L8" href="http://blog.csdn.net/coder_pig/article/details/39381479#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;"> 8</a> <a target=_blank id="L9" href="http://blog.csdn.net/coder_pig/article/details/39381479#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;"> 9</a> <a target=_blank id="L10" href="http://blog.csdn.net/coder_pig/article/details/39381479#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a> <a target=_blank id="L11" href="http://blog.csdn.net/coder_pig/article/details/39381479#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a> <a target=_blank id="L12" href="http://blog.csdn.net/coder_pig/article/details/39381479#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a> <a target=_blank id="L13" href="http://blog.csdn.net/coder_pig/article/details/39381479#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a> <a target=_blank id="L14" href="http://blog.csdn.net/coder_pig/article/details/39381479#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a> <a target=_blank id="L15" href="http://blog.csdn.net/coder_pig/article/details/39381479#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a> <a target=_blank id="L16" href="http://blog.csdn.net/coder_pig/article/details/39381479#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a> <a target=_blank id="L17" href="http://blog.csdn.net/coder_pig/article/details/39381479#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a> <a target=_blank id="L18" href="http://blog.csdn.net/coder_pig/article/details/39381479#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a> <a target=_blank id="L19" href="http://blog.csdn.net/coder_pig/article/details/39381479#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a> <a target=_blank id="L20" href="http://blog.csdn.net/coder_pig/article/details/39381479#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a> <a target=_blank id="L21" href="http://blog.csdn.net/coder_pig/article/details/39381479#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a> <a target=_blank id="L22" href="http://blog.csdn.net/coder_pig/article/details/39381479#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a> <a target=_blank id="L23" href="http://blog.csdn.net/coder_pig/article/details/39381479#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a> <a target=_blank id="L24" href="http://blog.csdn.net/coder_pig/article/details/39381479#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a> <a target=_blank id="L25" href="http://blog.csdn.net/coder_pig/article/details/39381479#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a> <a target=_blank id="L26" href="http://blog.csdn.net/coder_pig/article/details/39381479#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a> <a target=_blank id="L27" href="http://blog.csdn.net/coder_pig/article/details/39381479#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a> <a target=_blank id="L28" href="http://blog.csdn.net/coder_pig/article/details/39381479#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a> <a target=_blank id="L29" href="http://blog.csdn.net/coder_pig/article/details/39381479#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a> <a target=_blank id="L30" href="http://blog.csdn.net/coder_pig/article/details/39381479#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a> <a target=_blank id="L31" href="http://blog.csdn.net/coder_pig/article/details/39381479#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a> <a target=_blank id="L32" href="http://blog.csdn.net/coder_pig/article/details/39381479#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a> <a target=_blank id="L33" href="http://blog.csdn.net/coder_pig/article/details/39381479#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a> <a target=_blank id="L34" href="http://blog.csdn.net/coder_pig/article/details/39381479#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a> <a target=_blank id="L35" href="http://blog.csdn.net/coder_pig/article/details/39381479#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a> <a target=_blank id="L36" href="http://blog.csdn.net/coder_pig/article/details/39381479#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a> <a target=_blank id="L37" href="http://blog.csdn.net/coder_pig/article/details/39381479#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a> <a target=_blank id="L38" href="http://blog.csdn.net/coder_pig/article/details/39381479#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a> <a target=_blank id="L39" href="http://blog.csdn.net/coder_pig/article/details/39381479#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a> <a target=_blank id="L40" href="http://blog.csdn.net/coder_pig/article/details/39381479#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a> <a target=_blank id="L41" href="http://blog.csdn.net/coder_pig/article/details/39381479#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a> <a target=_blank id="L42" href="http://blog.csdn.net/coder_pig/article/details/39381479#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a> <a target=_blank id="L43" href="http://blog.csdn.net/coder_pig/article/details/39381479#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a> <a target=_blank id="L44" href="http://blog.csdn.net/coder_pig/article/details/39381479#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a> <a target=_blank id="L45" href="http://blog.csdn.net/coder_pig/article/details/39381479#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a> <a target=_blank id="L46" href="http://blog.csdn.net/coder_pig/article/details/39381479#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a> <a target=_blank id="L47" href="http://blog.csdn.net/coder_pig/article/details/39381479#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a> <a target=_blank id="L48" href="http://blog.csdn.net/coder_pig/article/details/39381479#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a> <a target=_blank id="L49" href="http://blog.csdn.net/coder_pig/article/details/39381479#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a> <a target=_blank id="L50" href="http://blog.csdn.net/coder_pig/article/details/39381479#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a> <a target=_blank id="L51" href="http://blog.csdn.net/coder_pig/article/details/39381479#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a> <a target=_blank id="L52" href="http://blog.csdn.net/coder_pig/article/details/39381479#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a> <a target=_blank id="L53" href="http://blog.csdn.net/coder_pig/article/details/39381479#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a> <a target=_blank id="L54" href="http://blog.csdn.net/coder_pig/article/details/39381479#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a> <a target=_blank id="L55" href="http://blog.csdn.net/coder_pig/article/details/39381479#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a> <a target=_blank id="L56" href="http://blog.csdn.net/coder_pig/article/details/39381479#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a> <a target=_blank id="L57" href="http://blog.csdn.net/coder_pig/article/details/39381479#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a> <a target=_blank id="L58" href="http://blog.csdn.net/coder_pig/article/details/39381479#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a> <a target=_blank id="L59" href="http://blog.csdn.net/coder_pig/article/details/39381479#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a> <a target=_blank id="L60" href="http://blog.csdn.net/coder_pig/article/details/39381479#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a> <a target=_blank id="L61" href="http://blog.csdn.net/coder_pig/article/details/39381479#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a> <a target=_blank id="L62" href="http://blog.csdn.net/coder_pig/article/details/39381479#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a> <a target=_blank id="L63" href="http://blog.csdn.net/coder_pig/article/details/39381479#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a> <a target=_blank id="L64" href="http://blog.csdn.net/coder_pig/article/details/39381479#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a> <a target=_blank id="L65" href="http://blog.csdn.net/coder_pig/article/details/39381479#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a> <a target=_blank id="L66" href="http://blog.csdn.net/coder_pig/article/details/39381479#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a> <a target=_blank id="L67" href="http://blog.csdn.net/coder_pig/article/details/39381479#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a> <a target=_blank id="L68" href="http://blog.csdn.net/coder_pig/article/details/39381479#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a> <a target=_blank id="L69" href="http://blog.csdn.net/coder_pig/article/details/39381479#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a> <a target=_blank id="L70" href="http://blog.csdn.net/coder_pig/article/details/39381479#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a> <a target=_blank id="L71" href="http://blog.csdn.net/coder_pig/article/details/39381479#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a> <a target=_blank id="L72" href="http://blog.csdn.net/coder_pig/article/details/39381479#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a> <a target=_blank id="L73" href="http://blog.csdn.net/coder_pig/article/details/39381479#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a> <a target=_blank id="L74" href="http://blog.csdn.net/coder_pig/article/details/39381479#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;"> 74</a> <a target=_blank id="L75" href="http://blog.csdn.net/coder_pig/article/details/39381479#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;"> 75</a> <a target=_blank id="L76" href="http://blog.csdn.net/coder_pig/article/details/39381479#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;"> 76</a> <a target=_blank id="L77" href="http://blog.csdn.net/coder_pig/article/details/39381479#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;"> 77</a> <a target=_blank id="L78" href="http://blog.csdn.net/coder_pig/article/details/39381479#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;"> 78</a> <a target=_blank id="L79" href="http://blog.csdn.net/coder_pig/article/details/39381479#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;"> 79</a> <a target=_blank id="L80" href="http://blog.csdn.net/coder_pig/article/details/39381479#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;"> 80</a> <a target=_blank id="L81" href="http://blog.csdn.net/coder_pig/article/details/39381479#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;"> 81</a> <a target=_blank id="L82" href="http://blog.csdn.net/coder_pig/article/details/39381479#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;"> 82</a> <a target=_blank id="L83" href="http://blog.csdn.net/coder_pig/article/details/39381479#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;"> 83</a> <a target=_blank id="L84" href="http://blog.csdn.net/coder_pig/article/details/39381479#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;"> 84</a> <a target=_blank id="L85" href="http://blog.csdn.net/coder_pig/article/details/39381479#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;"> 85</a> <a target=_blank id="L86" href="http://blog.csdn.net/coder_pig/article/details/39381479#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;"> 86</a> <a target=_blank id="L87" href="http://blog.csdn.net/coder_pig/article/details/39381479#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;"> 87</a> <a target=_blank id="L88" href="http://blog.csdn.net/coder_pig/article/details/39381479#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;"> 88</a> <a target=_blank id="L89" href="http://blog.csdn.net/coder_pig/article/details/39381479#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;"> 89</a> <a target=_blank id="L90" href="http://blog.csdn.net/coder_pig/article/details/39381479#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;"> 90</a> <a target=_blank id="L91" href="http://blog.csdn.net/coder_pig/article/details/39381479#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;"> 91</a> <a target=_blank id="L92" href="http://blog.csdn.net/coder_pig/article/details/39381479#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;"> 92</a> <a target=_blank id="L93" href="http://blog.csdn.net/coder_pig/article/details/39381479#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;"> 93</a> <a target=_blank id="L94" href="http://blog.csdn.net/coder_pig/article/details/39381479#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;"> 94</a> <a target=_blank id="L95" href="http://blog.csdn.net/coder_pig/article/details/39381479#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;"> 95</a> <a target=_blank id="L96" href="http://blog.csdn.net/coder_pig/article/details/39381479#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;"> 96</a> <a target=_blank id="L97" href="http://blog.csdn.net/coder_pig/article/details/39381479#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;"> 97</a> <a target=_blank id="L98" href="http://blog.csdn.net/coder_pig/article/details/39381479#L98" rel="#L98" style="color: rgb(102, 102, 102); text-decoration: none;"> 98</a> <a target=_blank id="L99" href="http://blog.csdn.net/coder_pig/article/details/39381479#L99" rel="#L99" style="color: rgb(102, 102, 102); text-decoration: none;"> 99</a> <a target=_blank id="L100" href="http://blog.csdn.net/coder_pig/article/details/39381479#L100" rel="#L100" style="color: rgb(102, 102, 102); text-decoration: none;"> 100</a> <a target=_blank id="L101" href="http://blog.csdn.net/coder_pig/article/details/39381479#L101" rel="#L101" style="color: rgb(102, 102, 102); text-decoration: none;"> 101</a> <a target=_blank id="L102" href="http://blog.csdn.net/coder_pig/article/details/39381479#L102" rel="#L102" style="color: rgb(102, 102, 102); text-decoration: none;"> 102</a> <a target=_blank id="L103" href="http://blog.csdn.net/coder_pig/article/details/39381479#L103" rel="#L103" style="color: rgb(102, 102, 102); text-decoration: none;"> 103</a> <a target=_blank id="L104" href="http://blog.csdn.net/coder_pig/article/details/39381479#L104" rel="#L104" style="color: rgb(102, 102, 102); text-decoration: none;"> 104</a> <a target=_blank id="L105" href="http://blog.csdn.net/coder_pig/article/details/39381479#L105" rel="#L105" style="color: rgb(102, 102, 102); text-decoration: none;"> 105</a> <a target=_blank id="L106" href="http://blog.csdn.net/coder_pig/article/details/39381479#L106" rel="#L106" style="color: rgb(102, 102, 102); text-decoration: none;"> 106</a> <a target=_blank id="L107" href="http://blog.csdn.net/coder_pig/article/details/39381479#L107" rel="#L107" style="color: rgb(102, 102, 102); text-decoration: none;"> 107</a> <a target=_blank id="L108" href="http://blog.csdn.net/coder_pig/article/details/39381479#L108" rel="#L108" style="color: rgb(102, 102, 102); text-decoration: none;"> 108</a> <a target=_blank id="L109" href="http://blog.csdn.net/coder_pig/article/details/39381479#L109" rel="#L109" style="color: rgb(102, 102, 102); text-decoration: none;"> 109</a> <a target=_blank id="L110" href="http://blog.csdn.net/coder_pig/article/details/39381479#L110" rel="#L110" style="color: rgb(102, 102, 102); text-decoration: none;"> 110</a> <a target=_blank id="L111" href="http://blog.csdn.net/coder_pig/article/details/39381479#L111" rel="#L111" style="color: rgb(102, 102, 102); text-decoration: none;"> 111</a> <a target=_blank id="L112" href="http://blog.csdn.net/coder_pig/article/details/39381479#L112" rel="#L112" style="color: rgb(102, 102, 102); text-decoration: none;"> 112</a> <a target=_blank id="L113" href="http://blog.csdn.net/coder_pig/article/details/39381479#L113" rel="#L113" style="color: rgb(102, 102, 102); text-decoration: none;"> 113</a> <a target=_blank id="L114" href="http://blog.csdn.net/coder_pig/article/details/39381479#L114" rel="#L114" style="color: rgb(102, 102, 102); text-decoration: none;"> 114</a> <a target=_blank id="L115" href="http://blog.csdn.net/coder_pig/article/details/39381479#L115" rel="#L115" style="color: rgb(102, 102, 102); text-decoration: none;"> 115</a> <a target=_blank id="L116" href="http://blog.csdn.net/coder_pig/article/details/39381479#L116" rel="#L116" style="color: rgb(102, 102, 102); text-decoration: none;"> 116</a> <a target=_blank id="L117" href="http://blog.csdn.net/coder_pig/article/details/39381479#L117" rel="#L117" style="color: rgb(102, 102, 102); text-decoration: none;"> 117</a> <a target=_blank id="L118" href="http://blog.csdn.net/coder_pig/article/details/39381479#L118" rel="#L118" style="color: rgb(102, 102, 102); text-decoration: none;"> 118</a> <a target=_blank id="L119" href="http://blog.csdn.net/coder_pig/article/details/39381479#L119" rel="#L119" style="color: rgb(102, 102, 102); text-decoration: none;"> 119</a> <a target=_blank id="L120" href="http://blog.csdn.net/coder_pig/article/details/39381479#L120" rel="#L120" style="color: rgb(102, 102, 102); text-decoration: none;"> 120</a> <a target=_blank id="L121" href="http://blog.csdn.net/coder_pig/article/details/39381479#L121" rel="#L121" style="color: rgb(102, 102, 102); text-decoration: none;"> 121</a> <a target=_blank id="L122" href="http://blog.csdn.net/coder_pig/article/details/39381479#L122" rel="#L122" style="color: rgb(102, 102, 102); text-decoration: none;"> 122</a> <a target=_blank id="L123" href="http://blog.csdn.net/coder_pig/article/details/39381479#L123" rel="#L123" style="color: rgb(102, 102, 102); text-decoration: none;"> 123</a> <a target=_blank id="L124" href="http://blog.csdn.net/coder_pig/article/details/39381479#L124" rel="#L124" style="color: rgb(102, 102, 102); text-decoration: none;"> 124</a> <a target=_blank id="L125" href="http://blog.csdn.net/coder_pig/article/details/39381479#L125" rel="#L125" style="color: rgb(102, 102, 102); text-decoration: none;"> 125</a> <a target=_blank id="L126" href="http://blog.csdn.net/coder_pig/article/details/39381479#L126" rel="#L126" style="color: rgb(102, 102, 102); text-decoration: none;"> 126</a> <a target=_blank id="L127" href="http://blog.csdn.net/coder_pig/article/details/39381479#L127" rel="#L127" style="color: rgb(102, 102, 102); text-decoration: none;"> 127</a> <a target=_blank id="L128" href="http://blog.csdn.net/coder_pig/article/details/39381479#L128" rel="#L128" style="color: rgb(102, 102, 102); text-decoration: none;"> 128</a> <a target=_blank id="L129" href="http://blog.csdn.net/coder_pig/article/details/39381479#L129" rel="#L129" style="color: rgb(102, 102, 102); text-decoration: none;"> 129</a> <a target=_blank id="L130" href="http://blog.csdn.net/coder_pig/article/details/39381479#L130" rel="#L130" style="color: rgb(102, 102, 102); text-decoration: none;"> 130</a> <a target=_blank id="L131" href="http://blog.csdn.net/coder_pig/article/details/39381479#L131" rel="#L131" style="color: rgb(102, 102, 102); text-decoration: none;"> 131</a> <a target=_blank id="L132" href="http://blog.csdn.net/coder_pig/article/details/39381479#L132" rel="#L132" style="color: rgb(102, 102, 102); text-decoration: none;"> 132</a> <a target=_blank id="L133" href="http://blog.csdn.net/coder_pig/article/details/39381479#L133" rel="#L133" style="color: rgb(102, 102, 102); text-decoration: none;"> 133</a> <a target=_blank id="L134" href="http://blog.csdn.net/coder_pig/article/details/39381479#L134" rel="#L134" style="color: rgb(102, 102, 102); text-decoration: none;"> 134</a> <a target=_blank id="L135" href="http://blog.csdn.net/coder_pig/article/details/39381479#L135" rel="#L135" style="color: rgb(102, 102, 102); text-decoration: none;"> 135</a> <a target=_blank id="L136" href="http://blog.csdn.net/coder_pig/article/details/39381479#L136" rel="#L136" style="color: rgb(102, 102, 102); text-decoration: none;"> 136</a> <a target=_blank id="L137" href="http://blog.csdn.net/coder_pig/article/details/39381479#L137" rel="#L137" style="color: rgb(102, 102, 102); text-decoration: none;"> 137</a> <a target=_blank id="L138" href="http://blog.csdn.net/coder_pig/article/details/39381479#L138" rel="#L138" style="color: rgb(102, 102, 102); text-decoration: none;"> 138</a> <a target=_blank id="L139" href="http://blog.csdn.net/coder_pig/article/details/39381479#L139" rel="#L139" style="color: rgb(102, 102, 102); text-decoration: none;"> 139</a> <a target=_blank id="L140" href="http://blog.csdn.net/coder_pig/article/details/39381479#L140" rel="#L140" style="color: rgb(102, 102, 102); text-decoration: none;"> 140</a> <a target=_blank id="L141" href="http://blog.csdn.net/coder_pig/article/details/39381479#L141" rel="#L141" style="color: rgb(102, 102, 102); text-decoration: none;"> 141</a> <a target=_blank id="L142" href="http://blog.csdn.net/coder_pig/article/details/39381479#L142" rel="#L142" style="color: rgb(102, 102, 102); text-decoration: none;"> 142</a> <a target=_blank id="L143" href="http://blog.csdn.net/coder_pig/article/details/39381479#L143" rel="#L143" style="color: rgb(102, 102, 102); text-decoration: none;"> 143</a> <a target=_blank id="L144" href="http://blog.csdn.net/coder_pig/article/details/39381479#L144" rel="#L144" style="color: rgb(102, 102, 102); text-decoration: none;"> 144</a> <a target=_blank id="L145" href="http://blog.csdn.net/coder_pig/article/details/39381479#L145" rel="#L145" style="color: rgb(102, 102, 102); text-decoration: none;"> 145</a> <a target=_blank id="L146" href="http://blog.csdn.net/coder_pig/article/details/39381479#L146" rel="#L146" style="color: rgb(102, 102, 102); text-decoration: none;"> 146</a> <a target=_blank id="L147" href="http://blog.csdn.net/coder_pig/article/details/39381479#L147" rel="#L147" style="color: rgb(102, 102, 102); text-decoration: none;"> 147</a> <a target=_blank id="L148" href="http://blog.csdn.net/coder_pig/article/details/39381479#L148" rel="#L148" style="color: rgb(102, 102, 102); text-decoration: none;"> 148</a> <a target=_blank id="L149" href="http://blog.csdn.net/coder_pig/article/details/39381479#L149" rel="#L149" style="color: rgb(102, 102, 102); text-decoration: none;"> 149</a> <a target=_blank id="L150" href="http://blog.csdn.net/coder_pig/article/details/39381479#L150" rel="#L150" style="color: rgb(102, 102, 102); text-decoration: none;"> 150</a> <a target=_blank id="L151" href="http://blog.csdn.net/coder_pig/article/details/39381479#L151" rel="#L151" style="color: rgb(102, 102, 102); text-decoration: none;"> 151</a> <a target=_blank id="L152" href="http://blog.csdn.net/coder_pig/article/details/39381479#L152" rel="#L152" style="color: rgb(102, 102, 102); text-decoration: none;"> 152</a> <a target=_blank id="L153" href="http://blog.csdn.net/coder_pig/article/details/39381479#L153" rel="#L153" style="color: rgb(102, 102, 102); text-decoration: none;"> 153</a> <a target=_blank id="L154" href="http://blog.csdn.net/coder_pig/article/details/39381479#L154" rel="#L154" style="color: rgb(102, 102, 102); text-decoration: none;"> 154</a> <a target=_blank id="L155" href="http://blog.csdn.net/coder_pig/article/details/39381479#L155" rel="#L155" style="color: rgb(102, 102, 102); text-decoration: none;"> 155</a> <a target=_blank id="L156" href="http://blog.csdn.net/coder_pig/article/details/39381479#L156" rel="#L156" style="color: rgb(102, 102, 102); text-decoration: none;"> 156</a> <a target=_blank id="L157" href="http://blog.csdn.net/coder_pig/article/details/39381479#L157" rel="#L157" style="color: rgb(102, 102, 102); text-decoration: none;"> 157</a> <a target=_blank id="L158" href="http://blog.csdn.net/coder_pig/article/details/39381479#L158" rel="#L158" style="color: rgb(102, 102, 102); text-decoration: none;"> 158</a> <a target=_blank id="L159" href="http://blog.csdn.net/coder_pig/article/details/39381479#L159" rel="#L159" style="color: rgb(102, 102, 102); text-decoration: none;"> 159</a> <a target=_blank id="L160" href="http://blog.csdn.net/coder_pig/article/details/39381479#L160" rel="#L160" style="color: rgb(102, 102, 102); text-decoration: none;"> 160</a> <a target=_blank id="L161" href="http://blog.csdn.net/coder_pig/article/details/39381479#L161" rel="#L161" style="color: rgb(102, 102, 102); text-decoration: none;"> 161</a> <a target=_blank id="L162" href="http://blog.csdn.net/coder_pig/article/details/39381479#L162" rel="#L162" style="color: rgb(102, 102, 102); text-decoration: none;"> 162</a> <a target=_blank id="L163" href="http://blog.csdn.net/coder_pig/article/details/39381479#L163" rel="#L163" style="color: rgb(102, 102, 102); text-decoration: none;"> 163</a> <a target=_blank id="L164" href="http://blog.csdn.net/coder_pig/article/details/39381479#L164" rel="#L164" style="color: rgb(102, 102, 102); text-decoration: none;"> 164</a> <a target=_blank id="L165" href="http://blog.csdn.net/coder_pig/article/details/39381479#L165" rel="#L165" style="color: rgb(102, 102, 102); text-decoration: none;"> 165</a> <a target=_blank id="L166" href="http://blog.csdn.net/coder_pig/article/details/39381479#L166" rel="#L166" style="color: rgb(102, 102, 102); text-decoration: none;"> 166</a> <a target=_blank id="L167" href="http://blog.csdn.net/coder_pig/article/details/39381479#L167" rel="#L167" style="color: rgb(102, 102, 102); text-decoration: none;"> 167</a> <a target=_blank id="L168" href="http://blog.csdn.net/coder_pig/article/details/39381479#L168" rel="#L168" style="color: rgb(102, 102, 102); text-decoration: none;"> 168</a> <a target=_blank id="L169" href="http://blog.csdn.net/coder_pig/article/details/39381479#L169" rel="#L169" style="color: rgb(102, 102, 102); text-decoration: none;"> 169</a> <a target=_blank id="L170" href="http://blog.csdn.net/coder_pig/article/details/39381479#L170" rel="#L170" style="color: rgb(102, 102, 102); text-decoration: none;"> 170</a> <a target=_blank id="L171" href="http://blog.csdn.net/coder_pig/article/details/39381479#L171" rel="#L171" style="color: rgb(102, 102, 102); text-decoration: none;"> 171</a> <a target=_blank id="L172" href="http://blog.csdn.net/coder_pig/article/details/39381479#L172" rel="#L172" style="color: rgb(102, 102, 102); text-decoration: none;"> 172</a> <a target=_blank id="L173" href="http://blog.csdn.net/coder_pig/article/details/39381479#L173" rel="#L173" style="color: rgb(102, 102, 102); text-decoration: none;"> 173</a> <a target=_blank id="L174" href="http://blog.csdn.net/coder_pig/article/details/39381479#L174" rel="#L174" style="color: rgb(102, 102, 102); text-decoration: none;"> 174</a> <a target=_blank id="L175" href="http://blog.csdn.net/coder_pig/article/details/39381479#L175" rel="#L175" style="color: rgb(102, 102, 102); text-decoration: none;"> 175</a> <a target=_blank id="L176" href="http://blog.csdn.net/coder_pig/article/details/39381479#L176" rel="#L176" style="color: rgb(102, 102, 102); text-decoration: none;"> 176</a> <a target=_blank id="L177" href="http://blog.csdn.net/coder_pig/article/details/39381479#L177" rel="#L177" style="color: rgb(102, 102, 102); text-decoration: none;"> 177</a> <a target=_blank id="L178" href="http://blog.csdn.net/coder_pig/article/details/39381479#L178" rel="#L178" style="color: rgb(102, 102, 102); text-decoration: none;"> 178</a> <a target=_blank id="L179" href="http://blog.csdn.net/coder_pig/article/details/39381479#L179" rel="#L179" style="color: rgb(102, 102, 102); text-decoration: none;"> 179</a> <a target=_blank id="L180" href="http://blog.csdn.net/coder_pig/article/details/39381479#L180" rel="#L180" style="color: rgb(102, 102, 102); text-decoration: none;"> 180</a> <a target=_blank id="L181" href="http://blog.csdn.net/coder_pig/article/details/39381479#L181" rel="#L181" style="color: rgb(102, 102, 102); text-decoration: none;"> 181</a> <a target=_blank id="L182" href="http://blog.csdn.net/coder_pig/article/details/39381479#L182" rel="#L182" style="color: rgb(102, 102, 102); text-decoration: none;"> 182</a> <a target=_blank id="L183" href="http://blog.csdn.net/coder_pig/article/details/39381479#L183" rel="#L183" style="color: rgb(102, 102, 102); text-decoration: none;"> 183</a> <a target=_blank id="L184" href="http://blog.csdn.net/coder_pig/article/details/39381479#L184" rel="#L184" style="color: rgb(102, 102, 102); text-decoration: none;"> 184</a> <a target=_blank id="L185" href="http://blog.csdn.net/coder_pig/article/details/39381479#L185" rel="#L185" style="color: rgb(102, 102, 102); text-decoration: none;"> 185</a> <a target=_blank id="L186" href="http://blog.csdn.net/coder_pig/article/details/39381479#L186" rel="#L186" style="color: rgb(102, 102, 102); text-decoration: none;"> 186</a> <a target=_blank id="L187" href="http://blog.csdn.net/coder_pig/article/details/39381479#L187" rel="#L187" style="color: rgb(102, 102, 102); text-decoration: none;"> 187</a> <a target=_blank id="L188" href="http://blog.csdn.net/coder_pig/article/details/39381479#L188" rel="#L188" style="color: rgb(102, 102, 102); text-decoration: none;"> 188</a> <a target=_blank id="L189" href="http://blog.csdn.net/coder_pig/article/details/39381479#L189" rel="#L189" style="color: rgb(102, 102, 102); text-decoration: none;"> 189</a> <a target=_blank id="L190" href="http://blog.csdn.net/coder_pig/article/details/39381479#L190" rel="#L190" style="color: rgb(102, 102, 102); text-decoration: none;"> 190</a> <a target=_blank id="L191" href="http://blog.csdn.net/coder_pig/article/details/39381479#L191" rel="#L191" style="color: rgb(102, 102, 102); text-decoration: none;"> 191</a> <a target=_blank id="L192" href="http://blog.csdn.net/coder_pig/article/details/39381479#L192" rel="#L192" style="color: rgb(102, 102, 102); text-decoration: none;"> 192</a> <a target=_blank id="L193" href="http://blog.csdn.net/coder_pig/article/details/39381479#L193" rel="#L193" style="color: rgb(102, 102, 102); text-decoration: none;"> 193</a> <a target=_blank id="L194" href="http://blog.csdn.net/coder_pig/article/details/39381479#L194" rel="#L194" style="color: rgb(102, 102, 102); text-decoration: none;"> 194</a> <a target=_blank id="L195" href="http://blog.csdn.net/coder_pig/article/details/39381479#L195" rel="#L195" style="color: rgb(102, 102, 102); text-decoration: none;"> 195</a> <a target=_blank id="L196" href="http://blog.csdn.net/coder_pig/article/details/39381479#L196" rel="#L196" style="color: rgb(102, 102, 102); text-decoration: none;"> 196</a> <a target=_blank id="L197" href="http://blog.csdn.net/coder_pig/article/details/39381479#L197" rel="#L197" style="color: rgb(102, 102, 102); text-decoration: none;"> 197</a> <a target=_blank id="L198" href="http://blog.csdn.net/coder_pig/article/details/39381479#L198" rel="#L198" style="color: rgb(102, 102, 102); text-decoration: none;"> 198</a> <a target=_blank id="L199" href="http://blog.csdn.net/coder_pig/article/details/39381479#L199" rel="#L199" style="color: rgb(102, 102, 102); text-decoration: none;"> 199</a> <a target=_blank id="L200" href="http://blog.csdn.net/coder_pig/article/details/39381479#L200" rel="#L200" style="color: rgb(102, 102, 102); text-decoration: none;"> 200</a> <a target=_blank id="L201" href="http://blog.csdn.net/coder_pig/article/details/39381479#L201" rel="#L201" style="color: rgb(102, 102, 102); text-decoration: none;"> 201</a> <a target=_blank id="L202" href="http://blog.csdn.net/coder_pig/article/details/39381479#L202" rel="#L202" style="color: rgb(102, 102, 102); text-decoration: none;"> 202</a> <a target=_blank id="L203" href="http://blog.csdn.net/coder_pig/article/details/39381479#L203" rel="#L203" style="color: rgb(102, 102, 102); text-decoration: none;"> 203</a> <a target=_blank id="L204" href="http://blog.csdn.net/coder_pig/article/details/39381479#L204" rel="#L204" style="color: rgb(102, 102, 102); text-decoration: none;"> 204</a> <a target=_blank id="L205" href="http://blog.csdn.net/coder_pig/article/details/39381479#L205" rel="#L205" style="color: rgb(102, 102, 102); text-decoration: none;"> 205</a> <a target=_blank id="L206" href="http://blog.csdn.net/coder_pig/article/details/39381479#L206" rel="#L206" style="color: rgb(102, 102, 102); text-decoration: none;"> 206</a> <a target=_blank id="L207" href="http://blog.csdn.net/coder_pig/article/details/39381479#L207" rel="#L207" style="color: rgb(102, 102, 102); text-decoration: none;"> 207</a> <a target=_blank id="L208" href="http://blog.csdn.net/coder_pig/article/details/39381479#L208" rel="#L208" style="color: rgb(102, 102, 102); text-decoration: none;"> 208</a> <a target=_blank id="L209" href="http://blog.csdn.net/coder_pig/article/details/39381479#L209" rel="#L209" style="color: rgb(102, 102, 102); text-decoration: none;"> 209</a> <a target=_blank id="L210" href="http://blog.csdn.net/coder_pig/article/details/39381479#L210" rel="#L210" style="color: rgb(102, 102, 102); text-decoration: none;"> 210</a> <a target=_blank id="L211" href="http://blog.csdn.net/coder_pig/article/details/39381479#L211" rel="#L211" style="color: rgb(102, 102, 102); text-decoration: none;"> 211</a> <a target=_blank id="L212" href="http://blog.csdn.net/coder_pig/article/details/39381479#L212" rel="#L212" style="color: rgb(102, 102, 102); text-decoration: none;"> 212</a> <a target=_blank id="L213" href="http://blog.csdn.net/coder_pig/article/details/39381479#L213" rel="#L213" style="color: rgb(102, 102, 102); text-decoration: none;"> 213</a> <a target=_blank id="L214" href="http://blog.csdn.net/coder_pig/article/details/39381479#L214" rel="#L214" style="color: rgb(102, 102, 102); text-decoration: none;"> 214</a> <a target=_blank id="L215" href="http://blog.csdn.net/coder_pig/article/details/39381479#L215" rel="#L215" style="color: rgb(102, 102, 102); text-decoration: none;"> 215</a> <a target=_blank id="L216" href="http://blog.csdn.net/coder_pig/article/details/39381479#L216" rel="#L216" style="color: rgb(102, 102, 102); text-decoration: none;"> 216</a> <a target=_blank id="L217" href="http://blog.csdn.net/coder_pig/article/details/39381479#L217" rel="#L217" style="color: rgb(102, 102, 102); text-decoration: none;"> 217</a> <a target=_blank id="L218" href="http://blog.csdn.net/coder_pig/article/details/39381479#L218" rel="#L218" style="color: rgb(102, 102, 102); text-decoration: none;"> 218</a> <a target=_blank id="L219" href="http://blog.csdn.net/coder_pig/article/details/39381479#L219" rel="#L219" style="color: rgb(102, 102, 102); text-decoration: none;"> 219</a> <a target=_blank id="L220" href="http://blog.csdn.net/coder_pig/article/details/39381479#L220" rel="#L220" style="color: rgb(102, 102, 102); text-decoration: none;"> 220</a> <a target=_blank id="L221" href="http://blog.csdn.net/coder_pig/article/details/39381479#L221" rel="#L221" style="color: rgb(102, 102, 102); text-decoration: none;"> 221</a> <a target=_blank id="L222" href="http://blog.csdn.net/coder_pig/article/details/39381479#L222" rel="#L222" style="color: rgb(102, 102, 102); text-decoration: none;"> 222</a> <a target=_blank id="L223" href="http://blog.csdn.net/coder_pig/article/details/39381479#L223" rel="#L223" style="color: rgb(102, 102, 102); text-decoration: none;"> 223</a> <a target=_blank id="L224" href="http://blog.csdn.net/coder_pig/article/details/39381479#L224" rel="#L224" style="color: rgb(102, 102, 102); text-decoration: none;"> 224</a> <a target=_blank id="L225" href="http://blog.csdn.net/coder_pig/article/details/39381479#L225" rel="#L225" style="color: rgb(102, 102, 102); text-decoration: none;"> 225</a> <a target=_blank id="L226" href="http://blog.csdn.net/coder_pig/article/details/39381479#L226" rel="#L226" style="color: rgb(102, 102, 102); text-decoration: none;"> 226</a> <a target=_blank id="L227" href="http://blog.csdn.net/coder_pig/article/details/39381479#L227" rel="#L227" style="color: rgb(102, 102, 102); text-decoration: none;"> 227</a> <a target=_blank id="L228" href="http://blog.csdn.net/coder_pig/article/details/39381479#L228" rel="#L228" style="color: rgb(102, 102, 102); text-decoration: none;"> 228</a> <a target=_blank id="L229" href="http://blog.csdn.net/coder_pig/article/details/39381479#L229" rel="#L229" style="color: rgb(102, 102, 102); text-decoration: none;"> 229</a> <a target=_blank id="L230" href="http://blog.csdn.net/coder_pig/article/details/39381479#L230" rel="#L230" style="color: rgb(102, 102, 102); text-decoration: none;"> 230</a> <a target=_blank id="L231" href="http://blog.csdn.net/coder_pig/article/details/39381479#L231" rel="#L231" style="color: rgb(102, 102, 102); text-decoration: none;"> 231</a> <a target=_blank id="L232" href="http://blog.csdn.net/coder_pig/article/details/39381479#L232" rel="#L232" style="color: rgb(102, 102, 102); text-decoration: none;"> 232</a> <a target=_blank id="L233" href="http://blog.csdn.net/coder_pig/article/details/39381479#L233" rel="#L233" style="color: rgb(102, 102, 102); text-decoration: none;"> 233</a> <a target=_blank id="L234" href="http://blog.csdn.net/coder_pig/article/details/39381479#L234" rel="#L234" style="color: rgb(102, 102, 102); text-decoration: none;"> 234</a> <a target=_blank id="L235" href="http://blog.csdn.net/coder_pig/article/details/39381479#L235" rel="#L235" style="color: rgb(102, 102, 102); text-decoration: none;"> 235</a> <a target=_blank id="L236" href="http://blog.csdn.net/coder_pig/article/details/39381479#L236" rel="#L236" style="color: rgb(102, 102, 102); text-decoration: none;"> 236</a> <a target=_blank id="L237" href="http://blog.csdn.net/coder_pig/article/details/39381479#L237" rel="#L237" style="color: rgb(102, 102, 102); text-decoration: none;"> 237</a> <a target=_blank id="L238" href="http://blog.csdn.net/coder_pig/article/details/39381479#L238" rel="#L238" style="color: rgb(102, 102, 102); text-decoration: none;"> 238</a> <a target=_blank id="L239" href="http://blog.csdn.net/coder_pig/article/details/39381479#L239" rel="#L239" style="color: rgb(102, 102, 102); text-decoration: none;"> 239</a> <a target=_blank id="L240" href="http://blog.csdn.net/coder_pig/article/details/39381479#L240" rel="#L240" style="color: rgb(102, 102, 102); text-decoration: none;"> 240</a> <a target=_blank id="L241" href="http://blog.csdn.net/coder_pig/article/details/39381479#L241" rel="#L241" style="color: rgb(102, 102, 102); text-decoration: none;"> 241</a> <a target=_blank id="L242" href="http://blog.csdn.net/coder_pig/article/details/39381479#L242" rel="#L242" style="color: rgb(102, 102, 102); text-decoration: none;"> 242</a> <a target=_blank id="L243" href="http://blog.csdn.net/coder_pig/article/details/39381479#L243" rel="#L243" style="color: rgb(102, 102, 102); text-decoration: none;"> 243</a> <a target=_blank id="L244" href="http://blog.csdn.net/coder_pig/article/details/39381479#L244" rel="#L244" style="color: rgb(102, 102, 102); text-decoration: none;"> 244</a> <a target=_blank id="L245" href="http://blog.csdn.net/coder_pig/article/details/39381479#L245" rel="#L245" style="color: rgb(102, 102, 102); text-decoration: none;"> 245</a> <a target=_blank id="L246" href="http://blog.csdn.net/coder_pig/article/details/39381479#L246" rel="#L246" style="color: rgb(102, 102, 102); text-decoration: none;"> 246</a> <a target=_blank id="L247" href="http://blog.csdn.net/coder_pig/article/details/39381479#L247" rel="#L247" style="color: rgb(102, 102, 102); text-decoration: none;"> 247</a> <a target=_blank id="L248" href="http://blog.csdn.net/coder_pig/article/details/39381479#L248" rel="#L248" style="color: rgb(102, 102, 102); text-decoration: none;"> 248</a> <a target=_blank id="L249" href="http://blog.csdn.net/coder_pig/article/details/39381479#L249" rel="#L249" style="color: rgb(102, 102, 102); text-decoration: none;"> 249</a> <a target=_blank id="L250" href="http://blog.csdn.net/coder_pig/article/details/39381479#L250" rel="#L250" style="color: rgb(102, 102, 102); text-decoration: none;"> 250</a> <a target=_blank id="L251" href="http://blog.csdn.net/coder_pig/article/details/39381479#L251" rel="#L251" style="color: rgb(102, 102, 102); text-decoration: none;"> 251</a> <a target=_blank id="L252" href="http://blog.csdn.net/coder_pig/article/details/39381479#L252" rel="#L252" style="color: rgb(102, 102, 102); text-decoration: none;"> 252</a> <a target=_blank id="L253" href="http://blog.csdn.net/coder_pig/article/details/39381479#L253" rel="#L253" style="color: rgb(102, 102, 102); text-decoration: none;"> 253</a> <a target=_blank id="L254" href="http://blog.csdn.net/coder_pig/article/details/39381479#L254" rel="#L254" style="color: rgb(102, 102, 102); text-decoration: none;"> 254</a> <a target=_blank id="L255" href="http://blog.csdn.net/coder_pig/article/details/39381479#L255" rel="#L255" style="color: rgb(102, 102, 102); text-decoration: none;"> 255</a> <a target=_blank id="L256" href="http://blog.csdn.net/coder_pig/article/details/39381479#L256" rel="#L256" style="color: rgb(102, 102, 102); text-decoration: none;"> 256</a> <a target=_blank id="L257" href="http://blog.csdn.net/coder_pig/article/details/39381479#L257" rel="#L257" style="color: rgb(102, 102, 102); text-decoration: none;"> 257</a> <a target=_blank id="L258" href="http://blog.csdn.net/coder_pig/article/details/39381479#L258" rel="#L258" style="color: rgb(102, 102, 102); text-decoration: none;"> 258</a> <a target=_blank id="L259" href="http://blog.csdn.net/coder_pig/article/details/39381479#L259" rel="#L259" style="color: rgb(102, 102, 102); text-decoration: none;"> 259</a> |
来自CODE的代码片
SocketHttpRequester.java
实现代码解析:Android使用http协议上传mp3
Android平台调用WebService
WebService的简单介绍:
ps:如果上面看完还是对WebService不是很了解的话,就算了,笔者没弄过WebService,所以也不知道!
而现在我们要做的不是去讨论如果去搭建一个WebService,我们要做的是去获得WebService提供的服务!
然后解析返回的xml数据,把这些数据显示到安卓手机上,简单的小例子如:输入手机号码,获取手机归属地;
查询某地的天气预报,快递单号查询等!
那么我们要怎么去获得这些服务呢?
首先我们去找到提供webService的一些网站:(笔者知道的有以下这两个,如果有免费的站点,欢迎提出)
①WebXML:http://www.webxml.com.cn/zh_cn/web_services.aspx
也是使用得最多的一个WebService站点,貌似以前是免费的,不过都商业化了,当然是可以试用!不过次数有限!
该网站上提供了16个不同的web服务,可以按照自己的需求,查询自己需要的服务,调用不同的接口即可!
相关使用次数:
②云聚36wu:http://www.36wu.com/Service
同样也提供了很多的服务,很多手机的app都是用的这里的接口,比如彩虹公交,手机天气等
不过,这个也是要收费的=-=,可以试用,不过只能一小时内发送20次请求;
点击申请使用,获得key就可以了!两者随便选一个吧!鉴于笔者是学生狗,没什么收入来源,
后期可能会研究下如何搭建自己的WebService,毕竟现在有那么多云平台!敬请期待
好了,有了获取服务的站点后,接着就要开始我们app的开发了,由于篇幅关系,这里就简单的演示
下查询号码归属地和天气情况的流程吧,其他的以后根据需求再进行研究!
使用示例:根据手机号码获得归属地与天气情况
step 1:下载第三方jar包:ksoap2 Android:
首先如果想在Android平台上调用WebService需要依赖于第三方类库:ksoap2
而在Android平台上,使用的是ksoap2 Android,一个高效,轻量级的SOAP开发包!
jar包下载地址:https://code.google.com/p/ksoap2-android/wiki/HowToUse?tm=2
鉴于是google的网站,天朝墙了,可能上不去,这里给出百度云的下载链接:
备用胎:3.30版本:http://pan.baidu.com/s/1i3sZksl
2.54版本:http://pan.baidu.com/s/1jGoTyQi
如果所幸你能进入jar包的下载地址的话,那么你会看到下面的界面:
step 2:记录相关参数:
在开始实际操作之前,我们先要从WebService获取一些信息:分别是:NameSpace(命名空间),SoapAction以及URL
URL就不用说了,其他参数这样找:
然后就可以获取我们需要的SoapAction和namespace了
好了,先把这两个mark下来,接着要测试下自己所在地区的地区码了,在theCityCode:输入所在的城市
下面的id可以不填,因为我们用的是免费用户,接着到达下一个界面,可以看到:
同样的,我们还要做一个号码归属地查询的,所以还要获取号码查询的Service的SoapAction与命名控件:
step 3:开始我们代码的编写了:
效果图:
源码下载:WebService的使用demo
工程核心解析:
一.记得把Android soap2的jar包导入到工程中!不然会提示相关类找不到的!
二.核心代码的编写:
①获取号码所属地的Activity
<a target=_blank id="L1" href="http://blog.csdn.net/coder_pig/article/details/39381479#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/coder_pig/article/details/39381479#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/coder_pig/article/details/39381479#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/coder_pig/article/details/39381479#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/coder_pig/article/details/39381479#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/coder_pig/article/details/39381479#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/coder_pig/article/details/39381479#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> <a target=_blank id="L8" href="http://blog.csdn.net/coder_pig/article/details/39381479#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;"> 8</a> <a target=_blank id="L9" href="http://blog.csdn.net/coder_pig/article/details/39381479#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;"> 9</a> <a target=_blank id="L10" href="http://blog.csdn.net/coder_pig/article/details/39381479#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a> <a target=_blank id="L11" href="http://blog.csdn.net/coder_pig/article/details/39381479#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a> <a target=_blank id="L12" href="http://blog.csdn.net/coder_pig/article/details/39381479#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a> <a target=_blank id="L13" href="http://blog.csdn.net/coder_pig/article/details/39381479#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a> <a target=_blank id="L14" href="http://blog.csdn.net/coder_pig/article/details/39381479#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a> <a target=_blank id="L15" href="http://blog.csdn.net/coder_pig/article/details/39381479#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a> <a target=_blank id="L16" href="http://blog.csdn.net/coder_pig/article/details/39381479#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a> <a target=_blank id="L17" href="http://blog.csdn.net/coder_pig/article/details/39381479#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a> <a target=_blank id="L18" href="http://blog.csdn.net/coder_pig/article/details/39381479#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a> <a target=_blank id="L19" href="http://blog.csdn.net/coder_pig/article/details/39381479#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a> <a target=_blank id="L20" href="http://blog.csdn.net/coder_pig/article/details/39381479#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a> <a target=_blank id="L21" href="http://blog.csdn.net/coder_pig/article/details/39381479#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a> <a target=_blank id="L22" href="http://blog.csdn.net/coder_pig/article/details/39381479#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a> <a target=_blank id="L23" href="http://blog.csdn.net/coder_pig/article/details/39381479#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a> <a target=_blank id="L24" href="http://blog.csdn.net/coder_pig/article/details/39381479#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a> <a target=_blank id="L25" href="http://blog.csdn.net/coder_pig/article/details/39381479#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a> <a target=_blank id="L26" href="http://blog.csdn.net/coder_pig/article/details/39381479#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a> <a target=_blank id="L27" href="http://blog.csdn.net/coder_pig/article/details/39381479#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a> <a target=_blank id="L28" href="http://blog.csdn.net/coder_pig/article/details/39381479#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a> <a target=_blank id="L29" href="http://blog.csdn.net/coder_pig/article/details/39381479#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a> <a target=_blank id="L30" href="http://blog.csdn.net/coder_pig/article/details/39381479#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a> <a target=_blank id="L31" href="http://blog.csdn.net/coder_pig/article/details/39381479#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a> <a target=_blank id="L32" href="http://blog.csdn.net/coder_pig/article/details/39381479#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a> <a target=_blank id="L33" href="http://blog.csdn.net/coder_pig/article/details/39381479#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a> <a target=_blank id="L34" href="http://blog.csdn.net/coder_pig/article/details/39381479#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a> <a target=_blank id="L35" href="http://blog.csdn.net/coder_pig/article/details/39381479#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a> <a target=_blank id="L36" href="http://blog.csdn.net/coder_pig/article/details/39381479#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a> <a target=_blank id="L37" href="http://blog.csdn.net/coder_pig/article/details/39381479#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a> <a target=_blank id="L38" href="http://blog.csdn.net/coder_pig/article/details/39381479#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a> <a target=_blank id="L39" href="http://blog.csdn.net/coder_pig/article/details/39381479#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a> <a target=_blank id="L40" href="http://blog.csdn.net/coder_pig/article/details/39381479#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a> <a target=_blank id="L41" href="http://blog.csdn.net/coder_pig/article/details/39381479#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a> <a target=_blank id="L42" href="http://blog.csdn.net/coder_pig/article/details/39381479#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a> <a target=_blank id="L43" href="http://blog.csdn.net/coder_pig/article/details/39381479#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a> <a target=_blank id="L44" href="http://blog.csdn.net/coder_pig/article/details/39381479#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a> <a target=_blank id="L45" href="http://blog.csdn.net/coder_pig/article/details/39381479#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a> <a target=_blank id="L46" href="http://blog.csdn.net/coder_pig/article/details/39381479#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a> <a target=_blank id="L47" href="http://blog.csdn.net/coder_pig/article/details/39381479#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a> <a target=_blank id="L48" href="http://blog.csdn.net/coder_pig/article/details/39381479#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a> <a target=_blank id="L49" href="http://blog.csdn.net/coder_pig/article/details/39381479#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a> <a target=_blank id="L50" href="http://blog.csdn.net/coder_pig/article/details/39381479#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a> <a target=_blank id="L51" href="http://blog.csdn.net/coder_pig/article/details/39381479#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a> <a target=_blank id="L52" href="http://blog.csdn.net/coder_pig/article/details/39381479#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a> <a target=_blank id="L53" href="http://blog.csdn.net/coder_pig/article/details/39381479#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a> <a target=_blank id="L54" href="http://blog.csdn.net/coder_pig/article/details/39381479#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a> <a target=_blank id="L55" href="http://blog.csdn.net/coder_pig/article/details/39381479#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a> <a target=_blank id="L56" href="http://blog.csdn.net/coder_pig/article/details/39381479#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a> <a target=_blank id="L57" href="http://blog.csdn.net/coder_pig/article/details/39381479#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a> <a target=_blank id="L58" href="http://blog.csdn.net/coder_pig/article/details/39381479#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a> <a target=_blank id="L59" href="http://blog.csdn.net/coder_pig/article/details/39381479#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a> <a target=_blank id="L60" href="http://blog.csdn.net/coder_pig/article/details/39381479#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a> <a target=_blank id="L61" href="http://blog.csdn.net/coder_pig/article/details/39381479#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a> <a target=_blank id="L62" href="http://blog.csdn.net/coder_pig/article/details/39381479#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a> <a target=_blank id="L63" href="http://blog.csdn.net/coder_pig/article/details/39381479#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a> <a target=_blank id="L64" href="http://blog.csdn.net/coder_pig/article/details/39381479#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a> <a target=_blank id="L65" href="http://blog.csdn.net/coder_pig/article/details/39381479#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a> <a target=_blank id="L66" href="http://blog.csdn.net/coder_pig/article/details/39381479#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a> <a target=_blank id="L67" href="http://blog.csdn.net/coder_pig/article/details/39381479#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a> <a target=_blank id="L68" href="http://blog.csdn.net/coder_pig/article/details/39381479#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a> <a target=_blank id="L69" href="http://blog.csdn.net/coder_pig/article/details/39381479#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a> <a target=_blank id="L70" href="http://blog.csdn.net/coder_pig/article/details/39381479#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a> <a target=_blank id="L71" href="http://blog.csdn.net/coder_pig/article/details/39381479#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a> <a target=_blank id="L72" href="http://blog.csdn.net/coder_pig/article/details/39381479#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a> <a target=_blank id="L73" href="http://blog.csdn.net/coder_pig/article/details/39381479#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a> <a target=_blank id="L74" href="http://blog.csdn.net/coder_pig/article/details/39381479#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;"> 74</a> <a target=_blank id="L75" href="http://blog.csdn.net/coder_pig/article/details/39381479#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;"> 75</a> <a target=_blank id="L76" href="http://blog.csdn.net/coder_pig/article/details/39381479#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;"> 76</a> <a target=_blank id="L77" href="http://blog.csdn.net/coder_pig/article/details/39381479#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;"> 77</a> <a target=_blank id="L78" href="http://blog.csdn.net/coder_pig/article/details/39381479#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;"> 78</a> <a target=_blank id="L79" href="http://blog.csdn.net/coder_pig/article/details/39381479#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;"> 79</a> <a target=_blank id="L80" href="http://blog.csdn.net/coder_pig/article/details/39381479#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;"> 80</a> <a target=_blank id="L81" href="http://blog.csdn.net/coder_pig/article/details/39381479#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;"> 81</a> <a target=_blank id="L82" href="http://blog.csdn.net/coder_pig/article/details/39381479#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;"> 82</a> <a target=_blank id="L83" href="http://blog.csdn.net/coder_pig/article/details/39381479#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;"> 83</a> <a target=_blank id="L84" href="http://blog.csdn.net/coder_pig/article/details/39381479#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;"> 84</a> <a target=_blank id="L85" href="http://blog.csdn.net/coder_pig/article/details/39381479#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;"> 85</a> <a target=_blank id="L86" href="http://blog.csdn.net/coder_pig/article/details/39381479#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;"> 86</a> <a target=_blank id="L87" href="http://blog.csdn.net/coder_pig/article/details/39381479#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;"> 87</a> <a target=_blank id="L88" href="http://blog.csdn.net/coder_pig/article/details/39381479#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;"> 88</a> <a target=_blank id="L89" href="http://blog.csdn.net/coder_pig/article/details/39381479#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;"> 89</a> <a target=_blank id="L90" href="http://blog.csdn.net/coder_pig/article/details/39381479#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;"> 90</a> <a target=_blank id="L91" href="http://blog.csdn.net/coder_pig/article/details/39381479#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;"> 91</a> <a target=_blank id="L92" href="http://blog.csdn.net/coder_pig/article/details/39381479#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;"> 92</a> <a target=_blank id="L93" href="http://blog.csdn.net/coder_pig/article/details/39381479#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;"> 93</a> <a target=_blank id="L94" href="http://blog.csdn.net/coder_pig/article/details/39381479#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;"> 94</a> <a target=_blank id="L95" href="http://blog.csdn.net/coder_pig/article/details/39381479#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;"> 95</a> <a target=_blank id="L96" href="http://blog.csdn.net/coder_pig/article/details/39381479#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;"> 96</a> <a target=_blank id="L97" href="http://blog.csdn.net/coder_pig/article/details/39381479#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;"> 97</a> <a target=_blank id="L98" href="http://blog.csdn.net/coder_pig/article/details/39381479#L98" rel="#L98" style="color: rgb(102, 102, 102); text-decoration: none;"> 98</a> <a target=_blank id="L99" href="http://blog.csdn.net/coder_pig/article/details/39381479#L99" rel="#L99" style="color: rgb(102, 102, 102); text-decoration: none;"> 99</a> |
来自CODE的代码片
NumberActivity.java
②获取某城市(这里是江门)的天气情况
<a target=_blank id="L1" href="http://blog.csdn.net/coder_pig/article/details/39381479#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/coder_pig/article/details/39381479#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/coder_pig/article/details/39381479#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/coder_pig/article/details/39381479#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/coder_pig/article/details/39381479#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/coder_pig/article/details/39381479#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/coder_pig/article/details/39381479#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> <a target=_blank id="L8" href="http://blog.csdn.net/coder_pig/article/details/39381479#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;"> 8</a> <a target=_blank id="L9" href="http://blog.csdn.net/coder_pig/article/details/39381479#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;"> 9</a> <a target=_blank id="L10" href="http://blog.csdn.net/coder_pig/article/details/39381479#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a> <a target=_blank id="L11" href="http://blog.csdn.net/coder_pig/article/details/39381479#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a> <a target=_blank id="L12" href="http://blog.csdn.net/coder_pig/article/details/39381479#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a> <a target=_blank id="L13" href="http://blog.csdn.net/coder_pig/article/details/39381479#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a> <a target=_blank id="L14" href="http://blog.csdn.net/coder_pig/article/details/39381479#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a> <a target=_blank id="L15" href="http://blog.csdn.net/coder_pig/article/details/39381479#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a> <a target=_blank id="L16" href="http://blog.csdn.net/coder_pig/article/details/39381479#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a> <a target=_blank id="L17" href="http://blog.csdn.net/coder_pig/article/details/39381479#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a> <a target=_blank id="L18" href="http://blog.csdn.net/coder_pig/article/details/39381479#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a> <a target=_blank id="L19" href="http://blog.csdn.net/coder_pig/article/details/39381479#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a> <a target=_blank id="L20" href="http://blog.csdn.net/coder_pig/article/details/39381479#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a> <a target=_blank id="L21" href="http://blog.csdn.net/coder_pig/article/details/39381479#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a> <a target=_blank id="L22" href="http://blog.csdn.net/coder_pig/article/details/39381479#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a> <a target=_blank id="L23" href="http://blog.csdn.net/coder_pig/article/details/39381479#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a> <a target=_blank id="L24" href="http://blog.csdn.net/coder_pig/article/details/39381479#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a> <a target=_blank id="L25" href="http://blog.csdn.net/coder_pig/article/details/39381479#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a> <a target=_blank id="L26" href="http://blog.csdn.net/coder_pig/article/details/39381479#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a> <a target=_blank id="L27" href="http://blog.csdn.net/coder_pig/article/details/39381479#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a> <a target=_blank id="L28" href="http://blog.csdn.net/coder_pig/article/details/39381479#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a> <a target=_blank id="L29" href="http://blog.csdn.net/coder_pig/article/details/39381479#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a> <a target=_blank id="L30" href="http://blog.csdn.net/coder_pig/article/details/39381479#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a> <a target=_blank id="L31" href="http://blog.csdn.net/coder_pig/article/details/39381479#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a> <a target=_blank id="L32" href="http://blog.csdn.net/coder_pig/article/details/39381479#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a> <a target=_blank id="L33" href="http://blog.csdn.net/coder_pig/article/details/39381479#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a> <a target=_blank id="L34" href="http://blog.csdn.net/coder_pig/article/details/39381479#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a> <a target=_blank id="L35" href="http://blog.csdn.net/coder_pig/article/details/39381479#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a> <a target=_blank id="L36" href="http://blog.csdn.net/coder_pig/article/details/39381479#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a> <a target=_blank id="L37" href="http://blog.csdn.net/coder_pig/article/details/39381479#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a> <a target=_blank id="L38" href="http://blog.csdn.net/coder_pig/article/details/39381479#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a> <a target=_blank id="L39" href="http://blog.csdn.net/coder_pig/article/details/39381479#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a> <a target=_blank id="L40" href="http://blog.csdn.net/coder_pig/article/details/39381479#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a> <a target=_blank id="L41" href="http://blog.csdn.net/coder_pig/article/details/39381479#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a> <a target=_blank id="L42" href="http://blog.csdn.net/coder_pig/article/details/39381479#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a> <a target=_blank id="L43" href="http://blog.csdn.net/coder_pig/article/details/39381479#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a> <a target=_blank id="L44" href="http://blog.csdn.net/coder_pig/article/details/39381479#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a> <a target=_blank id="L45" href="http://blog.csdn.net/coder_pig/article/details/39381479#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a> <a target=_blank id="L46" href="http://blog.csdn.net/coder_pig/article/details/39381479#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a> <a target=_blank id="L47" href="http://blog.csdn.net/coder_pig/article/details/39381479#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a> <a target=_blank id="L48" href="http://blog.csdn.net/coder_pig/article/details/39381479#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a> <a target=_blank id="L49" href="http://blog.csdn.net/coder_pig/article/details/39381479#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a> <a target=_blank id="L50" href="http://blog.csdn.net/coder_pig/article/details/39381479#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a> <a target=_blank id="L51" href="http://blog.csdn.net/coder_pig/article/details/39381479#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a> <a target=_blank id="L52" href="http://blog.csdn.net/coder_pig/article/details/39381479#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a> <a target=_blank id="L53" href="http://blog.csdn.net/coder_pig/article/details/39381479#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a> <a target=_blank id="L54" href="http://blog.csdn.net/coder_pig/article/details/39381479#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a> <a target=_blank id="L55" href="http://blog.csdn.net/coder_pig/article/details/39381479#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a> <a target=_blank id="L56" href="http://blog.csdn.net/coder_pig/article/details/39381479#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a> <a target=_blank id="L57" href="http://blog.csdn.net/coder_pig/article/details/39381479#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a> <a target=_blank id="L58" href="http://blog.csdn.net/coder_pig/article/details/39381479#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a> <a target=_blank id="L59" href="http://blog.csdn.net/coder_pig/article/details/39381479#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a> <a target=_blank id="L60" href="http://blog.csdn.net/coder_pig/article/details/39381479#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a> <a target=_blank id="L61" href="http://blog.csdn.net/coder_pig/article/details/39381479#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a> <a target=_blank id="L62" href="http://blog.csdn.net/coder_pig/article/details/39381479#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a> <a target=_blank id="L63" href="http://blog.csdn.net/coder_pig/article/details/39381479#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a> <a target=_blank id="L64" href="http://blog.csdn.net/coder_pig/article/details/39381479#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a> <a target=_blank id="L65" href="http://blog.csdn.net/coder_pig/article/details/39381479#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a> <a target=_blank id="L66" href="http://blog.csdn.net/coder_pig/article/details/39381479#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a> <a target=_blank id="L67" href="http://blog.csdn.net/coder_pig/article/details/39381479#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a> <a target=_blank id="L68" href="http://blog.csdn.net/coder_pig/article/details/39381479#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a> <a target=_blank id="L69" href="http://blog.csdn.net/coder_pig/article/details/39381479#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a> <a target=_blank id="L70" href="http://blog.csdn.net/coder_pig/article/details/39381479#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a> <a target=_blank id="L71" href="http://blog.csdn.net/coder_pig/article/details/39381479#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a> <a target=_blank id="L72" href="http://blog.csdn.net/coder_pig/article/details/39381479#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a> <a target=_blank id="L73" href="http://blog.csdn.net/coder_pig/article/details/39381479#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a> <a target=_blank id="L74" href="http://blog.csdn.net/coder_pig/article/details/39381479#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;"> 74</a> <a target=_blank id="L75" href="http://blog.csdn.net/coder_pig/article/details/39381479#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;"> 75</a> <a target=_blank id="L76" href="http://blog.csdn.net/coder_pig/article/details/39381479#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;"> 76</a> <a target=_blank id="L77" href="http://blog.csdn.net/coder_pig/article/details/39381479#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;"> 77</a> <a target=_blank id="L78" href="http://blog.csdn.net/coder_pig/article/details/39381479#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;"> 78</a> <a target=_blank id="L79" href="http://blog.csdn.net/coder_pig/article/details/39381479#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;"> 79</a> <a target=_blank id="L80" href="http://blog.csdn.net/coder_pig/article/details/39381479#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;"> 80</a> <a target=_blank id="L81" href="http://blog.csdn.net/coder_pig/article/details/39381479#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;"> 81</a> <a target=_blank id="L82" href="http://blog.csdn.net/coder_pig/article/details/39381479#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;"> 82</a> <a target=_blank id="L83" href="http://blog.csdn.net/coder_pig/article/details/39381479#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;"> 83</a> <a target=_blank id="L84" href="http://blog.csdn.net/coder_pig/article/details/39381479#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;"> 84</a> <a target=_blank id="L85" href="http://blog.csdn.net/coder_pig/article/details/39381479#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;"> 85</a> <a target=_blank id="L86" href="http://blog.csdn.net/coder_pig/article/details/39381479#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;"> 86</a> <a target=_blank id="L87" href="http://blog.csdn.net/coder_pig/article/details/39381479#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;"> 87</a> <a target=_blank id="L88" href="http://blog.csdn.net/coder_pig/article/details/39381479#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;"> 88</a> <a target=_blank id="L89" href="http://blog.csdn.net/coder_pig/article/details/39381479#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;"> 89</a> <a target=_blank id="L90" href="http://blog.csdn.net/coder_pig/article/details/39381479#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;"> 90</a> <a target=_blank id="L91" href="http://blog.csdn.net/coder_pig/article/details/39381479#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;"> 91</a> <a target=_blank id="L92" href="http://blog.csdn.net/coder_pig/article/details/39381479#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;"> 92</a> <a target=_blank id="L93" href="http://blog.csdn.net/coder_pig/article/details/39381479#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;"> 93</a> <a target=_blank id="L94" href="http://blog.csdn.net/coder_pig/article/details/39381479#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;"> 94</a> <a target=_blank id="L95" href="http://blog.csdn.net/coder_pig/article/details/39381479#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;"> 95</a> <a target=_blank id="L96" href="http://blog.csdn.net/coder_pig/article/details/39381479#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;"> 96</a> <a target=_blank id="L97" href="http://blog.csdn.net/coder_pig/article/details/39381479#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;"> 97</a> <a target=_blank id="L98" href="http://blog.csdn.net/coder_pig/article/details/39381479#L98" rel="#L98" style="color: rgb(102, 102, 102); text-decoration: none;"> 98</a> <a target=_blank id="L99" href="http://blog.csdn.net/coder_pig/article/details/39381479#L99" rel="#L99" style="color: rgb(102, 102, 102); text-decoration: none;"> 99</a> <a target=_blank id="L100" href="http://blog.csdn.net/coder_pig/article/details/39381479#L100" rel="#L100" style="color: rgb(102, 102, 102); text-decoration: none;"> 100</a> <a target=_blank id="L101" href="http://blog.csdn.net/coder_pig/article/details/39381479#L101" rel="#L101" style="color: rgb(102, 102, 102); text-decoration: none;"> 101</a> |
来自CODE的代码片
WetherActivity.java
ps:相信细心的朋友都会发现这里用了两个不同的webservice站点,一个是webxml一个是36wu;
其实呢一开始都是用的webxml,但是,笔者的运气真是背,刚好遇到了天气查询服务维护,
笔者即使使用申请使用id,也是返回"...现在不支持普通用户,...申请id",所以就用了36wu的!
其实都差不多,改起来也是比较简单的,根据站点的soap改下相关参数即可:
另外,别忘了,添加Internet权限哦!在AndroidManifest.xml文件中添加下述权限:
<uses-permission android:name="android.permission.INTERNET"/>
总结:
本文的内容还是比较多的,但是都不难,很多只要我们大概明白原理,然后到用的时候
知道怎么去改就可以了!笔者也写了几天才写完的!如果你能坚持看完的话,相信你会收获
很多,另外文章篇幅较长,希望读者可以耐心读完,写这么详细是想照顾一些和我一样的迷途
小菜鸟,望体谅,好了,本节就到这里!谢谢你们的支持另外,现在大部分的WebService站点
都是要收费的,笔者穷屌买不起会员,只能试用试用了,以后进公司就不用自己给钱了!
不过大牛说可以自己搭建个WebService服务器,以后有时间会尝试弄一个,然后把经验分享
给大家的,毕竟现在各种云,阿里云,腾讯云,搜狐云景...好了,最后贴下申请试用key的流程吧!
有兴趣的再看吧!
==============可以不看==================================================
附录:
一.webxml申请试用id:
注册账号
登陆账号,查看自己的key
点击我的web服务,可以看到相关的服务,这里笔者开通了天气查询的,试用五天:
这里的是要给钱的,所以说起其它的6个服务是免费的,比如我们的号码归属地查询...
接着我们来到weather服务那里,输入地区编码以及我们的key,就可以查询天气了:
噔噔噔,接着就可以看到信息了,我们就可以在我们的应用中解析这些数据了~!
二.36wu的key的申请与使用流程:
相比webxml就抠门很多了,人家起码可以使用5个服务,一个服务5天,5*5=25
而36wu的key只能用一天,也不能说扣吧,商家都要赚钱!一天就一天,也可以爽一下啦!
同样是需要申请key的
接着会收到一条短信=-=,把key复制下即可
接着同样来到wetherservice的界面:输入地区码和key
返回结果,接着就到我们的客户端进行处理了: