Bladeren bron

四平短信接口

tchao 3 jaren geleden
commit
402f52055b
40 gewijzigde bestanden met toevoegingen van 866 en 0 verwijderingen
  1. 22 0
      .classpath
  2. 8 0
      .idea/.gitignore
  3. 4 0
      .idea/encodings.xml
  4. 6 0
      .idea/misc.xml
  5. 8 0
      .idea/modules.xml
  6. 10 0
      .idea/runConfigurations.xml
  7. 6 0
      .idea/vcs.xml
  8. 13 0
      .mymetadata
  9. 58 0
      .project
  10. 12 0
      .settings/.jsdtscope
  11. 3 0
      .settings/com.genuitec.eclipse.ws.prefs
  12. 7 0
      .settings/org.eclipse.jdt.core.prefs
  13. 9 0
      .settings/org.eclipse.wst.common.component
  14. 7 0
      .settings/org.eclipse.wst.common.project.facet.core.xml
  15. 1 0
      .settings/org.eclipse.wst.jsdt.ui.superType.container
  16. 1 0
      .settings/org.eclipse.wst.jsdt.ui.superType.name
  17. 155 0
      Servlet.iml
  18. 3 0
      WebRoot/META-INF/MANIFEST.MF
  19. BIN
      WebRoot/WEB-INF/classes/com/sms/sms/LsSMS.class
  20. BIN
      WebRoot/WEB-INF/classes/com/sms/sms/SMS.class
  21. BIN
      WebRoot/WEB-INF/classes/com/sms/sms/test.class
  22. BIN
      WebRoot/WEB-INF/lib/annotations-13.0.jar
  23. BIN
      WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar
  24. BIN
      WebRoot/WEB-INF/lib/httpclient-4.1.2.jar
  25. BIN
      WebRoot/WEB-INF/lib/httpcore-4.1.2.jar
  26. BIN
      WebRoot/WEB-INF/lib/jclasslib-browser.jar
  27. BIN
      WebRoot/WEB-INF/lib/jclasslib-library.jar
  28. BIN
      WebRoot/WEB-INF/lib/jclasslib.jar
  29. BIN
      WebRoot/WEB-INF/lib/kotlin-runtime-1.0.6.jar
  30. BIN
      WebRoot/WEB-INF/lib/kotlin-stdlib-1.0.6.jar
  31. BIN
      WebRoot/WEB-INF/lib/kotlinx.dom-0.0.10.jar
  32. BIN
      WebRoot/WEB-INF/lib/miglayout-core-5.0.jar
  33. BIN
      WebRoot/WEB-INF/lib/miglayout-swing-5.0.jar
  34. BIN
      WebRoot/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar
  35. 19 0
      WebRoot/WEB-INF/web.xml
  36. 26 0
      WebRoot/index.jsp
  37. BIN
      WebRoot/sms.war
  38. 224 0
      src/com/sms/sms/LsSMS.java
  39. 223 0
      src/com/sms/sms/SMS.java
  40. 41 0
      src/com/sms/sms/test.java

+ 22 - 0
.classpath

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_32"/>
+	<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/httpclient-4.1.2.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/httpcore-4.1.2.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jclasslib.jar" sourcepath="WebRoot/WEB-INF/lib/jclasslib.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jclasslib-library.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/annotations-13.0.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jclasslib-browser.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/kotlin-runtime-1.0.6.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/kotlin-stdlib-1.0.6.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/kotlinx.dom-0.0.10.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/miglayout-core-5.0.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/miglayout-swing-5.0.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+	<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
+</classpath>

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 4 - 0
.idea/encodings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
+</project>

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/classes" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/Servlet.iml" filepath="$PROJECT_DIR$/Servlet.iml" />
+    </modules>
+  </component>
+</project>

+ 10 - 0
.idea/runConfigurations.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RunConfigurationProducerService">
+    <option name="ignoredProducers">
+      <set>
+        <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
+      </set>
+    </option>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 13 - 0
.mymetadata

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-module
+  type="WEB"
+  name="Servlet"
+  id="myeclipse.1524465791224"
+  context-root="/Servlet"
+  j2ee-spec="5.0"
+  archive="Servlet.war">
+  <attributes>
+    <attribute name="webrootdir" value="WebRoot" />
+  </attributes>
+</project-module>
+

+ 58 - 0
.project

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Servlet</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
+		<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+	</natures>
+</projectDescription>

