简体   繁体   English

通过Web服务公开COM +的最简单方法

[英]Easiest way to expose COM+ via web service

I have a COM+ object which is not stateless (it takes a while to initialize, and maintains large objects in RAM). 我有一个不是无状态的COM +对象(初始化需要一段时间,并在RAM中维护大对象)。 I want to expose its functionality to other applications / hosts via web service or TCP/IP. 我想通过Web服务或TCP / IP将其功能公开给其他应用程序/主机。

I saw that COM+ Component Services have a built-in capability to create SOAP wrappers and attach them to IIS. 我看到COM +组件服务具有内置的功能,可以创建SOAP包装并将它们附加到IIS。 However, it looks like it doesn't use the meta-data from the COM+ objects, and I am not sure whether I have control over the creation and destruction of the objects. 但是,看起来它没有使用COM +对象中的元数据,并且我不确定是否可以控制对象的创建和销毁。

You should totally forget the idea of using the built-in integration capability. 您应该完全忘记使用内置集成功能的想法。 It's simply a bad idea. 这简直是​​个坏主意。

Instead, create yourself a WCF service to expose the object. 而是,为自己创建一个WCF服务以暴露该对象。 The WCF service can be stateful if necessary, such that multiple calls to the service from the same client will all go to the same instance of your COM+ object (assuming it supports multiple instances). WCF服务在必要时可以是有状态的,这样,来自同一客户端的对该服务的多次调用将全部转到您的COM +对象的同一实例(假设它支持多个实例)。

Is your object transactional? 您的对象是可交易的吗? You can expose this through WCF, but not through the built-in "integration" capability. 您可以通过WCF公开此内容,但不能通过内置的“集成”功能公开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM