日期:2014-05-16  浏览次数:20362 次

用js编写测试axis页面

<html>
<head>
<title>测试短信专家系统的WebService服务</title>
<STYLE type="text/css">
p,div,a {
?marign: 0px;
?padding: 0px;
?font-size: 12px;
?font-family: "Tahoma", "Arial", "";
}

table,td {
?marign: 0px;
?padding: 0px;
?font-size: 12px;
?font-family: "Tahoma", "Arial", "";
?line-height: 150%;
?white-space: normal;
?word-wrap: break-word;
?word-break: break-all;
?border-style: dotted;
?border-width: 1px;
}

input,option,select {
?marign: 0px;
?padding: 0px;
?font-size: 12px;
?font-family: "Tahoma", "Arial", "";
?border-style: solid;
?border-width: 1px;
?border-color: #ccc;
}

.divininoShow {
?display: none;
}
.fontRed {
?color: red;
}
</style>

<script language="javascript">

function HTTPRequest()
{
 var xmlhttp=null;
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (_e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (_E) { }
 }
 if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
  try {
   xmlhttp = new XMLHttpRequest();
  } catch (e) {
   xmlhttp = false;
  }
? }
 return xmlhttp;
}

1 楼 aiyalhw 2009-12-24  

</head>
<body>
<h5 align="center">测试短信专家系统的WebService服务</h5>

<p>WebService服务地址:<input type="text" id="epr"
value="http://10.71.173.55:8089/services/SmsInterfaceService"
size="80" /> <font class="fontRed">*</font></p>

<input type="button" onclick="displayDiv('smcDetailQuery')" value=" 测试明细查询" />

<hr width="100%" align="left" />


<div id="smcDetailQuery" class="divininoShow">

<table>
<tr>
<td>用户名</td>
<td><input type="text" id="user" value="webservice" /></td>
<td></td>
</tr>
<tr>
<td>密码</td>
<td><input type="text" id="userPwd" value="ZuGk3JPiITU9rpUA7RlU8OqLFPc=" /> </td>
<td>密码需加密后发送</td>
</tr>
<tr>
<td>主叫号码</td>
<td><input type="text" id="orgNo" value="" /> </td>
<td></td>
</tr>
<tr>
<td>被叫号码</td>
<td><input type="text" id="destNo" value="8613500000009" /> </td>
</tr>
<tr>
<td>开始时间</td>
<td><input type="text" id="startTime" value="20091111000000" /></td>
<td>&nbsp;时间格式:yyyyMMddHHmmss</td>
</tr>
<tr>
<td>结束时间</td>
<td><input type="text" id="endTime" value="20091111000500" />   </td>
<td>&nbsp;时间格式:yyyyMMddHHmmss</td>
</tr>
<tr>
<td><input type="button"
onclick="javascript:Http_RequestSmcDetailQuery();" value=" send " /></td>
<td>&nbsp;</td>
</tr>
</table>

</div>

<table border="0" width="100%">
<tr>
<td id="tdresult"></td>
</tr>
</table>
</body>
</html>
2 楼 aiyalhw 2009-12-24  

function Http_RequestSmcDetailQuery()
{
//alert($("user").value+$("userPwd").value+$("orgNo").value+$("destNo").value+$("startTime").value+$("endTime").value);
//alert(startTime.value+endTime.value);
  soaprequest = "<?xml ve