+ 12 - 0
.settings/.jsdtscope

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+		<attributes>
+			<attribute name="hide" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+	<classpathentry kind="src" path="WebRoot"/>
+	<classpathentry kind="output" path=""/>
+</classpath>

+ 3 - 0
.settings/com.genuitec.eclipse.ws.prefs

@@ -0,0 +1,3 @@
+#Mon Apr 23 14:43:12 GMT+08:00 2018
+eclipse.preferences.version=1
+ws.framework.id=com.genuitec.eclipse.ws.jaxws

+ 7 - 0
.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

+ 9 - 0
.settings/org.eclipse.wst.common.component

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="Servlet">
+        <wb-resource deploy-path="/" source-path="/WebRoot"/>
+        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+        <property name="context-root" value="/Servlet"/>
+        <property name="java-output-path" value="/Servlet/WebRoot/WEB-INF/classes"/>
+    </wb-module>
+</project-modules>

+ 7 - 0
.settings/org.eclipse.wst.common.project.facet.core.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <fixed facet="wst.jsdt.web"/>
+  <installed facet="java" version="1.5"/>
+  <installed facet="jst.web" version="2.5"/>
+  <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>

+ 1 - 0
.settings/org.eclipse.wst.jsdt.ui.superType.container

@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary

+ 1 - 0
.settings/org.eclipse.wst.jsdt.ui.superType.name

@@ -0,0 +1 @@
+Window

+ 155 - 0
Servlet.iml

@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="EclipseModuleManager">
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/httpclient-4.1.2.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/httpcore-4.1.2.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/jclasslib.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/jclasslib-library.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/annotations-13.0.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/jclasslib-browser.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/kotlin-runtime-1.0.6.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/kotlin-stdlib-1.0.6.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/kotlinx.dom-0.0.10.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/miglayout-core-5.0.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/miglayout-swing-5.0.jar!/" />
+    <conelement value="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER" />
+    <conelement value="org.eclipse.jst.j2ee.internal.web.container" />
+    <conelement value="org.eclipse.jst.j2ee.internal.module.container" />
+    <src_description expected_position="0">
+      <src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
+    </src_description>
+  </component>
+  <component name="NewModuleRootManager">
+    <output url="file://$MODULE_DIR$/WebRoot/WEB-INF/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="jdk" jdkName="jdk1.6.0_32" jdkType="JavaSDK" />
+    <orderEntry type="library" name="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER" level="application" />
+    <orderEntry type="module-library">
+      <library name="httpclient-4.1.2.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/httpclient-4.1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="httpcore-4.1.2.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/httpcore-4.1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="mysql-connector-java-5.1.5-bin.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="commons-logging-1.1.1.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="jclasslib.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/jclasslib.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/jclasslib.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="jclasslib-library.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/jclasslib-library.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="annotations-13.0.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/annotations-13.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="jclasslib-browser.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/jclasslib-browser.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="kotlin-runtime-1.0.6.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/kotlin-runtime-1.0.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="kotlin-stdlib-1.0.6.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/kotlin-stdlib-1.0.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="kotlinx.dom-0.0.10.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/kotlinx.dom-0.0.10.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="miglayout-core-5.0.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/miglayout-core-5.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="miglayout-swing-5.0.jar">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/WebRoot/WEB-INF/lib/miglayout-swing-5.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="org.eclipse.jst.j2ee.internal.web.container" level="application" />
+    <orderEntry type="library" name="org.eclipse.jst.j2ee.internal.module.container" level="application" />
+  </component>
+</module>

+ 3 - 0
WebRoot/META-INF/MANIFEST.MF

@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

BIN
WebRoot/WEB-INF/classes/com/sms/sms/LsSMS.class


BIN
WebRoot/WEB-INF/classes/com/sms/sms/SMS.class


BIN
WebRoot/WEB-INF/classes/com/sms/sms/test.class


BIN
WebRoot/WEB-INF/lib/annotations-13.0.jar


BIN
WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar


BIN
WebRoot/WEB-INF/lib/httpclient-4.1.2.jar


BIN
WebRoot/WEB-INF/lib/httpcore-4.1.2.jar


BIN
WebRoot/WEB-INF/lib/jclasslib-browser.jar


BIN
WebRoot/WEB-INF/lib/jclasslib-library.jar


BIN
WebRoot/WEB-INF/lib/jclasslib.jar


BIN
WebRoot/WEB-INF/lib/kotlin-runtime-1.0.6.jar


BIN
WebRoot/WEB-INF/lib/kotlin-stdlib-1.0.6.jar


