Friday, November 18, 2005 1:07 PM
distilled
WinFX November CTP: WCF COM+ Integration just got upgraded
As detailed on many other
pages, the WinFX November Community Technology Preview is available for download and this time it works with the release version of Visual Studio 2005.
On the Windows Communication Foundation front and from a COM+ Integration perspective, there are a good number of changes in this build compared with the Beta 1 drop. In addition to a whole host of bug fixes, I've pulled together a top-level summary of the new features in no particular order...
- As described in a previous post, the command-line COM+ Service Model Configuration Tool (ComSvcConfig.exe) has a simple wizard style user interface. This can be invoked from the Service Configuration Editor SDK tool - from the File menu, select Integrate / COM+ Application to get started.
- The ComSvcConfig tool parameters have been modified to increase consistency with existing .NET Framework tools such as gacutil or regasm and the rest of WCF.
What was:
ComSvcConfig.exe add /application:ServiceModelSample
/interface:ServiceModelSample.esCalculator,ICalculator
/hosting:complus
becomes:
ComSvcConfig.exe /install /application:ServiceModelSample
/contract:ServiceModelSample.esCalculator,ICalculator
/hosting:complus
- The ComSvcConfig tool generates more readable default paths that do not contain GUIDs.
What was:
<endpoint address=
"http://localhost/Samples/BE62FF5B-8B53-476B-A385-0F66043049F6.svc" ...
becomes:
<endpoint address=
"http://localhost/Samples/ServiceModelSample.esCalculator.svc ...
- When generating a contract for a COM+ application, the ComSvcConfig tool supports selection of individual methods from an interface rather than only entire interfaces. This enables the developer to get partial support for interfaces where one or more of the methods uses object reference parameters. Previously the interfaces would have failed integration validation since integration doesn't support such tightly coupled patterns. The developer can now opt-in on a per supported method basis.
For example, to select only the debit and credit operations from the IFinances interface:
ComSvcConfig.exe /install /application:OnlineStore
/contract:ItemOrders.Financial,IFinances.{Credit,Debit} /hosting:complus
- The configuration generated by the ComSvcConfig tool now includes a comContract section to store the configuration settings that are used at startup time to control the contract definition for the service. In this relase, this enables customization of the namespace of the contract and the exposed name for the contract - both of these were previously auto-generated and non-configurable. Clearly it also stores the individual methods that have been selected for inclusion on the contract.
<comContracts>
<comContract contract="{C551FBA9-E3AA-4272-8C2A-84BD8D290AC7}"
namespace="http://tempuri.org/mySampleNamespace"
name="ICalculator">
<exposedMethod name="Add" />
<exposedMethod name="Subtract" />
<exposedMethod name="Multiply" />
<exposedMethod name="Divide" />
</comContract>
</comContracts>
- The WCF service moniker now supports retrieivng its contract at runtime using WS-MetadataExchange. This provides a zero-registration approach for COM-based clients that wish to use web services. Rather than requiring client-side installation of a service specific proxy assembly, a full WS-* (secure, reliable, transacted etc.) proxy will be built on-the-fly at runtime. This targets script and Office-based scenarios where full app deployment and registration is undesirable.
For example, assuming that a WCF is installed, the following code is all that is required to invoke a remote service:
Set myProxy = GetObject(
"service:mexAddress=http://servername/Affiliates/service.svc/mex,
address=http://servername/Affiliates/service.svc,
contract=IAffiliate, contractNamespace=http://Microsoft.ServiceModel.Demo,
binding=WSHttpBinding_IAffiliate, bindingNamespace=http://tempuri.org/")
myProxy.Credit( "Andy", 35.99)
- The COM+ Hotfix for "Indigo" is now required. It was previously optional but to provide correct behavior this is now mandatory.
- Methods using User Defined Type parameters (the "struct" construct in COM typelibs) are now supported. This is a common pattern in Visual Basic 6.0 and is now in scope for integration. Support for passing UDTs within VARIANTs should come in a later release.
As always, I'm interested in any feedback, questions or issues that you might hit with the feature.