Accessing XML Web Services in CAO Mode

If the XML web service you want to access was created by exposing a COM+ application, consider accessing it in client-activated object (CAO) mode, which avoids the run-time generation of a proxy and increases performance by using persistent connections. To access an XML web service in CAO mode, first export the corresponding SOAP-enabled application from your server in proxy mode and then import the application into the client from which you want to access the application as an XML web service. The application's components can then be instantiated on the client just like the components of local applications—for example, using GetObject and CoCreateInstance.

User Interface

Does not apply.

Visual Basic

The following Visual Basic code fragment illustrates the use of a component of a COM+ application that has been exposed as an XML web service in CAO mode.

Set Obj = GetObject("progID")
output = Obj.Method(input)

C/C++

The following code fragment illustrates the use of a component of a COM+ application that has been exposed as an XML web service in CAO mode.

HRESULT hr = CoCreateInstance(
     CLSID_CObject,  // CLSID of the server component
     NULL,
     pBindOptions,
     IID_IUnknown,
     (void**)&pIUnknown);
if (FAILED(hr)) throw(hr);

Accessing XML Web Services in WKO Mode

COM+ SOAP Service Overview

Creating XML Web Services

Securing XML Web Services