BIN
WebRoot/WEB-INF/lib/kotlinx.dom-0.0.10.jar


BIN
WebRoot/WEB-INF/lib/miglayout-core-5.0.jar


BIN
WebRoot/WEB-INF/lib/miglayout-swing-5.0.jar


BIN
WebRoot/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar


+ 19 - 0
WebRoot/WEB-INF/web.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <distributable/>
+ <servlet>
+  <servlet-name>SMS</servlet-name>
+  <servlet-class>com.sms.sms.SMS</servlet-class>
+ </servlet>
+ <servlet-mapping>
+  <servlet-name>SMS</servlet-name>
+  <url-pattern>/sevelt/item/SMS</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+  <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+ <login-config>
+  <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>

+ 26 - 0
WebRoot/index.jsp

@@ -0,0 +1,26 @@
+<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
+<%
+String path = request.getContextPath();
+String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <base href="<%=basePath%>">
+    
+    <title>My JSP 'index.jsp' starting page</title>
+	<meta http-equiv="pragma" content="no-cache">
+	<meta http-equiv="cache-control" content="no-cache">
+	<meta http-equiv="expires" content="0">    
+	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
+	<meta http-equiv="description" content="This is my page">
+	<!--
+	<link rel="stylesheet" type="text/css" href="styles.css">
+	-->
+  </head>
+  
+  <body>
+    This is my JSP page. <br>
+  </body>
+</html>

BIN
WebRoot/sms.war


+ 224 - 0
src/com/sms/sms/LsSMS.java

@@ -0,0 +1,224 @@
+package com.sms.sms;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.security.MessageDigest;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+
+
+public class LsSMS extends HttpServlet{
+
+	/**
+	 * @param args
+	 */
+	/*public static void main(String[] args) {
+		SMS s=new SMS();
+		s.Smsending();
+	}*/
+	public void doGet(HttpServletRequest request, HttpServletResponse response)  
+    throws ServletException, IOException { 
+		this.doPost(request, response);
+	}
+	 public void doPost(HttpServletRequest request, HttpServletResponse response)  
+	    throws ServletException, IOException {  
+	    	response.setContentType("text/html;charset=utf-8");  
+		    request.setCharacterEncoding("utf-8");  
+		    response.setCharacterEncoding("utf-8");
+		    String phone=request.getParameter("phone");
+		    String content=request.getParameter("content");
+		  //接口地址
+			String url = "http://smssh1.253.com/msg/send/json";
+			//下发时间
+			String mttime = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
+			Map<String,String> param = new HashMap<String,String>();
+			param.put("account","N6515600");
+			param.put("password", "wyIYk5oAp41883");
+			try {
+				param.put("msg", "【鼎昱科技】您有一个待办事宜请及时处理!");
+				//param.put("msg", content);
+				
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+			param.put("phone", phone);
+			//param.put("subid","01");
+			//param.put("mttime", mttime);
+			//param.put("rpttype", "1");
+			String result = sendPost(url,param);
+			//返回值类型{"ReqCode":"00","ReqMsg":"提交成功","ReqId":"180424144746103010100003"}
+			result=result.replaceAll("\\{", "");
+			result=result.replaceAll("\\}", "");
+			result=result.replaceAll("\"", "");
+			String[] resultz= result.split(",");
+			String reqcode=resultz[0].split(":")[1];
+			String reqmsg=resultz[1].split(":")[1];
+			String reqid=resultz[2].split(":")[1];
+			
+			System.out.println(result);
+			 //this.doPost(request, response);  
+		    JavaJdbc(phone,content,mttime,reqcode,reqmsg,reqid);
+	    }  
+    //链接mysql数据库并写入值关闭链接
+    public static void JavaJdbc(String phone,String content,String mttime,String reqcode,String reqmsg,String reqid){
+    	 String driver = "com.mysql.jdbc.Driver";
+         // URL指向要访问的数据库名scutcs
+         String url = "jdbc:mysql://localhost:3306/sms";
+         // MySQL配置时的用户名
+         String user = "root"; 
+         // MySQL配置时的密码
+         String password = "root";
+         Date d = new Date();
+         try { 
+          // 加载驱动程序
+          Class.forName(driver);
+          // 连续数据库
+          Connection conn = DriverManager.getConnection(url, user, password);
+          if(!conn.isClosed()) 
+           System.out.println("Succeeded connecting to the Database!");
+          // statement用来执行SQL语句
+          Statement statement = conn.createStatement();
+          // 要执行的SQL语句
+          String sql="insert into sms  values ('"+phone+"','"+mttime+"','"+reqcode+"','"+reqmsg+"','"+reqid+"','"+content+"')"; 
+          statement.executeUpdate(sql);
+          conn.close();
+         } catch(ClassNotFoundException e) {
+	         System.out.println("Sorry,can`t find the Driver!"); 
+	         e.printStackTrace();
+         } catch(Exception e) {
+        	 e.printStackTrace();
+         } 
+    }
+    
+    public static void main(String[] args) {
+		//接口地址
+		String url = "http://58.244.255.111:81/cns-bmfw-web/rest/szxxrest/addCaseInfo";
+		//下发时间
+		//String mttime = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
+		Map<String,String> param = new HashMap<String,String>();
+		//param.put("account","N6515600");
+		//param.put("password", "wyIYk5oAp41883");
+		try {
+			//param.put("msg", "【鼎昱科技】您有一个待办事宜请及时处理!");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		//param.put("phone", "15044409703");
+		param.put("token", "Epoint_WebSerivce_**##0601");
+		param.put("params", "{rqstTitle+:1,rqstPerson:1,linkNumber:1,rqstAddress:1,rqstContent:1}");
+		
+		String result = sendPost(url,param);
+		result=result.replaceAll("\\{", "");
+		result=result.replaceAll("\\}", "");
+		result=result.replaceAll("\"", "");
+		String[] resultz= result.split(",");
+		String reqcode=resultz[0].split(":")[1];
+		System.out.println(resultz); 
+		
+	}
+	public static String sendPost(String url,Map<String,String> params) {
+		URL u = null;
+		HttpURLConnection con = null;
+		//构建请求参数
+		StringBuffer sb = new StringBuffer();
+		StringBuffer sb1 = new StringBuffer();
+		if(params != null) {
+			for(java.util.Map.Entry<String,String> e : params.entrySet()) {
+				sb.append("\""+e.getKey()+"\""+":"+"\""+e.getValue()+"\""+",");
+			//	sb.append(e.getKey()).append("'").append(e.getValue()).append("'");
+			}
+			//sb.substring(0,sb.length() - 1);
+			sb.deleteCharAt(sb.length()-1);
+			sb.insert(0,"{");
+			sb.append("}");
+			sb1.append("{\"token\":\"Epoint_WebSerivce_**##0601\",\"params\": {\"rqstTitle\": \"测试接口题目\",\"rqstPerson\": \"登记人\",\"linkNumber\": \"123\",\"rqstAddress\": \"地址\",\"rqstContent\": \"诉求内容\"}}");
+			}
+		//尝试发送请求
+		try {
+			u = new URL(url);
+			con = (HttpURLConnection) u.openConnection();
+			con.setRequestMethod("POST");
+			con.setConnectTimeout(6000);
+			con.setDoOutput(true);
+			con.setDoInput(true);
+			con.setUseCaches(false);
+			//con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+			con.setRequestProperty("Content-Type", "application/json");
+			OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream(),"UTF-8");
+			osw.write(sb1.toString());
+			osw.flush();
+			osw.close();
+		}catch(Exception e) {
+			e.printStackTrace();
+		}finally {
+			if(con != null) {
+				con.disconnect();
+			}
+		}
+		//读取返回内容
+		StringBuffer buffer = new StringBuffer();
+		try {
+			BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"UTF-8"));
+			String temp;
+			while ((temp = br.readLine()) != null) {
+				buffer.append(temp).append("\n");
+			}
+		}catch (Exception e) {
+			e.printStackTrace();
+		}
+		System.out.println(buffer);
+		return buffer.toString();
+	}
+	public static String MD51(String str) {
+		MessageDigest md5 = null;
+		try {
+			md5 = MessageDigest.getInstance("MD5");
+		}catch (Exception e) {
+			e.printStackTrace();
+			return "";
+		}
+		char[] charArray = str.toCharArray();
+		byte[] byteArray = new byte[charArray.length];
+		for(int i = 0;i < charArray.length;i++)
+			byteArray[i] = (byte) charArray[i];
+			byte[] md5Bytes = md5.digest(byteArray);
+		StringBuffer hexValue = new StringBuffer();
+		for(int i = 0; i < md5Bytes.length;i++) {
+			int val = ((int) md5Bytes[i]) & 0xff;
+			if(val < 16) {
+				hexValue.append("0");
+			}
+			hexValue.append(Integer.toHexString(val));
+		}
+		return hexValue.toString();
+	}
+    
+}

