?? ???? ????? ???? ?? ?? ??? ?????? ??? ????, MathService, ?? ??????, subtracting, ?????? ????, ?? ?? ???????? multiplying ?? ??? ??????? exposes ???? ????? ?? ??? ???? ?????
??????????
???????? ?????????, ??????????, ??????? ??????, ???? ?? ????? ?? ???? ??? ?????? ??? ?? ????? ?????? ?? ?????:
- Microsoft Windows 2000 Professional, Windows 2000 ?????, Windows 2000 ????? ?????, Microsoft Windows Server 2003, ?? Windows NT 4.0 ?????
- Microsoft ??????? ????? ????? 4.0 ?? ??????? ????? ?????? 5.0 ?? ??? ?? ???????
- Microsoft Visual Studio .NET ?? Microsoft Visual Studio 2005
?? ???? ????? ?? ?? ?? ????? ???? ?? ?????? ???:
- Visual Studio .NET ?? Visual Studio 2005 ?????? ????? ??????? ?? ????? ???? ????
?????? .asmx ??? ???? ?????
- Visual Studio .NET ?? Visual Studio 2005 ??????? ?????
- ??? ??? ?????? ????? ????? (ASP) .NET ??? ???? ????????? ?????? ??? ???? ?? ???MathService?? ???? ??????? ??? ????? ?? ?? asp.NET ??? ?? ??? ?????? ?? ?? ????? ?? ????? ?????
- ???? ?? ??? ?????? ????? ?? ??? ?????MathService?????? ?? ????
- ???? ?? ??? Service1.asmx ?? ???? ?? ??????? ??? ???? ?? ??? ?????MathService.asmx.
- ????? ????,??? ????? ?? ????? ???? ?? ??? ???? ????? ??????? ????? ?? ????? ???? ?? ??? ??????? ????????
?? ???? ?? ??? ?????????????? ???? Service1???? ?? ???????????? ???? MathService. - ???? ???? ?? ??????????? encapsulate ??????? ?? ????????? ????? ???? ?? ????? ?? ????? ?? ???????? ???? ?? ??? ????????? ???? ????? ???WebMethod?? ?? ????? ??????? ??? ?? ??????? ?? ???? ???? ????? ???? ???? ?? ???? ????? ?? ?????
???:: ???? ??? ???? ?? ??? ???? ???????? ???? ?? ???????? ??WebMethod??????? ??? ?? ??? ???? ?? ?????? ?????? ?? ??? ?? ????????? ??? ???? ??????? ??? ?? ??? ??????????? ????? ?? ?????? ?? ??? ?????? ??WebService???? ?? ??????? ????????? ??? ????? ???? ???? ??? ??? ??????? ????????? ???? ?? ????????? ????, ????? ???? ?? ????? ?? ???? ???WebMethod??????? ?? ?????? ??? ?? ??? ???? ?? ??? ??? ????? ????? ?? ??????
???? ?? ??? ????? ???? ??????MathServices???? ???? ???? ??? ????? ??:
<WebMethod()> Public Function Add(a As Integer, b As Integer) As Integer
Return(a + b)
End Function
<WebMethod()> Public Function Subtract(A As System.Single, B As System.Single) As System.Single
Return A - B
End Function
<WebMethod()> Public Function Multiply(A As System.Single, B As System.Single) As System.Single
Return A * B
End Function
<WebMethod()> Public Function Divide(A As System.Single, B As System.Single) As System.Single
If B = 0
Return -1
End If
Return Convert.ToSingle(A / B)
End Function
- ????? ????,?????????? ????????????? ??? ???? ?? ????? ?? ??? ???
- ??? ???? ?? ??????? ???? ?? ??? MathService.asmx ??? ???? ????? ?? ?????? ????? ??? ?? ?? ????? ?? ????? ???? ?? ??? ??????? ???????? ??? ??, URL ?? http://localhost/MathService/MathService.asmx.
ASP.NET ?????? ?? ???? ??? ???? ??? ????? ??? ???? ?? ????? ???? ?? ?? ???? ??? ?? ????? ???? ??????? ??? ???? ??????? ?? ??????? ???? ?? ??? ???? ???
??? ??? ???? ?? ??? ?? ???? ??
- Visual Studio .NET ?? Visual Studio 2005 ??????? ?????
- ??? ??? ????? ????????? ????????? ??????
- ??? ????? ????????? ?? ??? MathService ??? ???? ?? ??? ??? ?????? ???????
?? ??? ?? ??????? ???????? ?? ?? ???????? ???? ????? ??? ???????? ????? ????? ??, ?? ??? ???????? ???? ?? ?????? ??? ???? ???? ???????? ???? ??? ??? ?? ???????? ?? ??? ??, ?? ??? ???? ?? ?????????? ?????? ?????????? (URI) ?? ???? ??? ?? ?? (?????? ????? ?? ???? SOAP ?? ??? ???)?- ????? ????????????????? ??,??? ?????? ??????.
- ???????? ?????? ??????????? ????? ???, ??? ??? ???? ?? ??? URL ??????????? ????? ?? ENTER ?????? ??? ?? ??? ???? ?? ????? ???? ?? ??? ??????? ???????? ???, URL ?? http://localhost/MathService/MathService.asmx.
- ????? ????,?????? ??????.
- ??????? ??????? ???????????? ?? ?????? Explorer ?? ??? ?? ????? ???? ??? ????? ??? ?????
- ???? ?? ???????? ???????? ?? ??????? ??????
?? ??? ?? Module1 ??????? ?? ????? ????????? ??? ????:
Dim myMathService As localhost.MathService = New localhost.MathService()
- ???????? ???????? ???? ???? ??? ??? ???? ?? ???? ???? ??????? ????:
Console.Write("2 + 4 = {0}", myMathService.Add(2,4))
- ??? ????, ?? ????????? ???????
??? ???? ?? ??? ??? ???????????? (Visual Studio .NET ???)
ASP.NET ??? ?????? ?? asp.NET ??? ???? ?????? (Microsoft .NET Framework ?????? ?? ??????????)
???? XML: UDDI: ??? XML ??? ???? (MSDN Voices ?????):
???? ????? ???? ????? (Wsdl.exe) ??? (Microsoft .NET Framework ?????)
DHTML Dude: ????? ??? ???? ?? DHTML (MSDN Voices ?????):
???? ??????? ?? ???, ????? Microsoft ????????? ?? ??????? ????????? ?????:
???? ??????? ?? ???, ????? ???????? ?????:
???? ID: 301273 - ????? ???????: 04 ?????? 2010 - ??????: 2.0
???? ???? ???? ??:
- Microsoft Visual Basic 2005
- Microsoft Visual Basic .NET 2003 Standard Edition
- Microsoft Visual Basic .NET 2002 Standard Edition
| kbvs2005applies kbvs2005swept kbhowtomaster kbmt KB301273 KbMthi |
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:
301273
(http://support.microsoft.com/kb/301273/en-us/
)