tags:

views:

43

answers:

2

Hello,

I'm creating an installer in which the user has to register their details. Those details need to go up to a server by consuming a WCF service that is there.

I'm not sure if Wix can directly consume a WCF service, but if not, can a custom action take the information that has been inserted in a custom WiX UI window? That way the WCF service can be called.

Regards, Darien

A: 

Hi Darien,

Yes, absolutely. There is not any built-in custom action for consuming a wcf service in WIX, but you can create your own action for doing that. Now that WIX supports managed actions, that's really easy to accomplish. The action should basically use a proxy for consuming the wcf service on your server, and it also should use some MSI properties (that the user completed in the UI) for making the call.

Thanks pablo.

A: 

I need to know more about your interaction with the web service. For example, if you need to call it and bring back some data then you'll need to write a C++ or C# custom action. If you only need to publish some data to the service on a best effort basis with no return data flow then you could get away with writing an EXE and just calling that from the install.

Also be sure to consider what should happen if your server isn't available. Does this block the install or is it ok?

If you choose to write a C# custom action, be sure to google for "DTF - Deployment Tools Foundation". You'll find plenty of articles and tips about it on my blog. Basically you create a class that consumes your WCF and exposes a client side private API for it then you write a custom action class that interacts with Windows Installer and passes data back and forth to your first class.

Christopher Painter