+ 223 - 0
src/com/sms/sms/SMS.java

@@ -0,0 +1,223 @@
+package com.sms.sms;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.security.MessageDigest;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.Statement;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+
+
+public class SMS extends HttpServlet{
+
+	/**
+	 * @param args
+	 */
+	/*public static void main(String[] args) {
+		SMS s=new SMS();
+		s.Smsending();
+	}*/
+	public void doGet(HttpServletRequest request, HttpServletResponse response)  
+    throws ServletException, IOException { 
+		this.doPost(request, response);
+	}
+	 public void doPost(HttpServletRequest request, HttpServletResponse response)  
+	    throws ServletException, IOException {  
+	    	response.setContentType("text/html;charset=utf-8");  
+		    request.setCharacterEncoding("utf-8");  
+		    response.setCharacterEncoding("utf-8");
+		    String phone=request.getParameter("phone");
+		    String content=request.getParameter("content");
+		  //接口地址
+			String url = "http://106.14.55.160:9000/HttpSmsMt";
+			//下发时间
+			String mttime = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
+			Map<String,String> param = new HashMap<String,String>();
+			param.put("name","jlltzwy");
+			param.put("pwd", SMS.MD51("ad4cb4470018c0854d2e1c06f7bcca25" + mttime));
+			try {
+				//param.put("content", "【移动办公提醒】您有一个待办事宜请及时处理!");
+				param.put("content", content);
+				
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+			param.put("phone", phone);
+			param.put("subid","01");
+			param.put("mttime", mttime);
+			param.put("rpttype", "1");
+			
+			System.out.println(phone+"开始发送请求:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+			String result = sendPost(url,param);
+			//返回值类型{"ReqCode":"00","ReqMsg":"提交成功","ReqId":"180424144746103010100003"}
+			System.out.println(phone+"请求结果返回值:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+			result=result.replaceAll("\\{", "");
+			result=result.replaceAll("\\}", "");
+			result=result.replaceAll("\"", "");
+			String[] resultz= result.split(",");
+			String reqcode=resultz[0].split(":")[1];
+			String reqmsg=resultz[1].split(":")[1];
+			String reqid=resultz[2].split(":")[1];
+			System.out.println(phone+"开始执行数据库插入:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+		    JavaJdbc(phone,content,mttime,reqcode,reqmsg,reqid);
+	    }  
+    //链接mysql数据库并写入值关闭链接
+    public static void JavaJdbc(String phone,String content,String mttime,String reqcode,String reqmsg,String reqid){
+    	 String driver = "com.mysql.jdbc.Driver";
+         // URL指向要访问的数据库名scutcs
+         String url = "jdbc:mysql://localhost:3306/sms";
+         // MySQL配置时的用户名
+         String user = "root"; 
+         // MySQL配置时的密码
+         String password = "root";
+         Date d = new Date();
+         try { 
+          // 加载驱动程序
+          Class.forName(driver);
+          // 连续数据库
+          Connection conn = DriverManager.getConnection(url, user, password);
+          if(!conn.isClosed()) 
+           System.out.println("Succeeded connecting to the Database!");
+          // statement用来执行SQL语句
+          Statement statement = conn.createStatement();
+          // 要执行的SQL语句
+          String sql="insert into sms  values ('"+phone+"','"+mttime+"','"+reqcode+"','"+reqmsg+"','"+reqid+"','"+content+"')"; 
+          statement.executeUpdate(sql);
+          conn.close();
+          System.out.println(phone+"存储数据库完成:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+         } catch(ClassNotFoundException e) {
+	         System.out.println("Sorry,can`t find the Driver!"); 
+	         e.printStackTrace();
+         } catch(Exception e) {
+        	 e.printStackTrace();
+         } 
+    }
+    
+    public static void main(String[] args) {
+    	
+		//接口地址
+		String url = "http://106.14.55.160:9000/HttpSmsMt";
+		//下发时间
+		String mttime = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
+		Map<String,String> param = new HashMap<String,String>();
+		param.put("name","jlltzwy");
+		param.put("pwd", SMS.MD51("ad4cb4470018c0854d2e1c06f7bcca25" + mttime));
+		try {
+			param.put("content", "【移动办公提醒】您有一个待办事宜请及时处理!");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		param.put("phone", "15044409703");
+		param.put("subid","01");
+		param.put("mttime", mttime);
+		param.put("rpttype", "1");
+		System.out.println("开始发送请求:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+		String result = sendPost(url,param);
+		System.out.println("请求返回值:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+		result=result.replaceAll("\\{", "");
+		result=result.replaceAll("\\}", "");
+		result=result.replaceAll("\"", "");
+		String[] resultz= result.split(",");
+		String reqcode=resultz[0].split(":")[1];
+		String reqmsg=resultz[1].split(":")[1];
+		String reqid=resultz[2].split(":")[1];
+		System.out.println(result);
+		
+	}
+	public static String sendPost(String url,Map<String,String> params) {
+		URL u = null;
+		HttpURLConnection con = null;
+		//构建请求参数
+		StringBuffer sb = new StringBuffer();
+		if(params != null) {
+			for(java.util.Map.Entry<String,String> e : params.entrySet()) {
+				sb.append(e.getKey()).append("=").append(e.getValue()).append("&");
+			}
+			sb.substring(0,sb.length() - 1);
+		}
+		//尝试发送请求
+		try {
+			u = new URL(url);
+			con = (HttpURLConnection) u.openConnection();
+			con.setRequestMethod("POST");
+			con.setConnectTimeout(6000);
+			con.setDoOutput(true);
+			con.setDoInput(true);
+			con.setUseCaches(false);
+			con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+			OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream(),"UTF-8");
+			osw.write(sb.toString());
+			osw.flush();
+			osw.close();
+		}catch(Exception e) {
+			e.printStackTrace();
+		}finally {
+			if(con != null) {
+				con.disconnect();
+			}
+		}
+		//读取返回内容
+		StringBuffer buffer = new StringBuffer();
+		try {
+			BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"UTF-8"));
+			String temp;
+			while ((temp = br.readLine()) != null) {
+				buffer.append(temp).append("\n");
+			}
+		}catch (Exception e) {
+			e.printStackTrace();
+		}
+		return buffer.toString();
+	}
+	public static String MD51(String str) {
+		MessageDigest md5 = null;
+		try {
+			md5 = MessageDigest.getInstance("MD5");
+		}catch (Exception e) {
+			e.printStackTrace();
+			return "";
+		}
+		char[] charArray = str.toCharArray();
+		byte[] byteArray = new byte[charArray.length];
+		for(int i = 0;i < charArray.length;i++)
+			byteArray[i] = (byte) charArray[i];
+			byte[] md5Bytes = md5.digest(byteArray);
+		StringBuffer hexValue = new StringBuffer();
+		for(int i = 0; i < md5Bytes.length;i++) {
+			int val = ((int) md5Bytes[i]) & 0xff;
+			if(val < 16) {
+				hexValue.append("0");
+			}
+			hexValue.append(Integer.toHexString(val));
+		}
+		return hexValue.toString();
+	}
+    
+}

+ 41 - 0
src/com/sms/sms/test.java

@@ -0,0 +1,41 @@
+package com.sms.sms;
+
+import java.io.*;     
+import org.gjt.jclasslib.io.ClassFileWriter;     
+import org.gjt.jclasslib.structures.CPInfo;     
+import org.gjt.jclasslib.structures.ClassFile;     
+import org.gjt.jclasslib.structures.constants.ConstantLongInfo;  
+import org.gjt.jclasslib.structures.constants.ConstantUtf8Info;
+public class test {     
+    public static void main(String[] args) throws Exception {     
+    
+        String filePath = "C:\\LicenseService.class";     
+        FileInputStream fis = new FileInputStream(filePath);     
+             
+        DataInput di = new DataInputStream(fis);     
+        ClassFile cf = new ClassFile();     
+        cf.read(di);     
+        CPInfo[] infos = cf.getConstantPool();     
+             
+        int count = infos.length;     
+        for (int i = 0; i < count; i++) {     
+            if (infos[i] != null) {     
+                System.out.print(i);     
+                System.out.print(" = ");     
+                System.out.print(infos[i].getVerbose());     
+                System.out.print(" = ");     
+                System.out.println(infos[i].getTagVerbose());     
+                if(i == 481){     
+                	ConstantUtf8Info uInfo = (ConstantUtf8Info)infos[i];    
+                	
+                    uInfo.setBytes("10000".getBytes());     
+                    infos[i]=uInfo;     
+                }     
+            }     
+        }     
+        cf.setConstantPool(infos);     
+        fis.close();     
+        File f = new File(filePath);     
+        ClassFileWriter.writeToFile(f, cf);     
+    }     
+}