Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Showing with 16,798 additions and 0 deletions.
  1. 0  Android/README
  2. 0  HTML5SDK/README
  3. 0  MSSDK/README
  4. BIN  RESTFul/DC/.DS_Store
  5. +109 −0 RESTFul/DC/Csharp/app1/Default.aspx
  6. +585 −0 RESTFul/DC/Csharp/app1/Default.aspx.cs
  7. +80 −0 RESTFul/DC/Csharp/app1/README.txt
  8. +39 −0 RESTFul/DC/Csharp/app1/Web.config
  9. BIN  RESTFul/DC/Csharp/app1/images/att.gif
  10. +39 −0 RESTFul/DC/Csharp/app1/style/common.css
  11. BIN  RESTFul/DC/Java/.DS_Store
  12. BIN  RESTFul/DC/Java/app1/.DS_Store
  13. +213 −0 RESTFul/DC/Java/app1/DC.jsp
  14. +3 −0  RESTFul/DC/Java/app1/META-INF/MANIFEST.MF
  15. +81 −0 RESTFul/DC/Java/app1/README.txt
  16. BIN  RESTFul/DC/Java/app1/WEB-INF/.DS_Store
  17. BIN  RESTFul/DC/Java/app1/WEB-INF/lib/.DS_Store
  18. BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-codec-1.5.jar
  19. BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-httpclient-3.0.1.jar
  20. BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-io-1.4.jar
  21. BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-logging-1.1.1.jar
  22. BIN  RESTFul/DC/Java/app1/WEB-INF/lib/json-rpc-1.0.jar
  23. +5 −0 RESTFul/DC/Java/app1/config.jsp
  24. BIN  RESTFul/DC/Java/app1/images/att.gif
  25. +172 −0 RESTFul/DC/Java/app1/oauth.jsp
  26. +39 −0 RESTFul/DC/Java/app1/style/common.css
  27. BIN  RESTFul/DC/PHP/.DS_Store
  28. BIN  RESTFul/DC/PHP/app1/.DS_Store
  29. +69 −0 RESTFul/DC/PHP/app1/README.txt
  30. +39 −0 RESTFul/DC/PHP/app1/common.css
  31. +16 −0 RESTFul/DC/PHP/app1/config.php
  32. BIN  RESTFul/DC/PHP/app1/images/att.gif
  33. +275 −0 RESTFul/DC/PHP/app1/index.php
  34. BIN  RESTFul/DC/Ruby/.DS_Store
  35. BIN  RESTFul/DC/Ruby/app1/.DS_Store
  36. +112 −0 RESTFul/DC/Ruby/app1/README
  37. +52 −0 RESTFul/DC/Ruby/app1/common.rb
  38. +6 −0 RESTFul/DC/Ruby/app1/config.yml
  39. +80 −0 RESTFul/DC/Ruby/app1/dc.rb
  40. BIN  RESTFul/DC/Ruby/app1/public/images/att.gif
  41. +39 −0 RESTFul/DC/Ruby/app1/public/style/common.css
  42. +125 −0 RESTFul/DC/Ruby/app1/views/dc.erb
  43. +109 −0 RESTFul/DC/Vb/app1/Default.aspx
  44. +587 −0 RESTFul/DC/Vb/app1/Default.aspx.vb
  45. +80 −0 RESTFul/DC/Vb/app1/README.txt
  46. +39 −0 RESTFul/DC/Vb/app1/Web.config
  47. BIN  RESTFul/DC/Vb/app1/images/att.gif
  48. +39 −0 RESTFul/DC/Vb/app1/style/common.css
  49. +233 −0 RESTFul/MIM/Csharp/app1/Default.aspx
  50. +1,105 −0 RESTFul/MIM/Csharp/app1/Default.aspx.cs
  51. +35 −0 RESTFul/MIM/Csharp/app1/MSRestfulV2_1_CsharpMIMApp1.sln
  52. +102 −0 RESTFul/MIM/Csharp/app1/README.txt
  53. +37 −0 RESTFul/MIM/Csharp/app1/Web.config
  54. BIN  RESTFul/MIM/Csharp/app1/images/Thumbs.db
  55. BIN  RESTFul/MIM/Csharp/app1/images/att.gif
  56. +39 −0 RESTFul/MIM/Csharp/app1/style/common.css
  57. +3 −0  RESTFul/MIM/Java/app1/META-INF/MANIFEST.MF
  58. +531 −0 RESTFul/MIM/Java/app1/MIM.jsp
  59. +89 −0 RESTFul/MIM/Java/app1/README.txt
  60. BIN  RESTFul/MIM/Java/app1/WEB-INF/.DS_Store
  61. BIN  RESTFul/MIM/Java/app1/WEB-INF/classes/com/att/rest/HttpMethod.class
  62. +11 −0 RESTFul/MIM/Java/app1/WEB-INF/classes/com/att/rest/HttpMethod.java
  63. BIN  RESTFul/MIM/Java/app1/WEB-INF/classes/com/att/rest/RestClient.class
  64. +157 −0 RESTFul/MIM/Java/app1/WEB-INF/classes/com/att/rest/RestClient.java
  65. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/.DS_Store
  66. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-benchmark-0.7.2-javadoc.jar
  67. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-benchmark-0.7.2-sources.jar
  68. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-benchmark-0.7.2.jar
  69. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-core-0.7.2-javadoc.jar
  70. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-core-0.7.2-sources.jar
  71. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-core-0.7.2-tests.jar
  72. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-core-0.7.2.jar
  73. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-dom-0.7.2-javadoc.jar
  74. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-dom-0.7.2-sources.jar
  75. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-dom-0.7.2.jar
  76. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-examples-0.7.2-javadoc.jar
  77. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-examples-0.7.2-sources.jar
  78. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-examples-0.7.2.jar
  79. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-storage-0.7.2-javadoc.jar
  80. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-storage-0.7.2-sources.jar
  81. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-storage-0.7.2-tests.jar
  82. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/apache-mime4j-storage-0.7.2.jar
  83. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/commons-codec-1.4.jar
  84. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/commons-codec-1.5.jar
  85. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/commons-fileupload-1.2.2.jar
  86. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/commons-httpclient-3.0.1.jar
  87. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/commons-io-1.4.jar
  88. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/commons-io-2.3.jar
  89. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/commons-logging-1.1.1.jar
  90. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/httpclient-4.1.2.jar
  91. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/httpclient-cache-4.1.2.jar
  92. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/httpcore-4.1.2.jar
  93. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/httpcore-4.2.1.jar
  94. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/httpcore-ab-4.2.1.jar
  95. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/httpcore-nio-4.2.1.jar
  96. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/httpmime-4.1.2.jar
  97. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/jersey-client.jar
  98. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/jersey-core.jar
  99. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/jersey-multipart.jar
  100. BIN  RESTFul/MIM/Java/app1/WEB-INF/lib/json-rpc-1.0.jar
  101. +14 −0 RESTFul/MIM/Java/app1/config.jsp
  102. BIN  RESTFul/MIM/Java/app1/images/.DS_Store
  103. BIN  RESTFul/MIM/Java/app1/images/att.gif
  104. +172 −0 RESTFul/MIM/Java/app1/oauth.jsp
  105. +39 −0 RESTFul/MIM/Java/app1/style/common.css
  106. +96 −0 RESTFul/MIM/PHP/app1/README.txt
  107. +14 −0 RESTFul/MIM/PHP/app1/config.php
  108. +41 −0 RESTFul/MIM/PHP/app1/images/.svn/entries
  109. +1 −0  RESTFul/MIM/PHP/app1/images/.svn/format
  110. +5 −0 RESTFul/MIM/PHP/app1/images/.svn/prop-base/att.gif.svn-base
  111. BIN  RESTFul/MIM/PHP/app1/images/.svn/text-base/att.gif.svn-base
  112. BIN  RESTFul/MIM/PHP/app1/images/att.gif
  113. +531 −0 RESTFul/MIM/PHP/app1/index.php
  114. +40 −0 RESTFul/MIM/PHP/app1/style/.svn/entries
  115. +1 −0  RESTFul/MIM/PHP/app1/style/.svn/format
  116. +39 −0 RESTFul/MIM/PHP/app1/style/.svn/text-base/common.css.svn-base
  117. +39 −0 RESTFul/MIM/PHP/app1/style/common.css
  118. +117 −0 RESTFul/MIM/Ruby/app1/README
  119. +62 −0 RESTFul/MIM/Ruby/app1/common.rb
  120. +5 −0 RESTFul/MIM/Ruby/app1/config.yml
  121. +113 −0 RESTFul/MIM/Ruby/app1/mim.rb
  122. BIN  RESTFul/MIM/Ruby/app1/public/images/att.gif
  123. +39 −0 RESTFul/MIM/Ruby/app1/public/style/common.css
  124. +342 −0 RESTFul/MIM/Ruby/app1/views/mim.erb
  125. +232 −0 RESTFul/MIM/Vb/app1/Default.aspx
  126. +1,050 −0 RESTFul/MIM/Vb/app1/Default.aspx.vb
  127. +35 −0 RESTFul/MIM/Vb/app1/MSRestfulV2_1_VbMIMApp1.sln
  128. +102 −0 RESTFul/MIM/Vb/app1/README.txt
  129. +37 −0 RESTFul/MIM/Vb/app1/Web.config
  130. BIN  RESTFul/MIM/Vb/app1/images/Thumbs.db
  131. BIN  RESTFul/MIM/Vb/app1/images/att.gif
  132. +39 −0 RESTFul/MIM/Vb/app1/style/common.css
  133. BIN  RESTFul/MMS/.DS_Store
  134. +191 −0 RESTFul/MMS/Csharp/app1/Default.aspx
  135. +1,173 −0 RESTFul/MMS/Csharp/app1/Default.aspx.cs
  136. +35 −0 RESTFul/MMS/Csharp/app1/MSRestfulV2_1_CsharpMMSApp1.sln
  137. +109 −0 RESTFul/MMS/Csharp/app1/README.txt
  138. +46 −0 RESTFul/MMS/Csharp/app1/Web.config
  139. BIN  RESTFul/MMS/Csharp/app1/images/Thumbs.db
  140. BIN  RESTFul/MMS/Csharp/app1/images/att.gif
  141. +39 −0 RESTFul/MMS/Csharp/app1/style/common.css
  142. +159 −0 RESTFul/MMS/Csharp/app2/Default.aspx
  143. +1,120 −0 RESTFul/MMS/Csharp/app2/Default.aspx.cs
  144. +35 −0 RESTFul/MMS/Csharp/app2/MSRestfulV2_1_CsharpMMSApp2.sln
  145. +129 −0 RESTFul/MMS/Csharp/app2/README.txt
  146. +69 −0 RESTFul/MMS/Csharp/app2/Web.config
  147. BIN  RESTFul/MMS/Csharp/app2/coupon_info/coupon.jpg
  148. +1 −0  RESTFul/MMS/Csharp/app2/coupon_info/message.txt
  149. 0  RESTFul/MMS/Csharp/app2/coupon_info/phone.txt
  150. BIN  RESTFul/MMS/Csharp/app2/images/Thumbs.db
  151. BIN  RESTFul/MMS/Csharp/app2/images/att.gif
  152. +39 −0 RESTFul/MMS/Csharp/app2/style/common.css
  153. +92 −0 RESTFul/MMS/Csharp/app3/Default.aspx
  154. +194 −0 RESTFul/MMS/Csharp/app3/Default.aspx.cs
  155. +23 −0 RESTFul/MMS/Csharp/app3/Listener.aspx
  156. +85 −0 RESTFul/MMS/Csharp/app3/Listener.aspx.cs
  157. +35 −0 RESTFul/MMS/Csharp/app3/MSRestfulV2_1_CsharpMMSApp3.sln
  158. +96 −0 RESTFul/MMS/Csharp/app3/README.txt
  159. +28 −0 RESTFul/MMS/Csharp/app3/Web.config
  160. BIN  RESTFul/MMS/Csharp/app3/images/Thumbs.db
  161. BIN  RESTFul/MMS/Csharp/app3/images/att.gif
  162. +39 −0 RESTFul/MMS/Csharp/app3/style/common.css
  163. BIN  RESTFul/MMS/Java/.DS_Store
  164. BIN  RESTFul/MMS/Java/app1/.DS_Store
  165. +3 −0  RESTFul/MMS/Java/app1/META-INF/MANIFEST.MF
  166. +410 −0 RESTFul/MMS/Java/app1/MMS.jsp
  167. +13 −0 RESTFul/MMS/Java/app1/OauthStorage.jsp
  168. +84 −0 RESTFul/MMS/Java/app1/README.txt
  169. BIN  RESTFul/MMS/Java/app1/WEB-INF/.DS_Store
  170. BIN  RESTFul/MMS/Java/app1/WEB-INF/classes/com/att/rest/HttpMethod.class
  171. +11 −0 RESTFul/MMS/Java/app1/WEB-INF/classes/com/att/rest/HttpMethod.java
  172. BIN  RESTFul/MMS/Java/app1/WEB-INF/classes/com/att/rest/RestClient.class
  173. +157 −0 RESTFul/MMS/Java/app1/WEB-INF/classes/com/att/rest/RestClient.java
  174. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/.DS_Store
  175. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/commons-codec-1.5.jar
  176. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/commons-fileupload-1.2.2.jar
  177. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/commons-httpclient-3.0.1.jar
  178. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/commons-io-1.4.jar
  179. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/commons-logging-1.1.1.jar
  180. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/jersey-client.jar
  181. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/jersey-core.jar
  182. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/jersey-multipart.jar
  183. BIN  RESTFul/MMS/Java/app1/WEB-INF/lib/json-rpc-1.0.jar
  184. +13 −0 RESTFul/MMS/Java/app1/config.jsp
  185. +78 −0 RESTFul/MMS/Java/app1/getToken.jsp
  186. BIN  RESTFul/MMS/Java/app1/images/.DS_Store
  187. BIN  RESTFul/MMS/Java/app1/images/att.gif
  188. +39 −0 RESTFul/MMS/Java/app1/style/common.css
  189. BIN  RESTFul/MMS/Java/app2/.DS_Store
  190. +3 −0  RESTFul/MMS/Java/app2/META-INF/MANIFEST.MF
  191. +342 −0 RESTFul/MMS/Java/app2/MMS2.jsp
  192. +13 −0 RESTFul/MMS/Java/app2/OauthStorage.jsp
  193. +83 −0 RESTFul/MMS/Java/app2/README.txt
  194. BIN  RESTFul/MMS/Java/app2/WEB-INF/.DS_Store
  195. BIN  RESTFul/MMS/Java/app2/WEB-INF/classes/com/att/rest/HttpMethod.class
  196. +11 −0 RESTFul/MMS/Java/app2/WEB-INF/classes/com/att/rest/HttpMethod.java
  197. BIN  RESTFul/MMS/Java/app2/WEB-INF/classes/com/att/rest/RestClient.class
  198. +157 −0 RESTFul/MMS/Java/app2/WEB-INF/classes/com/att/rest/RestClient.java
  199. BIN  RESTFul/MMS/Java/app2/WEB-INF/coupon.jpg
  200. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/commons-codec-1.5.jar
  201. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/commons-fileupload-1.2.2.jar
  202. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/commons-httpclient-3.0.1.jar
  203. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/commons-io-1.4.jar
  204. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/commons-logging-1.1.1.jar
  205. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/jersey-client.jar
  206. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/jersey-core.jar
  207. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/jersey-multipart.jar
  208. BIN  RESTFul/MMS/Java/app2/WEB-INF/lib/json-rpc-1.0.jar
  209. +3 −0  RESTFul/MMS/Java/app2/WEB-INF/phones.txt
  210. +13 −0 RESTFul/MMS/Java/app2/config.jsp
  211. BIN  RESTFul/MMS/Java/app2/coupon.jpg
  212. +78 −0 RESTFul/MMS/Java/app2/getToken.jsp
  213. BIN  RESTFul/MMS/Java/app2/images/.DS_Store
  214. BIN  RESTFul/MMS/Java/app2/images/att.gif
  215. +1 −0  RESTFul/MMS/Java/app2/message.txt
  216. +1 −0  RESTFul/MMS/Java/app2/phones.txt
  217. +39 −0 RESTFul/MMS/Java/app2/style/common.css
  218. BIN  RESTFul/MMS/Java/app3/.DS_Store
  219. +3 −0  RESTFul/MMS/Java/app3/META-INF/MANIFEST.MF
  220. +109 −0 RESTFul/MMS/Java/app3/MMS3.jsp
  221. 0  RESTFul/MMS/Java/app3/MoMmsData/sample.jpg.txt
  222. BIN  RESTFul/MMS/Java/app3/MoMmsImages/sample.jpg
  223. +13 −0 RESTFul/MMS/Java/app3/OauthStorage.jsp
  224. +98 −0 RESTFul/MMS/Java/app3/README.txt
  225. BIN  RESTFul/MMS/Java/app3/WEB-INF/.DS_Store
  226. BIN  RESTFul/MMS/Java/app3/WEB-INF/lib/.DS_Store
  227. BIN  RESTFul/MMS/Java/app3/WEB-INF/lib/commons-codec-1.5.jar
  228. BIN  RESTFul/MMS/Java/app3/WEB-INF/lib/commons-fileupload-1.2.2.jar
  229. BIN  RESTFul/MMS/Java/app3/WEB-INF/lib/commons-httpclient-3.0.1.jar
  230. BIN  RESTFul/MMS/Java/app3/WEB-INF/lib/commons-io-1.4.jar
  231. BIN  RESTFul/MMS/Java/app3/WEB-INF/lib/commons-logging-1.1.1.jar
  232. BIN  RESTFul/MMS/Java/app3/WEB-INF/lib/json-rpc-1.0.jar
  233. +14 −0 RESTFul/MMS/Java/app3/config.jsp
  234. +47 −0 RESTFul/MMS/Java/app3/getImageData.jsp
  235. BIN  RESTFul/MMS/Java/app3/images/att.gif
  236. +77 −0 RESTFul/MMS/Java/app3/mmslistener.jsp
  237. +39 −0 RESTFul/MMS/Java/app3/style/common.css
  238. BIN  RESTFul/MMS/PHP/.DS_Store
  239. BIN  RESTFul/MMS/PHP/app1/.DS_Store
  240. +67 −0 RESTFul/MMS/PHP/app1/README.txt
  241. +39 −0 RESTFul/MMS/PHP/app1/common.css
  242. +18 −0 RESTFul/MMS/PHP/app1/config.php
  243. BIN  RESTFul/MMS/PHP/app1/images/att.gif
  244. +528 −0 RESTFul/MMS/PHP/app1/index.php
  245. BIN  RESTFul/MMS/PHP/app2/.DS_Store
  246. +72 −0 RESTFul/MMS/PHP/app2/README.txt
  247. +39 −0 RESTFul/MMS/PHP/app2/common.css
  248. +16 −0 RESTFul/MMS/PHP/app2/config.php
  249. BIN  RESTFul/MMS/PHP/app2/coupon.jpg
  250. BIN  RESTFul/MMS/PHP/app2/images/att.gif
  251. +536 −0 RESTFul/MMS/PHP/app2/index.php
  252. BIN  RESTFul/MMS/PHP/app3/.DS_Store
  253. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/0/0.smil
  254. BIN  RESTFul/MMS/PHP/app3/MoMessages/0/IMG_2500.png
  255. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/0/text_0002.txt
  256. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/1/0.smil
  257. BIN  RESTFul/MMS/PHP/app3/MoMessages/1/IMG_2500.png
  258. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/1/text_0002.txt
  259. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/2/0.smil
  260. BIN  RESTFul/MMS/PHP/app3/MoMessages/2/IMG_2500.png
  261. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/2/text_0002.txt
  262. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/3/0.smil
  263. BIN  RESTFul/MMS/PHP/app3/MoMessages/3/IMG_2500.png
  264. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/3/text_0002.txt
  265. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/4/0.smil
  266. BIN  RESTFul/MMS/PHP/app3/MoMessages/4/IMG_2500.png
  267. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/4/text_0002.txt
  268. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/5/0.smil
  269. BIN  RESTFul/MMS/PHP/app3/MoMessages/5/IMG_2500.png
  270. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/5/text_0002.txt
  271. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/6/0.smil
  272. BIN  RESTFul/MMS/PHP/app3/MoMessages/6/IMG_2500.png
  273. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/6/text_0002.txt
  274. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/7/0.smil
  275. BIN  RESTFul/MMS/PHP/app3/MoMessages/7/IMG_2500.png
  276. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/7/text_0002.txt
  277. +15 −0 RESTFul/MMS/PHP/app3/MoMessages/8/0.smil
  278. BIN  RESTFul/MMS/PHP/app3/MoMessages/8/IMG_2500.png
  279. +1 −0  RESTFul/MMS/PHP/app3/MoMessages/8/text_0002.txt
  280. 0  RESTFul/MMS/PHP/app3/MoMessages/mmslistner.db
  281. +61 −0 RESTFul/MMS/PHP/app3/README.txt
  282. +39 −0 RESTFul/MMS/PHP/app3/common.css
  283. +10 −0 RESTFul/MMS/PHP/app3/config.php
  284. +37 −0 RESTFul/MMS/PHP/app3/filed.php
  285. BIN  RESTFul/MMS/PHP/app3/images/att.gif
  286. +108 −0 RESTFul/MMS/PHP/app3/index.php
  287. +105 −0 RESTFul/MMS/PHP/app3/mmslistener.php
  288. BIN  RESTFul/MMS/Ruby/.DS_Store
  289. BIN  RESTFul/MMS/Ruby/app1/.DS_Store
  290. +118 −0 RESTFul/MMS/Ruby/app1/README
  291. +48 −0 RESTFul/MMS/Ruby/app1/common.rb
  292. +7 −0 RESTFul/MMS/Ruby/app1/config.yml
  293. +120 −0 RESTFul/MMS/Ruby/app1/mms.rb
  294. +39 −0 RESTFul/MMS/Ruby/app1/public/css/common.css
  295. BIN  RESTFul/MMS/Ruby/app1/public/images/att.gif
  296. +194 −0 RESTFul/MMS/Ruby/app1/views/mms.erb
  297. BIN  RESTFul/MMS/Ruby/app2/.DS_Store
  298. +120 −0 RESTFul/MMS/Ruby/app2/README
  299. +57 −0 RESTFul/MMS/Ruby/app2/common.rb
  300. +8 −0 RESTFul/MMS/Ruby/app2/config.yml
