我爱Aspx >> Asp.Net >> COM+ Web 服务:通过复选框路由到 XML Web Services(2) (微软中国)将显示以下输出内容:C:\moniker>refpasscaMicrosoft (R) Windows Script Host Version 5.6Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.C1 1C1 2C1 3C1 4C1 5C2 1C2 2C2 3C2 4C2 5C1 5C2 6C2 7C2 8C2 9C1 6C1 7
这与上面的 VBScript CreateObject( ProgID ) 示例的输出内容相同。因为常规 COM+ 激活路径被 SOAP 代理应用程序截获,所以可以使用 CoCreateInstance 、CreateInstance 以及其他传统的 COM+ 激活方法来调用使用 COM+ Web 服务的客户端激活的对象。
程序集和类型名称名字对象,对于从托管代码客户端远程获取预先配置的客户端激活也很有用,如下例所示:Imports SystemImports System.Runtime.InteropServicesModule RefPassClSub Main() Dim ChildMoniker = "soap:assembly=RefPass,typename=RefPass.Child" Dim ParentMoniker = "soap:assembly=RefPass,typename=RefPass.Parent" Dim c1,c2,p as Object c1 = Marshal.BindToMoniker(ChildMoniker) Console.WriteLine(c1.SetName("C1")) Console.WriteLine(c1.CountUp()) Console.WriteLine(c1.CountUp()) Console.WriteLine(c1.CountUp()) Console.WriteLine(c1.CountUp()) Console.WriteLine(c1.CountUp()) c2 = Marshal.BindToMoniker(ChildMoniker) Console.WriteLine(c2.SetName("c2")) Console.WriteLine(c2.CountUp()) Console.WriteLine(c2.CountUp()) Console.WriteLine(c2.CountUp()) Console.WriteLine(c2.CountUp()) Console.WriteLine(c2.CountUp()) p = Marshal.BindToMoniker(ParentMoniker) Console.WriteLine(p.SetRef(c1)) Console.WriteLine(p.CountUp(c2)) Console.WriteLine(p.CountUp(c2)) Console.WriteLine(p.CountUp(c2)) Console.WriteLine(p.CountUp(c2)) Dim c9 Console.WriteLine(p.CountUp(c9)) Dim c3 = p.GetRef() Console.WriteLine(c3.CountUp()) End SubEnd Module
编译并运行此 Visual Basic .NET 应用程序,将产生与前面两个 VBScript CAO 示例相同的输出内容。
因为服务器应用程序将组件发布为 CAO 和 WKO 两种形式,所以由远程客户端选择激活方法。虽然可能只对学术研究有意义,但是单一客户端计算机确实可以使用同一组件的两种远程激活方法,访问远程服务器上同一个 SOAP 发布的虚拟根。
Ҷƪл˵?
COM+ Web 服务:通过复选框路由到..[05-28]
好的,webservice里能返回datase..[05-28]
在Web Service中实现Transaction[05-28]
Data Integrity in Web Services..[05-28]
Data Integrity in Web Services..[05-28]
很老的文章了,不知道有人贴过没..[05-28]
一并给你回答吧:webservice , s..[05-28]
XML Web Service 基础 (转微软MS..[05-28]
在运行时使用 UDDI (微软)[05-28]
实战Web服务[05-28]
COM+ Web 服务:通过复选框路由到..[05-28]
好的,webservice里能返回datase..[05-28]
在Web Service中实现Transaction[05-28]
Data Integrity in Web Services..[05-28]
Data Integrity in Web Services..[05-28]
很老的文章了,不知道有人贴过没..[05-28]
浅谈SOAP (转)[05-28]
一并给你回答吧:webservice , s..[05-28]
XML Web Service 基础 (转微软MS..[05-28]
在运行时使用 UDDI (微软)[05-28]