This documentation is archived and is not being maintained.

How to: Invoke a Windows Communication Foundation Contract Operation (Legacy)

This topic describes how to invoke a Windows Communication Foundation (WCF) contract operation using the legacy Windows Workflow Designer that targets the .NET Framework version 3.5 or the .NET Framework 3.0.

After dragging a SendActivity activity from the toolbox to the workflow design surface, you must import an existing contract and determine which operation will be invoked from that SendActivity activity. You select your contract and its operations through the Choose Operation Dialog Box (Legacy).

Also, if you are using a configuration file with your service, you will need to specify a ChannelToken. The ChannelToken identifies the endpoint configuration your send activity is going to use to connect to the workflow service.

To invoke a WCF contract operation from a SendActivity activity

  1. Double-click the SendActivity activity in the designer or click the ellipsis next to the ServiceOperationInfo property in the Properties pane.

  2. When the Choose Operation dialog box opens, click Import in the upper-right corner of the dialog box.

    The Browse and Select a .NET Type Dialog Box (Legacy) opens.

  3. Search for an assembly or project that contains the contract you want.

  4. Select the contract and click OK.

  5. Under Available Operations, select the operation you want to invoke and click OK.

To specify a channel token

  1. Select the SendActivity activity in the designer.

  2. In the Properties pane, specify a name for the ChannelToken. This name uniquely identifies the channel token.

  3. Expand the channel token node and specify a name for the client endpoint you are going to use in the EndpointName field. The endpoint configuration of the same name in the configuration file will be used to configure the channel.

  4. Create the endpoint configuration in your configuration file, if it does not exist already. For more information about configuring your client, see WCF Client Overview.

See Also