如何在ASP环境下利用SOAP来调用java开发的Web S...
发布网友
发布时间:2023-10-21 06:43
我来回答
共1个回答
热心网友
时间:2024-03-06 19:33
看看这个
Public Function CalculateDiscount(UnitPrice, CostPrice)
SET objSoapClient = Server.CreateObject("MSSOAP.SoapClient")
objSoapClient.ClientProperty("ServerHTTPRequest") = True
' 下面的链接需要修改为我们具体网站的链接
Call objSoapClient.mssoapinit("http://localhost/ClassicASP_n_DotNET/" & _
"eCommerce.asmx?WSDL", "eCommerce")
' 使用SOAP对象调用Web Service函数
CalculateDiscount = objSoapClient.CalculateDiscountCompanyX(UnitPrice, _
CostPrice, "p455w0rd")
End Function