• λ我爱Aspx >> Asp.Net >> COM+ Web 服务:通过复选框路由到 XML Web Services(1) (微软中国)
  • COM+ Web 服务:通过复选框路由到 XML Web Services(1) (微软中国)

  • :aspxer  Դ:internet  :2007-5-28 20:37:46  ؼ:web,xml,com,com+,微软
  • 要简化在服务器上发布 SOAP 的过程,您可以使用 Microsoft C#™ 或 Visual Basic .NET,并从 ServicedComponent 继承。下面是简单托管组件的托管代码示例:using System;using System.Reflection;using System.Runtime.InteropServices;using System.EnterpriseServices;[assembly: ApplicationName("CSSoap")][assembly: ApplicationActivation(ActivationOption.Server, SoapVRoot="CSSoap")][assembly: AssemblyKeyFile("CSSoap.snk")]namespace CSSoap{ public interface ICalc { double Add (double Value1, double Value2); } [ClassInterface(ClassInterfaceType.AutoDual)] [TransactionAttribute(TransactionOption.None)] public class Calc : ServicedComponent, ICalc { public double Add (double Value1, double Value2); { return (Value1 + Value2); } }}

    上述示例中值得注意的是 ApplicationActivation 属性:[assembly: ApplicationActivation(ActivationOption.Server, SoapVRoot="CSSoap")]

    建立 C# 组件,将它安装在全局程序集缓存中,然后运行 regsvcs.exe 将它注册为 COM+ 应用程序。这样,该组件就被发布为 IIS 虚拟根和 SOAP 端点。要成功地远程使用 ServicedComponent Ҷƪл˵?

  • һƪCOM+ Web 服务:通过复选框路由到 XML Web Services(2) (微软中国)
    һƪ好的,webservice里能返回dataset而不能返回datatable的原因如下: