|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
结论:和PHP一样,ASP简单而易于维护,很适合小型网站应用,通过DCOM和MTS技术,ASP甚至还可以完成小规模的企业应用,但ASP的致命缺点就是不支持跨平台的系统,在大型项目开发和维护上非常困难。services|webIfyouareusingMicrosoftIE5orlater,youcanusethebehavior/HTML-Component"WebService"toaccessaWebservice.The"WebService"behaviorcommunicateswithWebservicesoverHTTPusingSimpleObjectAccessProtocol(SOAP).
Tousethe"WebService"behavior,youmustattachittoanelementusingtheSTYLEattribute,asfollows:
<DIVID="GiveItAName"
STYLE="behavior:url(webservice.htc)"></DIV>
AcompleteexampletakenfromtheMicrosoftWebsiteisasfollows:
<html>
<head>
<scriptlanguage="JavaScript">
variCallID;
functioninit()
{
service.useService
("http://myserver.com/services/myservice.asmx?WSDL",
"servicename");
}
functiononmyresult()
{
if((event.result.error)&&(iCallID==event.result.id))
{
varxfaultcode=event.result.errorDetail.code;
varxfaultstring=event.result.errorDetail.string;
varxfaultsoap=event.result.errorDetail.raw;
//Addcodetooutputerrorinformationhere
alert("Error");
}
else
{
service.innerHTML="Themethodreturnedtheresult:"
+event.result.value;
}
}
</script>
</HEAD>
<bodyonload="init();">
<BR>
EnteraValue<inputtype=textid=param1>
<BR>
<button>CallAWebMethod</button>
<divid="service"
style="behavior:url(webservice.htc)"
onresult="onmyresult();">
</div>
</body>
</html>
</p>ASP一般认为只能运行在IIS上,正如前面所提到的,这并不是十分正确,事实上,ASP也能运行在Apache上。ApacheASP可在任意Apache服务器上运行有限的ASP功能,所需做的,只需打开mod_perl。 |
|