Sorry, we could not display the entire diff because too many files (964) changed.
View
0  Android/README
No changes.
View
0  HTML5SDK/README
No changes.
View
0  MSSDK/README
No changes.
View
BIN  RESTFul/DC/.DS_Store
Binary file not shown
View
109 RESTFul/DC/Csharp/app1/Default.aspx
@@ -0,0 +1,109 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
+ <title>AT&T Sample DC Application – Get Device Capabilities Application</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"/>
+ <link rel="stylesheet" type="text/css" href="../../style/common.css"/>
+ <style type="text/css">
+ .style1
+ {
+ font-style: normal;
+ font-variant: normal;
+ font-weight: bold;
+ font-size: 12px;
+ line-height: normal;
+ font-family: Arial, Sans-serif;
+ width: 92px;
+ }
+ </style>
+ </head>
+<body>
+<div id="container">
+<!-- open HEADER --><div id="header">
+<div>
+ <div id="hcLeft">Server Time:</div>
+ <div id="hcRight">
+ <asp:Label ID="serverTimeLabel" runat="server" Text="Label"></asp:Label>
+ </div>
+ </div>
+<div>
+ <div id="hcLeft">Client Time:</div>
+ <div id="hcRight">
+ <script language="JavaScript" type="text/javascript">
+ var myDate = new Date();
+ document.write(myDate);
+ </script>
+ </div>
+</div>
+<div>
+ <div id="hcLeft">User Agent:</div>
+ <div id="hcRight">
+ <script language="JavaScript" type="text/javascript">
+ document.write("" + navigator.userAgent);
+ </script>
+ </div>
+</div>
+
+<br clear="all" />
+</div><!-- close HEADER -->
+
+<div id="wrapper">
+<div id="content">
+
+<h1>AT&T Sample DC Application – Get Device Capabilities Application</h1>
+<h2>Feature 1: Get Device Capabilities</h2>
+
+</div>
+</div>
+<br clear="all" />
+<form id="form1" runat="server">
+<div id="navigation">
+<table border="0" width="100%">
+ <tbody>
+ <tr>
+ <td width="20%" valign="top" class="label">Phone:</td>
+ <td class="cell">
+ <asp:TextBox ID="dcPhoneNumberTextBox" runat="server" MaxLength="16"></asp:TextBox>
+ </td>
+ </tr>
+ </tbody></table>
+
+</div>
+<div id="extra">
+
+<table border="0" width="100%">
+ <tbody>
+ <tr>
+ <td class="cell">
+ <asp:Button ID="getDCCapabilities" runat="server"
+ Text="Get Device Capabilities" onclick="getDCCapabilities_Click" /></button>
+ </td>
+ </tr>
+ </tbody></table>
+
+</div>
+<br clear="all" />
+<div align="center">
+ <asp:Panel ID="dcPanel" runat="server" Font-Names="Calibri">
+ </asp:Panel>
+</div>
+<br clear="all" />
+</form>
+
+
+
+<div id="footer">
+
+ <div style="float: right; width: 20%; font-size: 9px; text-align: right">Powered by AT&amp;T Virtual Mobile</div>
+ <p>© 2011 AT&amp;T Intellectual Property. All rights reserved. <a href="http://developer.att.com/" target="_blank">http://developer.att.com</a>
+<br>
+The Application hosted on this site are working examples intended to be used for reference in creating products to consume AT&amp;T Services and not meant to be used as part of your product. The data in these pages is for test purposes only and intended only for use as a reference in how the services perform.
+<br>
+For download of tools and documentation, please go to <a href="https://devconnect-api.att.com/" target="_blank">https://devconnect-api.att.com</a>
+<br>
+For more information contact <a href="mailto:developer.support@att.com">developer.support@att.com</a>
+
+</div>
+</div>
+
+</body></html>
View
585 RESTFul/DC/Csharp/app1/Default.aspx.cs
@@ -0,0 +1,585 @@
+//Licensed by AT&T under 'Software Development Kit Tools Agreement.' September 2011
+//TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
+//Copyright 2011 AT&T Intellectual Property. All rights reserved. http://developer.att.com
+//For more information contact developer.support@att.com
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Net;
+using System.Configuration;
+using System.IO;
+using System.Xml;
+using System.Text;
+using System.Web.Script.Serialization;
+using System.Drawing;
+using System.Net.Security;
+using System.Security.Cryptography.X509Certificates;
+
+public partial class Default : System.Web.UI.Page
+{
+ string FQDN;
+ string api_key, secret_key, auth_code, access_token, authorize_redirect_uri, scope, expiryMilliSeconds, refresh_token, lastTokenTakenTime, refreshTokenExpiryTime;
+ Table getStatusTable;
+
+ /* This function reads access token related session variables to local variables */
+ public void readTokenSessionVariables()
+ {
+ if (Session["dc_session_access_token"] != null)
+ access_token = Session["dc_session_access_token"].ToString();
+ else
+ access_token = null;
+ if (Session["dc_session_expiryMilliSeconds"] != null)
+ expiryMilliSeconds = Session["dc_session_expiryMilliSeconds"].ToString();
+ else
+ expiryMilliSeconds = null;
+ if (Session["dc_session_refresh_token"] != null)
+ refresh_token = Session["dc_session_refresh_token"].ToString();
+ else
+ refresh_token = null;
+ if (Session["dc_session_lastTokenTakenTime"] != null)
+ lastTokenTakenTime = Session["dc_session_lastTokenTakenTime"].ToString();
+ else
+ lastTokenTakenTime = null;
+ if (Session["dc_session_refreshTokenExpiryTime"] != null)
+ refreshTokenExpiryTime = Session["dc_session_refreshTokenExpiryTime"].ToString();
+ else
+ refreshTokenExpiryTime = null;
+ }
+
+ /* This function resets access token related session variable to null */
+ public void resetTokenSessionVariables()
+ {
+ Session["dc_session_access_token"] = null;
+ Session["dc_session_expiryMilliSeconds"] = null;
+ Session["dc_session_refresh_token"] = null;
+ Session["dc_session_lastTokenTakenTime"] = null;
+ Session["dc_session_refreshTokenExpiryTime"] = null;
+ }
+ /* This function resets access token related variable to null */
+ public void resetTokenVariables()
+ {
+ access_token = null;
+ expiryMilliSeconds = null;
+ refresh_token = null;
+ lastTokenTakenTime = null;
+ refreshTokenExpiryTime = null;
+ }
+
+ /* This function validates access token related variables and returns VALID_ACCESS_TOKEN if its valid
+ * otherwise, returns INVALID_ACCESS_TOKEN if refresh token expired or not able to read session variables
+ * return REFRESH_TOKEN, if access token in expired and refresh token is valid
+ */
+ public string isTokenValid()
+ {
+ try
+ {
+ if (Session["dc_session_access_token"] == null)
+ return "INVALID_ACCESS_TOKEN";
+ DateTime currentServerTime = DateTime.UtcNow.ToLocalTime();
+ DateTime lastRefreshTokenTime = DateTime.Parse(refreshTokenExpiryTime);
+ TimeSpan refreshSpan = currentServerTime.Subtract(lastRefreshTokenTime);
+ if (currentServerTime >= lastRefreshTokenTime)
+ {
+ return "INVALID_ACCESS_TOKEN";
+ }
+ DateTime lastTokenTime = DateTime.Parse(lastTokenTakenTime);
+ TimeSpan tokenSpan = currentServerTime.Subtract(lastTokenTime);
+ if (((tokenSpan.TotalSeconds)) > Convert.ToInt32(expiryMilliSeconds))
+ {
+ return "REFRESH_TOKEN";
+ }
+ else
+ {
+ return "VALID_ACCESS_TOKEN";
+ }
+ }
+ catch (Exception ex)
+ {
+ return "INVALID_ACCESS_TOKEN";
+ }
+ }
+
+ /* This function is used to neglect the ssl handshake error with authentication server */
+ public static void BypassCertificateError()
+ {
+ ServicePointManager.ServerCertificateValidationCallback +=
+ delegate(Object sender1, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
+ {
+ return true;
+ };
+ }
+
+ /* This function redirects to authentication server to get the access code */
+ public void getAuthCode()
+ {
+ try
+ {
+ Response.Redirect("" + FQDN + "/oauth/authorize?scope=" + scope + "&client_id=" + api_key + "&redirect_url=" + authorize_redirect_uri);
+ }
+ catch (Exception ex)
+ {
+ drawPanelForFailure(dcPanel, ex.ToString());
+ }
+ }
+
+ /* This function get the access token based on the type parameter type values.
+ * If type value is 0, access token is fetch for authorization code flow
+ * If type value is 2, access token is fetch for authorization code floww based on the exisiting refresh token
+ */
+ public bool getAccessToken(int type)
+ {
+ if (type == 0)
+ {
+ try
+ {
+ DateTime currentServerTime = DateTime.UtcNow.ToLocalTime();
+ WebRequest accessTokenRequest = System.Net.HttpWebRequest.Create("" + FQDN + "/oauth/token");
+ accessTokenRequest.Method = "POST";
+ string oauthParameters = "client_id=" + api_key.ToString() + "&client_secret=" + secret_key.ToString() + "&code=" + auth_code.ToString() + "&grant_type=authorization_code";
+ accessTokenRequest.ContentType = "application/x-www-form-urlencoded";
+ //sendSmsRequestObject.Accept = "application/json";
+ UTF8Encoding encoding = new UTF8Encoding();
+ byte[] postBytes = encoding.GetBytes(oauthParameters);
+ accessTokenRequest.ContentLength = postBytes.Length;
+ Stream postStream = accessTokenRequest.GetRequestStream();
+ postStream.Write(postBytes, 0, postBytes.Length);
+ postStream.Close();
+
+ WebResponse accessTokenResponse = accessTokenRequest.GetResponse();
+ using (StreamReader accessTokenResponseStream = new StreamReader(accessTokenResponse.GetResponseStream()))
+ {
+ string access_token_json = accessTokenResponseStream.ReadToEnd().ToString();
+ JavaScriptSerializer deserializeJsonObject = new JavaScriptSerializer();
+ AccessTokenResponse deserializedJsonObj = (AccessTokenResponse)deserializeJsonObject.Deserialize(access_token_json, typeof(AccessTokenResponse));
+ if (deserializedJsonObj.access_token != null)
+ {
+ access_token = deserializedJsonObj.access_token.ToString();
+ expiryMilliSeconds = deserializedJsonObj.expires_in.ToString();
+ refresh_token = deserializedJsonObj.refresh_token.ToString();
+ lastTokenTakenTime = currentServerTime.ToLongDateString() + " " + currentServerTime.ToLongTimeString();
+ DateTime refreshExpiry = currentServerTime.AddHours(24);
+ refreshTokenExpiryTime = refreshExpiry.ToLongDateString() + " " + refreshExpiry.ToLongTimeString();
+ Session["dc_session_access_token"] = access_token.ToString();
+ Session["dc_session_expiryMilliSeconds"] = expiryMilliSeconds.ToString();
+ Session["dc_session_refresh_token"] = refresh_token.ToString();
+ Session["dc_session_lastTokenTakenTime"] = lastTokenTakenTime.ToString();
+ Session["dc_session_refreshTokenExpiryTime"] = refreshTokenExpiryTime.ToString();
+ accessTokenResponseStream.Close();
+ return true;
+ }
+ else
+ {
+ drawPanelForFailure(dcPanel, "Auth server returned null access token");
+ return false;
+
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ drawPanelForFailure(dcPanel, ex.ToString());
+ return false;
+ }
+ }
+ else if (type == 2)
+ {
+ try
+ {
+ DateTime currentServerTime = DateTime.UtcNow.ToLocalTime();
+ WebRequest accessTokenRequest = System.Net.HttpWebRequest.Create("" + FQDN + "/oauth/token");
+ accessTokenRequest.Method = "POST";
+ string oauthParameters = "grant_type=refresh_token&client_id=" + api_key.ToString() + "&client_secret=" + secret_key.ToString() + "&refresh_token=" + refresh_token.ToString();
+ accessTokenRequest.ContentType = "application/x-www-form-urlencoded";
+ //sendSmsRequestObject.Accept = "application/json";
+
+ UTF8Encoding encoding = new UTF8Encoding();
+ byte[] postBytes = encoding.GetBytes(oauthParameters);
+ accessTokenRequest.ContentLength = postBytes.Length;
+
+ Stream postStream = accessTokenRequest.GetRequestStream();
+ postStream.Write(postBytes, 0, postBytes.Length);
+ postStream.Close();
+ WebResponse accessTokenResponse = accessTokenRequest.GetResponse();
+ using (StreamReader accessTokenResponseStream = new StreamReader(accessTokenResponse.GetResponseStream()))
+ {
+ string access_token_json = accessTokenResponseStream.ReadToEnd().ToString();
+ JavaScriptSerializer deserializeJsonObject = new JavaScriptSerializer();
+ AccessTokenResponse deserializedJsonObj = (AccessTokenResponse)deserializeJsonObject.Deserialize(access_token_json, typeof(AccessTokenResponse));
+ if (deserializedJsonObj.access_token != null)
+ {
+ access_token = deserializedJsonObj.access_token.ToString();
+ expiryMilliSeconds = deserializedJsonObj.expires_in.ToString();
+ refresh_token = deserializedJsonObj.refresh_token.ToString();
+ lastTokenTakenTime = currentServerTime.ToLongDateString() + " " + currentServerTime.ToLongTimeString();
+ DateTime refreshExpiry = currentServerTime.AddHours(24);
+ refreshTokenExpiryTime = refreshExpiry.ToLongDateString() + " " + refreshExpiry.ToLongTimeString();
+ Session["dc_session_access_token"] = access_token.ToString();
+ Session["dc_session_expiryMilliSeconds"] = expiryMilliSeconds.ToString();
+ Session["dc_session_refresh_token"] = refresh_token.ToString();
+ Session["dc_session_lastTokenTakenTime"] = lastTokenTakenTime.ToString();
+ Session["dc_session_refreshTokenExpiryTime"] = refreshTokenExpiryTime.ToString();
+ accessTokenResponseStream.Close();
+ return true;
+ }
+ else
+ {
+ drawPanelForFailure(dcPanel, "Auth server returned null access token");
+ return false;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ drawPanelForFailure(dcPanel, ex.ToString());
+ return false;
+ }
+ }
+ return false;
+ }
+
+ /* This funciton draws table for error response */
+ private void drawPanelForFailure(Panel panelParam, string message)
+ {
+ Table table = new Table();
+ table.Font.Name = "Sans-serif";
+ table.Font.Size = 9;
+ table.BorderStyle = BorderStyle.Outset;
+ table.Width = Unit.Pixel(650);
+ TableRow rowOne = new TableRow();
+ TableCell rowOneCellOne = new TableCell();
+ rowOneCellOne.Font.Bold = true;
+ rowOneCellOne.Text = "ERROR:";
+ rowOne.Controls.Add(rowOneCellOne);
+ //rowOneCellOne.BorderWidth = 1;
+ table.Controls.Add(rowOne);
+ TableRow rowTwo = new TableRow();
+ TableCell rowTwoCellOne = new TableCell();
+ //rowTwoCellOne.BorderWidth = 1;
+ rowTwoCellOne.Text = message.ToString();
+ rowTwo.Controls.Add(rowTwoCellOne);
+ table.Controls.Add(rowTwo);
+ table.BorderWidth = 2;
+ table.BorderColor = Color.Red;
+ table.BackColor = System.Drawing.ColorTranslator.FromHtml("#fcc");
+ panelParam.Controls.Add(table);
+ }
+ /*
+ * This function is called when the applicaiton page is loaded into the browser.
+ * This fucntion reads the web.config and gets the values of the attributes
+ *
+ */
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ try
+ {
+ BypassCertificateError();
+ DateTime currentServerTime = DateTime.UtcNow;
+ serverTimeLabel.Text = String.Format("{0:ddd, MMM dd, yyyy HH:mm:ss}", currentServerTime) + " UTC";
+ if (ConfigurationManager.AppSettings["FQDN"] == null)
+ {
+ drawPanelForFailure(dcPanel, "FQDN is not defined in configuration file");
+ return;
+ }
+ FQDN = ConfigurationManager.AppSettings["FQDN"].ToString();
+ if (ConfigurationManager.AppSettings["api_key"] == null)
+ {
+ drawPanelForFailure(dcPanel, "api_key is not defined in configuration file");
+ return;
+ }
+ api_key = ConfigurationManager.AppSettings["api_key"].ToString();
+ if (ConfigurationManager.AppSettings["secret_key"] == null)
+ {
+ drawPanelForFailure(dcPanel, "secret_key is not defined in configuration file");
+ return;
+ }
+ secret_key = ConfigurationManager.AppSettings["secret_key"].ToString();
+ if (ConfigurationManager.AppSettings["scope"] == null)
+ {
+ scope = "DC";
+ }
+ else
+ {
+ scope = ConfigurationManager.AppSettings["scope"].ToString();
+ }
+ if (ConfigurationManager.AppSettings["authorize_redirect_uri"] == null)
+ {
+ drawPanelForFailure(dcPanel, "authorize_redirect_uri is not defined in configuration file");
+ return;
+ }
+ authorize_redirect_uri = ConfigurationManager.AppSettings["authorize_redirect_uri"].ToString();
+ if ((Session["dc_session_appState"] != null) && (Request["Code"] != null))
+ {
+ auth_code = Request["code"].ToString();
+ if (getAccessToken(0) == true)
+ {
+ readTokenSessionVariables();
+ }
+ else
+ {
+ drawPanelForFailure(dcPanel, "Failed to get Access token");
+ resetTokenSessionVariables();
+ resetTokenVariables();
+ Session["dc_session_DeviceIdForWhichTokenAcquired"] = null;
+ return;
+ }
+ }
+ if (Session["dc_session_appState"] != null)
+ {
+ Session["dc_session_appState"] = null;
+ if (Session["dc_session_GdeviceID"] != null)
+ {
+ Session["dc_session_DeviceIdForWhichTokenAcquired"] = Session["dc_session_GdeviceID"].ToString();
+ Session["dc_session_GdeviceID"] = null;
+ }
+ dcPhoneNumberTextBox.Text = Session["dc_session_deviceID"].ToString();
+ Session["dc_session_deviceID"] = null;
+ getDCCapabilities_Click(null,null);
+ }
+ }
+ catch (Exception ex)
+ {
+ drawPanelForFailure(dcPanel, ex.ToString());
+ }
+
+ }
+ /*This funciton checks the validity of string as msisdn */
+
+ private Boolean isValidMISDN(string number)
+ {
+ string smsAddressInput = number;
+ long tryParseResult = 0;
+ string smsAddressFormatted;
+ string phoneStringPattern = "^\\d{3}-\\d{3}-\\d{4}$";
+ if (System.Text.RegularExpressions.Regex.IsMatch(smsAddressInput, phoneStringPattern))
+ {
+ smsAddressFormatted = smsAddressInput.Replace("-", "");
+ }
+ else
+ {
+ smsAddressFormatted = smsAddressInput;
+ }
+ if (smsAddressFormatted.Length == 16 && smsAddressFormatted.StartsWith("tel:+1"))
+ {
+ smsAddressFormatted = smsAddressFormatted.Substring(6, 10);
+ }
+ else if (smsAddressFormatted.Length == 15 && smsAddressFormatted.StartsWith("tel:1"))
+ {
+ smsAddressFormatted = smsAddressFormatted.Substring(5, 10);
+ }
+ else if (smsAddressFormatted.Length == 14 && smsAddressFormatted.StartsWith("tel:"))
+ {
+ smsAddressFormatted = smsAddressFormatted.Substring(4, 10);
+ }
+ else if (smsAddressFormatted.Length == 12 && smsAddressFormatted.StartsWith("+1"))
+ {
+ smsAddressFormatted = smsAddressFormatted.Substring(2, 10);
+ }
+ else if (smsAddressFormatted.Length == 11 && smsAddressFormatted.StartsWith("1"))
+ {
+ smsAddressFormatted = smsAddressFormatted.Substring(1, 10);
+ }
+ if ((smsAddressFormatted.Length != 10) || (!long.TryParse(smsAddressFormatted, out tryParseResult)))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /*This method is used to draw table for successful response of get device capabilities */
+
+ private void drawPanelForGetStatusResult(string attribute, string value, bool headerFlag)
+ {
+ if (headerFlag == true)
+ {
+ Table getStatusTableHeading = new Table();
+ getStatusTableHeading.Font.Name = "Sans-serif";
+ getStatusTableHeading.Font.Size = 9;
+ getStatusTableHeading.BorderStyle = BorderStyle.Outset;
+ getStatusTableHeading.Width = Unit.Pixel(650);
+ TableRow one = new TableRow();
+ TableCell cell = new TableCell();
+ cell.Text = "SUCCESS:";
+ cell.Font.Bold = true;
+ one.Controls.Add(cell);
+ TableRow two = new TableRow();
+ cell = new TableCell();
+ cell.Text = "Device parameters listed below";
+ two.Controls.Add(cell);
+ getStatusTableHeading.Controls.Add(one);
+ getStatusTableHeading.Controls.Add(two);
+ getStatusTableHeading.BorderWidth = 2;
+ getStatusTableHeading.BorderColor = Color.DarkGreen;
+ getStatusTableHeading.BackColor = System.Drawing.ColorTranslator.FromHtml("#cfc");
+ getStatusTableHeading.Font.Size = 9;
+ dcPanel.Controls.Add(getStatusTableHeading);
+
+ getStatusTable = new Table();
+ getStatusTable.Font.Size = 9;
+ getStatusTable.Font.Name = "Sans-serif";
+ getStatusTable.Font.Italic = true;
+ //getStatusTable.HorizontalAlign = HorizontalAlign.Center;
+ TableRow rowOne = new TableRow();
+ TableCell rowOneCellOne = new TableCell();
+ rowOneCellOne.Font.Bold = true;
+ //rowOneCellOne.BorderWidth = 1;
+ rowOneCellOne.Text = "Parameter";
+ rowOneCellOne.HorizontalAlign = HorizontalAlign.Center;
+ rowOne.Controls.Add(rowOneCellOne);
+ TableCell rowOneCellTwo = new TableCell();
+ rowOneCellTwo.Font.Bold = true;
+ //rowOneCellTwo.BorderWidth = 1;
+ rowOneCellTwo.Text = "Value";
+ rowOneCellTwo.HorizontalAlign = HorizontalAlign.Center;
+ rowOne.Controls.Add(rowOneCellTwo);
+ //getStatusTable.BorderWidth = 2;
+ //getStatusTable.BorderColor = Color.DarkGreen;
+ //getStatusTable.BackColor = System.Drawing.ColorTranslator.FromHtml("#cfc");
+ getStatusTable.Controls.Add(rowOne);
+ dcPanel.Controls.Add(getStatusTable);
+ }
+ else
+ {
+ TableRow row = new TableRow();
+ TableCell cell1 = new TableCell();
+ TableCell cell2 = new TableCell();
+ cell1.Text = attribute.ToString();
+ //cell1.BorderWidth = 1;
+ cell1.HorizontalAlign = HorizontalAlign.Center;
+ row.Controls.Add(cell1);
+ cell2.Text = value.ToString();
+ //cell2.BorderWidth = 1;
+ cell2.HorizontalAlign = HorizontalAlign.Center;
+ row.Controls.Add(cell2);
+ getStatusTable.Controls.Add(row);
+ }
+ }
+ /*
+ * User invoked Event to get device Information
+ */
+ protected void getDCCapabilities_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ try
+ {
+ if (isValidMISDN(dcPhoneNumberTextBox.Text.ToString()) == false)
+ {
+ drawPanelForFailure(dcPanel,"Invalid Number");
+ return;
+ }
+ string deviceId =dcPhoneNumberTextBox.Text.ToString().Replace("tel:+1", "");
+ deviceId = deviceId.ToString().Replace("tel:+", "");
+ deviceId = deviceId.ToString().Replace("tel:1", "");
+ deviceId = deviceId.ToString().Replace("tel:", "");
+ deviceId = deviceId.ToString().Replace("tel:", "");
+ deviceId = deviceId.ToString().Replace("+1", "");
+ deviceId = deviceId.ToString().Replace("-", "");
+ if (deviceId.Length == 11)
+ {
+ deviceId = deviceId.Remove(0, 1);
+ }
+ String dcResponseData;
+ readTokenSessionVariables();
+ string tokentResult = isTokenValid();
+ if (tokentResult.CompareTo("INVALID_ACCESS_TOKEN") == 0)
+ {
+ Session["dc_session_appState"] = "GetToken";
+ Session["dc_session_deviceID"] = dcPhoneNumberTextBox.Text.ToString();
+ Session["dc_session_GdeviceID"] = deviceId.ToString();
+ getAuthCode();
+ }
+ else if (tokentResult.CompareTo("REFRESH_TOKEN") == 0)
+ {
+ if (getAccessToken(2) == true)
+ {
+ readTokenSessionVariables();
+ }
+ else
+ {
+ drawPanelForFailure(dcPanel, "Failed to get Access token");
+ resetTokenSessionVariables();
+ resetTokenVariables();
+ Session["dc_session_DeviceIdForWhichTokenAcquired"] = null;
+ return;
+ }
+ }
+ if ((Session["dc_session_DeviceIdForWhichTokenAcquired"] != null) && (Session["dc_session_DeviceIdForWhichTokenAcquired"].ToString().CompareTo(deviceId.ToString()) != 0))
+ {
+ resetTokenSessionVariables();
+ resetTokenVariables();
+ Session["dc_session_appState"] = "GetToken";
+ Session["dc_session_deviceID"] = dcPhoneNumberTextBox.Text.ToString();
+ Session["dc_session_GdeviceID"] = deviceId.ToString();
+ getAuthCode();
+ }
+ //readCheckVerifyAccessToken();
+ // Form Http Web Request
+ HttpWebRequest deviceInfoRequestObject = (HttpWebRequest)System.Net.WebRequest.Create("" + FQDN + "/1/devices/tel:" + deviceId.ToString() + "/info?access_token=" + access_token.ToString());
+ deviceInfoRequestObject.Method = "GET";
+
+ HttpWebResponse deviceInfoResponse = (HttpWebResponse)deviceInfoRequestObject.GetResponse();
+ using (StreamReader deviceInfoResponseStream = new StreamReader(deviceInfoResponse.GetResponseStream()))
+ {
+ dcResponseData = deviceInfoResponseStream.ReadToEnd();
+ JavaScriptSerializer deserializeJsonObject = new JavaScriptSerializer();
+ DeviceCapabilities deserializedJsonObj = (DeviceCapabilities)deserializeJsonObject.Deserialize(dcResponseData, typeof(DeviceCapabilities));
+ drawPanelForGetStatusResult("", "", true);
+ drawPanelForGetStatusResult("acwmodel", deserializedJsonObj.deviceId.acwmodel.ToString(), false);
+ drawPanelForGetStatusResult("acwdevcert", deserializedJsonObj.deviceId.acwdevcert.ToString(), false);
+ drawPanelForGetStatusResult("acwrel", deserializedJsonObj.deviceId.acwrel.ToString(), false);
+ drawPanelForGetStatusResult("acwvendor", deserializedJsonObj.deviceId.acwvendor.ToString(), false);
+ drawPanelForGetStatusResult("acwaocr", deserializedJsonObj.capabilities.acwaocr.ToString(), false);
+ drawPanelForGetStatusResult("acwav", deserializedJsonObj.capabilities.acwav.ToString(), false);
+ drawPanelForGetStatusResult("acwcf", deserializedJsonObj.capabilities.acwcf.ToString(), false);
+ drawPanelForGetStatusResult("acwtermtype", deserializedJsonObj.capabilities.acwtermtype.ToString(), false);
+ //Session["DeviceIdForWhichTokenAcquired"] = deviceId.ToString();
+ deviceInfoResponseStream.Close();
+ }
+ }
+ catch (Exception ex)
+ {
+ drawPanelForFailure(dcPanel, ex.ToString());
+ }
+ }
+ catch (Exception ex)
+ {
+ drawPanelForFailure(dcPanel, ex.ToString());
+ }
+ }
+
+}
+
+/* Below are data structures used for application */
+
+public class AccessTokenResponse
+{
+ public string access_token;
+ public string refresh_token;
+ public string expires_in;
+}
+
+public class DeviceCapabilities
+{
+ public DeviceId deviceId { get; set; }
+ public Capabilities capabilities { get; set; }
+}
+
+public class DeviceId
+{
+ public string acwdevcert { get; set; }
+ public string acwrel { get; set; }
+ public string acwmodel { get; set; }
+ public string acwvendor { get; set; }
+}
+
+public class Capabilities
+{
+ public string acwav { get; set; }
+ public string acwaocr { get; set; }
+ public string acwcf { get; set; }
+ public string acwtermtype { get; set; }
+}
View
80 RESTFul/DC/Csharp/app1/README.txt
@@ -0,0 +1,80 @@
+
+ AT&T API Samples - DC app 1
+ ------------------------------
+
+This file describes how to set up, configure and run the C# Applications of the AT&T RESTFul sample applications.
+It covers all steps required to register the application on DevConnect and, based on the generated API keys and secrets,
+create and run one's own full-fledged sample applications.
+
+ 1. Configuration
+ 2. Installation
+ 3. Parameters
+ 4. Running the application
+
+
+1. Configuration
+
+ Configuration consists of a few steps necessary to get an application registered on DevConnect with the proper services and
+ endpoints, depending on the type of client-side application (autonomous/non-autonomous).
+
+ To register an application, go to https://devconnect-api.att.com/ and login with your valid username and password.
+ Next, choose "My Apps" from the bar at the top of the page and click the "Setup a New Application" button.
+
+ Fill in the form, in particular all fields marked as "required".
+
+ Be careful while filling in the "OAuth Redirect URL" field. It should contain the URL that the oAuth provider will redirect
+ users to when he/she successfully authenticates and authorizes your application.
+
+NOTE: You MUST select Device capability in the list of services under field 'Services' in order to use this sample application code.
+
+ Having your application registered, you will get back an important pair of data: an API key and Secret key. They are
+ necessary to get your applications working with the AT&T HTML5 APIs. See 'Adjusting parameters' below to learn how to use
+ these keys.
+
+ Initially your newly registered application is restricted to the "Sandbox" environment only. To move it to production,
+ you may promote it by clicking the "Promote to production" button. Notice that you will get a different API key and secret,
+ so these values in your application should be adjusted accordingly.
+
+ Depending on the kind of authentication used, an application may be based on either the Autonomous Client or the Web-Server
+ Client OAuth flow (see https://devconnect-api.att.com/docs/oauth-v1/client-credentials-grant-type or
+ https://devconnect-api.att.com/docs/oauth-v1/authorization-code-grant-type respectively).
+
+
+2. Installation
+
+** Requirements
+
+ 1. To run the this sample application you need an IIS Server.
+ 2. Change the value of "href" at the following line in Default.aspx to point to the location of the "common.css" of "style" folder:
+ <link rel="stylesheet" type="text/css" href="../../style/common.css"/>
+ 3. Change the value of the "url" at the following line in common.css to point to the location of the "att.gif" of "images" folder.
+ div#header { background:url(../images/att.gif) left center no-repeat; margin: 10px 5px}
+
+
+3. Parameters
+
+
+Each sample application contains a config.web file. It holds configurable parameters described in an easy to read format.
+Please populate the following parameters in config.web as specified below:
+
+1) api_key : {set the value as per your registered application 'API key' field value}
+
+
+2) secret_key : {set the value as per your registered application 'Secret key' field value}
+
+
+3) authorize_redirect_uri : {set the value as per your registered application 'OAuth Redirect URL' field value}
+
+4) FQDN : https://api.att.com
+
+5) scope : DC
+
+Note: If your application is promoted from Sandbox environment to Production environment and you decide to use production application settings,
+you must update parameters 1-2 as per production application details.
+
+
+
+4. Running the application
+
+Suppose you copied the sample app files in your IIS server webroot/dc/app1/ folder, In order to run the sample application,
+type in'http://IIS_HOSTNAME/dc/app1/Default.aspx'
View
39 RESTFul/DC/Csharp/app1/Web.config
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+ For more information on how to configure your ASP.NET application, please visit
+ http://go.microsoft.com/fwlink/?LinkId=169433
+ -->
+<configuration>
+ <system.web>
+ <compilation debug="true" targetFramework="4.0"/>
+ <customErrors mode="Off"></customErrors>
+ </system.web>
+ <appSettings>
+
+ <!-- This is mandatory key and value should be equal
+ to DC Service registered application 'API key'
+ example: value="2726942c798aaaaa4bd3625d95cc7355"-->
+ <add key="api_key" value=""/>
+
+ <!-- This is mandatory key and value should be equal
+ to DC Service registered application 'Secret key'
+ example: value="5fb012657aaa6c7d"-->
+ <add key="secret_key" value=""/>
+
+ <!-- This is mandatory key and value should be equal
+ to DC Service registered application 'OAuth Redirect URL'
+ example: value="https://IIS-Server/webroot/dc/app1/Default.aspx"-->
+ <add key="authorize_redirect_uri" value=""/>
+
+ <!-- This is mandatory key and value should be equal
+ to https://api.att.com for production environment
+ example: value="https://api.att.com"-->
+ <add key="FQDN" value=""></add>
+
+ <!-- This is optional key and value should be equal
+ to "DC"
+ example: value="DC"-->
+ <add key="scope" value=""/>
+
+ </appSettings>
+</configuration>
View
BIN  RESTFul/DC/Csharp/app1/images/att.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
39 RESTFul/DC/Csharp/app1/style/common.css
@@ -0,0 +1,39 @@
+/*@charset "utf-8";*/
+/* CSS Document */
+
+html,body{ margin:0;padding:0}
+body{font: 12px arial,sans-serif;text-align:center; color: #000}
+p{margin:0 10px 10px}
+a{color: #69BBE5}
+h1 { font-size: 16px; margin: 0 0}
+h2 { font-size: 14px; margin: 0 0}
+div#header { background:url(../images/att.gif) left center no-repeat; margin: 10px 5px}
+div#hcLeft { float:left; text-align: right; width: 39%; font-weight: bold}
+div#hcRight { float:right; width: 59%}
+
+div#content { border-top: 1px dashed #999}
+div#container{ text-align:left}
+div#content p{line-height:1.4}
+div#footer{ font-size: 9px; text-align: center; border-top: 1px dashed #999; margin-top: 10px; padding-top: 10px}
+div#footer p{ width: 500px; margin:0 auto;padding:5px 10px}
+
+div#container{width:1000px;margin:0 auto}
+div#navigation{float:left;width:500px}
+div#extra{float:right;width:500px}
+div#extra1{float:right;width:500px; height: 97px}
+div#extra2{float:left;width:100%}
+div#extraleft{float:left;width:200px}
+div#footer{clear:both;width:100%}
+
+div#gallerywrapper { width: 900px; margin: 10px auto; padding: 10px}
+div#gallery { float: left; width: 150px; height: 190px; padding: 10px; margin-bottom: 15px; font-size: 9px}
+
+.label, .cell { font: 12px Arial, Sans-serif}
+.label { font-weight: bold}
+
+.error { margin: 0 auto; border: 3px outset red; background: #fcc; width: 250px; padding: 5px; font-size: 11px }
+.warning { margin: 0 auto; border: 3px outset yellow; background: #ffc; width: 250px; padding: 5px; font-size: 11px }
+.success { margin: 0 auto; border: 3px outset green; background: #cfc; width: 250px; padding: 5px; font-size: 11px }
+.errorWide { margin: 0 auto; border: 3px outset red; background: #fcc; width: 650px; padding: 5px; font-size: 11px }
+.warningWide { margin: 0 auto; border: 3px outset yellow; background: #ffc; width: 650px; padding: 5px; font-size: 11px }
+.successWide { margin: 0 auto; border: 3px outset green; background: #cfc; width: 650px; padding: 5px; font-size: 11px }
View
BIN  RESTFul/DC/Java/.DS_Store
Binary file not shown
View
BIN  RESTFul/DC/Java/app1/.DS_Store
Binary file not shown
View
213 RESTFul/DC/Java/app1/DC.jsp
@@ -0,0 +1,213 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
+ <title>AT&T Sample DC Application - Get Device Capabilities Application</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
+ <link rel="stylesheet" type="text/css" href="style/common.css"/ >
+ <script type="text/javascript" src="js/helper.js">
+</script>
+<body>
+
+<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
+<%@ page import="org.apache.commons.httpclient.*"%>
+<%@ page import="org.apache.commons.httpclient.methods.*"%>
+<%@ page import="org.json.JSONObject"%>
+<%@ page import="java.util.Iterator"%>
+<%@ include file="config.jsp" %>
+<%
+String scope = (String) session.getAttribute("scope");
+if(scope==null) scope="";
+String postOauth = "DC.jsp?getDeviceInfo=true";
+String redirectUri = "";
+String address = request.getParameter("address");
+if(address==null || address.equalsIgnoreCase("null"))
+ address = (String) session.getAttribute("addressDC");
+if(address==null || address.equalsIgnoreCase("null"))
+ address = "425-802-8620";
+Boolean newAddress = false;
+if(!address.equalsIgnoreCase((String)session.getAttribute("addressDC"))) {
+ newAddress = true;
+}
+session.setAttribute("addressDC",address);
+String getDeviceInfo = request.getParameter("getDeviceInfo");
+%>
+
+<div id="container">
+<!-- open HEADER --><div id="header">
+
+<div>
+ <div id="hcRight">
+ <%=new java.util.Date()%>
+ </div>
+ <div id="hcLeft">Server Time:</div>
+</div>
+<div>
+ <div id="hcRight"><script language="JavaScript" type="text/javascript">
+var myDate = new Date();
+document.write(myDate);
+</script></div>
+ <div id="hcLeft">Client Time:</div>
+</div>
+<div>
+ <div id="hcRight"><script language="JavaScript" type="text/javascript">
+document.write("" + navigator.userAgent);
+</script></div>
+ <div id="hcLeft">User Agent:</div>
+</div>
+<br clear="all" />
+</div><!-- close HEADER -->
+
+<div id="wrapper">
+<div id="content">
+
+<h1>AT&T Sample DC Application - Get Device Capabilities Application</h1>
+<h2>Feature 1: Get Device Capabilities</h2>
+
+</div>
+</div>
+<form method="post" name="getDeviceInfo" action="DC.jsp">
+<div id="navigation">
+
+<table border="0" width="100%">
+ <tbody>
+ <tr>
+ <td width="20%" valign="top" class="label">Phone:</td>
+ <td class="cell"><input maxlength="16" size="12" name="address" value="<%=address%>" style="width: 90%">
+ </td>
+ </tr>
+ </tbody></table>
+
+</div>
+<div id="extra">
+
+<table border="0" width="100%">
+ <tbody>
+ <tr>
+ <td class="cell"><button type="submit" name="getDeviceInfo">Get Device Capabilities</button>
+ </td>
+ </tr>
+ </tbody></table>
+
+</div>
+<br clear="all" />
+</form>
+
+<%
+ if(getDeviceInfo!=null) {
+ //Check for a few known formats the user could have entered the address, adjust accordingly
+ String invalidAddress = null;
+ if((address.indexOf("-")==3) && (address.length()==12))
+ address = "tel:" + address.substring(0,3) + address.substring(4,7) + address.substring(8,12);
+ else if((address.indexOf(":")==3) && (address.length()==14))
+ address = address;
+ else if((address.indexOf("-")==-1) && (address.length()==10))
+ address = "tel:" + address;
+ else if((address.indexOf("-")==-1) && (address.length()==11))
+ address = "tel:" + address.substring(1);
+ else if((address.indexOf("-")==-1) && (address.indexOf("+")==0) && (address.length()==12))
+ address = "tel:" + address.substring(2);
+ else
+ invalidAddress = "yes";
+if(invalidAddress==null) {
+ String accessToken = request.getParameter("access_token");
+ if(accessToken==null || accessToken=="null"){
+ accessToken = (String) session.getAttribute("accessToken");}
+ if((newAddress==true) || (accessToken==null) || (!scope.equalsIgnoreCase("DC")) && (!scope.equalsIgnoreCase("SMS,MMS,WAP,DC,TL,PAYMENT"))) {
+ session.setAttribute("scope", "DC");
+ session.setAttribute("clientId", clientIdWeb);
+ session.setAttribute("clientSecret", clientSecretWeb);
+ session.setAttribute("address", address);
+ session.setAttribute("postOauth", postOauth);
+ session.setAttribute("redirectUri", redirectUri);
+ response.sendRedirect("oauth.jsp?getExtCode=yes");
+ }
+ String url = FQDN + "/1/devices/" + address + "/info";
+ HttpClient client = new HttpClient();
+ GetMethod method = new GetMethod(url);
+ method.setQueryString("access_token=" + accessToken);
+ method.addRequestHeader("Accept","application/json");
+ int statusCode = client.executeMethod(method);
+ if(statusCode==200) {
+ JSONObject jsonResponse = new JSONObject(method.getResponseBodyAsString());
+ JSONObject deviceId = new JSONObject(jsonResponse.getString("deviceId"));
+ JSONObject capabilities = new JSONObject(jsonResponse.getString("capabilities"));
+ Iterator deviceIdKeys = deviceId.keys();
+ Iterator capabilitiesKeys = capabilities.keys();
+ %>
+ <div class="successWide">
+ <strong>SUCCESS:</strong><br />
+ Device parameters listed below.
+ </div>
+ <br />
+
+ <div align="center">
+ <table width="500" cellpadding="1" cellspacing="1" border="0">
+ <thead>
+ <tr>
+ <th width="50%" class="label">Parameter</th>
+ <th width="50%" class="label">Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <%
+ while(deviceIdKeys.hasNext()) {
+ String key = (String) deviceIdKeys.next();
+ %>
+ <tr>
+ <td class="cell" align="center"><em><%=key%></em></td>
+ <td class="cell" align="center"><em><%=deviceId.getString(key)%></em></td>
+ </tr>
+ <%
+ }
+ %>
+ <%
+ while(capabilitiesKeys.hasNext()) {
+ String key = (String) capabilitiesKeys.next();
+ %>
+ <tr>
+ <td class="cell" align="center"><em><%=key%></em></td>
+ <td class="cell" align="center"><em><%=capabilities.getString(key)%></em></td>
+ </tr>
+ <%
+ }
+ %>
+ </tbody>
+ </table>
+ </div>
+
+ <br />
+<%
+ }
+ else {
+ %>
+ <div class="errorWide">
+ <strong>ERROR:</strong><br />
+ <%=method.getResponseBodyAsString()%>
+ </div>
+ <br />
+ <%
+ }
+ method.releaseConnection();
+ } else { %>
+ <div class="errorWide">
+ <strong>ERROR:</strong><br />
+ Invalid Address Entered
+ </div><br/>
+<% }
+ }
+%>
+
+<div id="footer">
+
+ <div style="float: right; width: 20%; font-size: 9px; text-align: right">Powered by AT&amp;T Virtual Mobile</div>
+ <p>&#169; 2011 AT&amp;T Intellectual Property. All rights reserved. <a href="http://developer.att.com/" target="_blank">http://developer.att.com</a>
+<br>
+The Application hosted on this site are working examples intended to be used for reference in creating products to consume AT&amp;T Services and not meant to be used as part of your product. The data in these pages is for test purposes only and intended only for use as a reference in how the services perform.
+<br>
+For download of tools and documentation, please go to <a href="https://devconnect-api.att.com/" target="_blank">https://devconnect-api.att.com</a>
+<br>
+For more information contact <a href="mailto:developer.support@att.com">developer.support@att.com</a>
+
+</div>
+</div>
+
+</body></html>
View
3  RESTFul/DC/Java/app1/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
View
81 RESTFul/DC/Java/app1/README.txt
@@ -0,0 +1,81 @@
+
+ AT&T API Samples - DC app 1
+ ------------------------------
+
+This file describes how to set up, configure and run the Java Applications of the AT&T HTML5 Program sample applications.
+It covers all steps required to register the application on DevConnect and, based on the generated API keys and secrets,
+create and run one's own full-fledged sample applications.
+
+ 1. Configuration
+ 2. Installation
+ 3. Parameters
+ 4. Running the application
+
+
+1. Configuration
+
+ Configuration consists of a few steps necessary to get an application registered on DevConnect with the proper services and
+ endpoints, depending on the type of client-side application (autonomous/non-autonomous).
+
+ To register an application, go to https://devconnect-api.att.com/ and login with your valid username and password.
+ Next, choose "My Apps" from the bar at the top of the page and click the "Setup a New Application" button.
+
+ Fill in the form, in particular all fields marked as "required".
+
+ Be careful while filling in the "OAuth Redirect URL" field. It should contain the URL that the oAuth provider will redirect
+ users to when he/she successfully authenticates and authorizes your application. For this application, it should point to
+ the oauth.jsp file inside this application folder. For example, if running on a local machine in a default Tomcat installation,
+ your OAuth Redirect URL might be http://localhost:8080/SampleApp/oauth.jsp
+
+NOTE: You MUST select Device Capabilities in the list of services under field 'Services' in order to use this sample application code.
+
+ Having your application registered, you will get back an important pair of data: an API key and Secret key. They are
+ necessary to get your applications working with the AT&T HTML5 APIs. See 'Adjusting parameters' below to learn how to use
+ these keys.
+
+ Initially your newly registered application is restricted to the "Sandbox" environment only. To move it to production,
+ you may promote it by clicking the "Promote to production" button. Notice that you will get a different API key and secret,
+ so these values in your application should be adjusted accordingly.
+
+ Depending on the kind of authentication used, an application may be based on either the Autonomous Client or the Web-Server
+ Client OAuth flow (see https://devconnect-api.att.com/docs/oauth20/autonomous-client-application-oauth-flow or
+ https://devconnect-api.att.com/docs/oauth20/web-server-client-application-oauth-flow respectively).
+
+
+2. Installation
+
+** Requirements
+
+ To run the examples you need a Java environment and at least Apache Tomcat 6, or another Java web server such as Jetty.
+
+** Setting up multiple sample applications simultaneously
+
+ In case multiple applications need to be run at the same time, make sure to put each app in a separate folder and
+ adjust your OAuth Redirect URL accordingly.
+
+3. Parameters
+
+Each sample application contains a config.jsp file. It holds configurable parameters described in an easy to read format.
+Please populate the following parameters in config.jsp as specified below:
+
+1) clientIdWeb : {set the value as per your registered appliaction 'API key' field value}
+
+2) clientSecretWeb : {set the value as per your registered appliaction 'Secret key' field value}
+
+3) FQDN : https://api.att.com
+
+Note: If your application is promoted from Sandbox environment to Production environment and you decide to use production
+application settings, you must update parameters 1-2 as per production application details.
+
+
+4. Running the application
+
+ To run the application, put the entire contents of the application folder into a separate folder named SampleApp inside the webapps
+ folder in your Apache Tomcat home directory. If you have specified a different home directory in Tomcat for your web applications,
+ put it there instead.
+
+ Depending on your security settings in Apache Tomcat, you might need to enable write access to the OauthStorage.jsp file.
+
+ Once you start tomcat, typically using the command "<your-tomcat-root-folder>/bin/startup.sh", your application becomes available
+ in a web browser, so you may visit: http://localhost:8080/SampleApp/DC.jsp to see it working.
+
View
BIN  RESTFul/DC/Java/app1/WEB-INF/.DS_Store
Binary file not shown
View
BIN  RESTFul/DC/Java/app1/WEB-INF/lib/.DS_Store
Binary file not shown
View
BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-codec-1.5.jar
Binary file not shown
View
BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-httpclient-3.0.1.jar
Binary file not shown
View
BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-io-1.4.jar
Binary file not shown
View
BIN  RESTFul/DC/Java/app1/WEB-INF/lib/commons-logging-1.1.1.jar
Binary file not shown
View
BIN  RESTFul/DC/Java/app1/WEB-INF/lib/json-rpc-1.0.jar
Binary file not shown
View
5 RESTFul/DC/Java/app1/config.jsp
@@ -0,0 +1,5 @@
+<%
+String clientIdWeb = "";
+String clientSecretWeb = "";
+String FQDN = "https://api.att.com";
+%>
View
BIN  RESTFul/DC/Java/app1/images/att.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
172 RESTFul/DC/Java/app1/oauth.jsp
@@ -0,0 +1,172 @@
+<!--
+Licensed by AT&T under 'Software Development Kit Tools Agreement.' September 2011
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
+Copyright 2011 AT&T Intellectual Property. All rights reserved. http://developer.att.com
+For more information contact developer.support@att.com
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Application 1</TITLE>
+<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
+<SCRIPT type=text/javascript src="helper.js">
+</SCRIPT>
+<META name=GENERATOR content="MSHTML 8.00.6001.19046"></HEAD>
+<BODY>
+<TABLE border=0 width="100%">
+ <TBODY>
+ <TR>
+ <TD rowSpan=2 width="25%" align=left><IMG
+ src="http://developer.att.com/developer/images/att.gif"></TD>
+ <TD width="15%" align=right>Server Time:</TD>
+ <TD width="60%" align=left>
+ <SCRIPT language=JavaScript type=text/javascript>
+var myDate = new Date();
+document.write(myDate.format('l, F d, Y H:i') + ' PDT');
+</SCRIPT>
+</TD></TR>
+ <TR>
+ <TD width="15%" align=right>Client Time:</TD>
+ <TD width="25%" align=left>
+ <SCRIPT language=JavaScript type=text/javascript>
+var myDate = new Date();
+document.write(myDate.format('l, F d, Y H:i') + ' PDT');
+</SCRIPT>
+</TD></TR></TBODY></TABLE>
+
+<HR size=px"></HR>
+<font size=4px"><B>ATT sample Oauth application</B></font><BR><BR>
+<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
+<%@ page import="org.apache.commons.httpclient.*"%>
+<%@ page import="org.apache.commons.httpclient.methods.*"%>
+<%@ page import="org.json.JSONObject"%>
+<%@ include file="config.jsp" %>
+<%
+ String clientId = request.getParameter("clientId");
+if(clientId!=null)
+if(clientId.equalsIgnoreCase("default"))
+ clientId = clientIdWeb;
+if((clientId==null) || (clientId.equalsIgnoreCase("null")))
+ clientId = (String) session.getAttribute("clientId");
+if(clientId==null)
+ clientId = "";
+String clientSecret = request.getParameter("clientSecret");
+if(clientSecret!=null)
+if(clientSecret.equalsIgnoreCase("default"))
+ clientSecret = clientSecretWeb;
+if((clientSecret==null) || (clientSecret.equalsIgnoreCase("null")))
+ clientSecret = (String) session.getAttribute("clientSecret");
+if(clientSecret==null)
+ clientSecret = "";
+String redirectUri = request.getParameter("redirectUri");
+if(redirectUri==null)
+ redirectUri = (String) session.getAttribute("redirectUri");
+if(redirectUri==null)
+ redirectUri = "https://code-api-att.com/apigee-public/oauth.jsp";
+String scope = request.getParameter("scope");
+if(scope==null)
+ scope = (String) session.getAttribute("scope");
+if(scope==null)
+ scope = "SMS,MMS";
+session.setAttribute("scope", scope);
+String code = request.getParameter("code");
+if(code==null) code="";
+String print = "";
+String getExtCode = request.getParameter("getExtCode");
+String refreshToken = request.getParameter("refreshToken");
+if (refreshToken==null)
+ refreshToken=(String) session.getAttribute("refreshToken");
+if (refreshToken==null)
+ refreshToken="";
+String getRefreshToken = request.getParameter("getRefreshToken");
+if (getRefreshToken==null) getRefreshToken="";
+%>
+
+<form name="getExtCode" method="post">
+API Key <input type="text" name="clientId" value="default" size=40 /><br>
+API Secret <input type="text" name="clientSecret" value="default" size=40 /><br>
+{FQDN} <input type="text" name="FQDN" value="<%=FQDN%>" size=60 /><br>
+Scope <input type="text" name="scope" value="<%=scope%>" size=40 /><br />
+Redirect URI <input type="text" name="redirectUri" value="<%=redirectUri%>" size=60 /><br />
+<input type="submit" name="getExtCode" value="Get Access Token" />
+</form><br><br>
+
+ <%
+ if(getExtCode!=null) {
+ session.setAttribute("clientId", clientId);
+ session.setAttribute("clientSecret", clientSecret);
+ session.setAttribute("FQDN", FQDN);
+ response.sendRedirect(FQDN + "/oauth/authorize?client_id=" + clientId + "&scope=" + scope + "&redirect_uri=" + redirectUri);
+ }
+
+ if(!code.equalsIgnoreCase("")) {
+ String url = FQDN + "/oauth/token";
+ HttpClient client = new HttpClient();
+ PostMethod method = new PostMethod(url);
+ String b = "client_id=" + clientId + "&client_secret=" + clientSecret + "&grant_type=authorization_code&code=" + code;
+ method.addRequestHeader("Content-Type","application/x-www-form-urlencoded");
+ method.setRequestBody(b);
+ int statusCode = client.executeMethod(method);
+ print = method.getResponseBodyAsString();
+ if(statusCode==200){
+ JSONObject rpcObject = new JSONObject(method.getResponseBodyAsString());
+ String accessToken = rpcObject.getString("access_token");
+ refreshToken = rpcObject.getString("refresh_token");
+ session.setAttribute("refreshToken", refreshToken);
+ session.setAttribute("accessToken", accessToken);
+
+ String postOauth = (String) session.getAttribute("postOauth");
+ if(postOauth!= null) {
+ session.setAttribute("postOauth", null);
+ response.sendRedirect(postOauth);
+ }
+ }
+ method.releaseConnection();
+ }
+ %>
+
+<form name="getRefreshToken" method="post">
+API Key <input type="text" name="clientId" value="<%=clientId%>" size=40 /><br />
+API Secret <input type="text" name="clientSecret" value="<%=clientSecret%>" size=40 /><br />
+Refresh Token <input type="text" name="refreshToken" value="<%=refreshToken%>" size=60 /><br />
+<input type="submit" name="getRefreshToken" value="Refresh Access Token" />
+</form><br><br>
+
+ <%
+ if(!getRefreshToken.equalsIgnoreCase("")) {
+ session.setAttribute("clientId",clientId);
+ session.setAttribute("clientSecret",clientSecret);
+ String url = FQDN + "/oauth/token";
+ HttpClient client = new HttpClient();
+ PostMethod method = new PostMethod(url);
+ String b = "client_id=" + clientIdAut + "&client_secret=" + clientSecretAut + "&grant_type=refresh_token&refresh_token=" + refreshToken;
+ method.addRequestHeader("Content-Type","application/x-www-form-urlencoded");
+ method.setRequestBody(b);
+ int statusCode = client.executeMethod(method);
+ print = method.getResponseBodyAsString();
+ if(statusCode==200){
+ String accessToken = print.substring(18,50);
+ session.setAttribute("accessToken", accessToken);
+ String postOauth = (String) session.getAttribute("postOauth");
+ if(postOauth!= null) {
+ session.setAttribute("postOauth", null);
+ response.sendRedirect(postOauth);
+ } else {
+
+ }
+ }
+ method.releaseConnection();
+ }
+ %>
+<br><br><html><body><%=print%></body></html>
+
+<div style="position:absolute;bottom:0px;left:30%;width:40%;font-size:9px;" align="center" >
+� 2011 AT&T Intellectual Property. All rights reserved. <a href="http://developer.att.com" target="_blank">http://developer.att.com</a>
+<br/>
+The Application hosted on this site are working examples intended to be used for reference in creating products to consume AT&T Services and not meant to be used as part of your product. The data in these pages is for test purposes only and intended only for use as a reference in how the services perform.
+<br/>
+For download of tools and documentation, please go to <a href="https://devconnect-api.att.com" target="_blank">https://devconnect-api.att.com</a>
+<br/>
+For more information contact <a href="mailto:developer.support@att.com">developer.support@att.com</a>
+<br/><br/>
+</div>
+
View
39 RESTFul/DC/Java/app1/style/common.css
@@ -0,0 +1,39 @@
+@charset "utf-8";
+/* CSS Document */
+
+html,body{ margin:0;padding:0 }
+body{font: 12px arial,sans-serif;text-align:center; color: #000}
+p{margin:0 10px 10px}
+a{color: #69BBE5 }
+h1 { font-size: 16px; margin: 0 0; }
+h2 { font-size: 14px; margin: 0 0; }
+div#header { background:url(../images/att.gif) left center no-repeat; margin: 10px 5px; }
+#hcLeft { float:left; text-align: right; width: 39%; font-weight: bold }
+#hcRight { float:right; width: 59% }
+
+div#content { border-top: 1px dashed #999; }
+
+div#container{ text-align:left; }
+div#content p{line-height:1.4}
+div#navigation{ }
+div#extra{ }
+div#footer{ font-size: 9px; text-align: center; border-top: 1px dashed #999; margin-top: 10px; padding-top: 10px }
+div#footer p{ width: 500px; margin:0 auto;padding:5px 10px}
+
+div#container{width:1000px;margin:0 auto}
+div#navigation{float:left;width:500px}
+div#extra{float:right;width:500px}
+div#footer{clear:both;width:100%}
+
+div#gallerywrapper { width: 900px; margin: 10px auto; padding: 10px }
+div#gallery { float: left; width: 150px; height: 240px; padding: 10px; margin-bottom: 15px; font-size: 9px }
+
+.label, .cell { font: 12px Arial, Sans-serif; }
+.label { font-weight: bold }
+
+.error { margin: 0 auto; border: 3px outset red; background: #fcc; width: 250px; padding: 5px; font-size: 11px }
+.warning { margin: 0 auto; border: 3px outset yellow; background: #ffc; width: 250px; padding: 5px; font-size: 11px }
+.success { margin: 0 auto; border: 3px outset green; background: #cfc; width: 250px; padding: 5px; font-size: 11px }
+.errorWide { margin: 0 auto; border: 3px outset red; background: #fcc; width: 650px; padding: 5px; font-size: 11px }
+.warningWide { margin: 0 auto; border: 3px outset yellow; background: #ffc; width: 650px; padding: 5px; font-size: 11px }
+.successWide { margin: 0 auto; border: 3px outset green; background: #cfc; width: 650px; padding: 5px; font-size: 11px }
View
BIN  RESTFul/DC/PHP/.DS_Store
Binary file not shown
View
BIN  RESTFul/DC/PHP/app1/.DS_Store
Binary file not shown
View
69 RESTFul/DC/PHP/app1/README.txt
@@ -0,0 +1,69 @@
+
+ AT&T API Samples - Device Capabilities
+ ----------------------------------------
+
+This file describes how to set up, configure and run the php versions of the AT&T HTML5 Program sample applications.
+It covers all steps required to register the application on DevConnect and, based on the generated API keys and secrets,
+create and run one's own full-fledged sample applications.
+
+ 1. Configuration
+ 2. Installation
+ 3. Parameters
+
+
+1. Configuration
+
+ Configuration consists of a few steps necessary to get an application registered on DevConnect with the proper services and
+ endpoints, depending on the type of client-side application (autonomous/non-autonomous).
+
+ To register an application, go to https://devconnect-api.att.com/ and login with your valid username and password.
+ Next, choose "My Apps" from the bar at the top of the page and click the "Setup a New Application" button.
+
+ Fill in the form, in particular all fields marked as "required".
+
+ Be careful while filling in the "OAuth Redirect URL" field. It should contain the URL that the oAuth provider will redirect
+ users to when he/she successfully authenticates and authorizes your application.
+
+ NOTE: You MUST select Device capability in the list of services under field 'Services' in order to use this sample
+ application code.
+
+ Having your application registered, you will get back an important pair of data: an API key and Secret key. They are
+ necessary to get your applications working with the AT&T HTML5 APIs. See 'Adjusting parameters' below to learn how to use
+ these keys.
+
+ Initially your newly registered application is restricted to the "Sandbox" environment only. To move it to production,
+ you may promote it by clicking the "Promote to production" button. Notice that you will get a different API key and secret,
+ so these values in your application should be adjusted accordingly.
+
+ Depending on the kind of authentication used, an application may be based on either the Autonomous Client or the Web-Server
+ Client OAuth flow (see https://devconnect-api.att.com/docs/oauth20/autonomous-client-application-oauth-flow or
+ https://devconnect-api.att.com/docs/oauth20/web-server-client-application-oauth-flow respectively).
+
+
+2. Installation
+
+Requirements:
+Apache web server
+PHP 5.2+
+Apache and php configured , on most Linux systems if installed using packages this will be done automatically
+
+Installation:
+Copy the sample application folder to apache web root folder, for example /var/www/html
+
+
+3. Parameters
+
+ Each application contains a config.php file. It holds the following configurable parameters and defaults
+
+ 1) $api_key : Client API key
+ 2) $secret_key : Client secret key
+ 3) $short_code : Short code
+ 4) $FQDN = "https://api.att.com" : Endpoint
+ 5) $authorize_redirect_uri = "" : url where oAuth provider will redirect to in case of successful authentication.
+ Needs to be exactly the same as one used while registering application in DevConnect.
+ 6) $scope = "DC" : Oauth scope ( SMS )
+ 7) $default_address : Default phone number
+
+ Note: If your application is promoted from Sandbox environment to Production environment and you decide to use
+ production application settings, you must update parameters 1-2 as per production application details.
+
View
39 RESTFul/DC/PHP/app1/common.css
@@ -0,0 +1,39 @@
+@charset "utf-8";
+/* CSS Document */
+
+html,body{ margin:0;padding:0 }
+body{font: 12px arial,sans-serif;text-align:center; color: #000}
+p{margin:0 10px 10px}
+a{color: #69BBE5 }
+h1 { font-size: 16px; margin: 0 0; }
+h2 { font-size: 14px; margin: 0 0; }
+div#header { background:url(images/att.gif) left center no-repeat; margin: 10px 5px; }
+#hcLeft { float:left; text-align: right; width: 39%; font-weight: bold }
+#hcRight { float:right; width: 59% }
+
+div#content { border-top: 1px dashed #999; }
+
+div#container{ text-align:left; }
+div#content p{line-height:1.4}
+div#navigation{ }
+div#extra{ }
+div#footer{ font-size: 9px; text-align: center; border-top: 1px dashed #999; margin-top: 10px; padding-top: 10px }
+div#footer p{ width: 500px; margin:0 auto;padding:5px 10px}
+
+div#container{width:1000px;margin:0 auto}
+div#navigation{float:left;width:500px}
+div#extra{float:right;width:500px}
+div#footer{clear:both;width:100%}
+
+div#gallerywrapper { width: 900px; margin: 10px auto; padding: 10px }
+div#gallery { float: left; width: 150px; height: 190px; padding: 10px; margin-bottom: 15px; font-size: 9px }
+
+.label, .cell { font: 12px Arial, Sans-serif }
+.label { font-weight: bold }
+
+.error { margin: 0 auto; border: 3px outset red; background: #fcc; width: 250px; padding: 5px; font-size: 11px }
+.warning { margin: 0 auto; border: 3px outset yellow; background: #ffc; width: 250px; padding: 5px; font-size: 11px }
+.success { margin: 0 auto; border: 3px outset green; background: #cfc; width: 250px; padding: 5px; font-size: 11px }
+.errorWide { margin: 0 auto; border: 3px outset red; background: #fcc; width: 650px; padding: 5px; font-size: 11px }
+.warningWide { margin: 0 auto; border: 3px outset yellow; background: #ffc; width: 650px; padding: 5px; font-size: 11px }
+.successWide { margin: 0 auto; border: 3px outset green; background: #cfc; width: 650px; padding: 5px; font-size: 11px }
View
16 RESTFul/DC/PHP/app1/config.php
@@ -0,0 +1,16 @@
+<!--
+Licensed by AT&T under 'Software Development Kit Tools Agreement.' September 2011
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
+Copyright 2011 AT&T Intellectual Property. All rights reserved. http://developer.att.com
+For more information contact developer.support@att.com
+-->
+
+<?php
+ $api_key = "";
+ $secret_key = "";
+ $short_code = "";
+ $FQDN = "https://api.att.com";
+ $authorize_redirect_uri = "http://localhost/attf/app/index.php";
+ $scope = "DC";
+ $default_address = "425-802-8620";
+?>
View
BIN  RESTFul/DC/PHP/app1/images/att.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
275 RESTFul/DC/PHP/app1/index.php
@@ -0,0 +1,275 @@
+<?php
+ header("Content-Type: text/html; charset=ISO-8859-1");
+ session_start();
+ include ("config.php");
+
+function GetAccessToken($FQDN,$api_key,$secret_key,$scope,$authCode){
+
+ // **********************************************************************
+ // ** code to get access token by passing auth code, client ID and
+ // ** client secret
+ // **********************************************************************
+
+ //Form URL to get the access token
+ $accessTok_Url = "$FQDN/oauth/token";
+ //http header values
+ $accessTok_headers = array(
+ 'Content-Type: application/x-www-form-urlencoded'
+ );
+
+
+ //Invoke the URL
+ $post_data="client_id=".$api_key."&client_secret=".$secret_key."&code=".$authCode."&grant_type=authorization_code";
+
+ $accessTok = curl_init();
+ curl_setopt($accessTok, CURLOPT_URL, $accessTok_Url);
+ curl_setopt($accessTok, CURLOPT_HTTPGET, 1);
+ curl_setopt($accessTok, CURLOPT_HEADER, 0);
+ curl_setopt($accessTok, CURLINFO_HEADER_OUT, 0);
+ curl_setopt($accessTok, CURLOPT_HTTPHEADER, $accessTok_headers);
+ curl_setopt($accessTok, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($accessTok, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($accessTok, CURLOPT_POST, 1);
+ curl_setopt($accessTok, CURLOPT_POSTFIELDS,$post_data);
+ $accessTok_response = curl_exec($accessTok);
+
+ $responseCode=curl_getinfo($accessTok,CURLINFO_HTTP_CODE);
+ /*
+ If URL invocation is successful fetch the access token and store it in session,
+ else display the error.
+ */
+ if($responseCode==200)
+ {
+ $jsonObj = json_decode($accessTok_response);
+ $accessToken = $jsonObj->{'access_token'};//fetch the access token from the response.
+ $_SESSION["dc1_deviceInfo_access_token"]=$accessToken;//store the access token in to session.
+ }
+ else{
+ // echo curl_error($accessTok);
+ }
+ curl_close ($accessTok);
+ header("location:index.php");//redirect to the index page.
+ exit;
+
+}
+
+function getAuthCode($FQDN,$api_key,$secret_key,$scope,$authorize_redirect_uri){
+ //Form URL to get the authorization code
+ $authorizeUrl = "$FQDN/oauth/authorize";
+ $authorizeUrl .= "?scope=".$scope;
+ $authorizeUrl .= "&client_id=".$api_key;
+ $authorizeUrl .= "&redirect_uri=".$authorize_redirect_uri;
+
+ header("Location: $authorizeUrl");
+}
+
+$address=$_SESSION["dc1_address"];
+if($address==null){
+ $address = $default_address;
+ $_SESSION["dc1_address"] = $address;
+ }
+
+
+/* Extract the session variables */
+$accessToken = $_SESSION["dc1_deviceInfo_access_token"];
+
+if (!empty($_REQUEST["deviceInfo"])) {
+ $_SESSION["dc1_deviceInfo"] = true;
+ $address = $_POST['address'];
+ if( $address != $_SESSION["dc1_address"]){ // new address entered, need to request new auth code and token
+ $accessToken = null;
+ $authCode =null;
+ }
+ $_SESSION["dc1_address"] = $_POST['address'];
+ }
+
+if ($_SESSION["dc1_deviceInfo"]) {
+
+ if($accessToken == null || $accessToken == '') {
+ $authCode = $_GET["code"];
+ if ($authCode == null || $authCode == "") {
+ getAuthCode( $FQDN,$api_key,$secret_key,$scope,$authorize_redirect_uri);
+ }else{
+ $accessToken = GetAccessToken($FQDN,$api_key,$secret_key,$scope,$authCode);
+ $_SESSION["dc1_deviceInfo_access_token"] = $accessToken;
+ }
+ }
+ }
+
+?>
+<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
+ <title>AT&T Sample DC Application � Get Device Capabilities Application</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
+ <link rel="stylesheet" type="text/css" href="common.css"/ >
+
+<body>
+<div id="container">
+<!-- open HEADER --><div id="header">
+
+<div>
+ <div id="hcRight">
+<?php echo date("D M j G:i:s T Y"); ?>
+</div>
+ <div id="hcLeft">Server Time:</div>
+</div>
+<div>
+ <div id="hcRight"><script language="JavaScript" type="text/javascript">
+var myDate = new Date();
+document.write(myDate);
+</script></div>
+ <div id="hcLeft">Client Time:</div>
+</div>
+<div>
+ <div id="hcRight"><script language="JavaScript" type="text/javascript">
+document.write("" + navigator.userAgent);
+</script></div>
+ <div id="hcLeft">User Agent:</div>
+</div>
+<br clear="all" />
+</div><!-- close HEADER -->
+
+<div id="wrapper">
+<div id="content">
+
+
+<h1>AT&amp;T Sample DC Application - Get Device Capabilities Application</h1>
+<h2>Feature 1: Get Device Capabilities</h2>
+
+</div>
+</div>
+<form name="deviceInfo" method="post">
+
+<div id="navigation">
+
+<table border="0" width="100%">
+ <tbody>
+ <tr>
+ <td width="20%" valign="top" class="label">Phone:</td>
+ <td class="cell"><input maxlength="16" size="12" name="address" value="<?php echo $address; ?>" style="width: 90%">
+ </td>
+ </tr>
+ </tbody></table>
+
+</div>
+<div id="extra">
+
+<table border="0" width="100%">
+ <tbody>
+ <tr>
+ <td class="cell"><button type="submit" name="deviceInfo" value="deviceInfo" >Get Device Capabilities</button>
+ </td>
+ </tr>
+ </tbody></table>
+
+</div>
+<br clear="all" />
+</form>
+
+<?php
+ /* Extract parmeter device Id from deviceInfo form
+ and invoke the URL to get deviceInfo along with access token
+ */
+