locked
wcf client proxy class not being generated (for WF Service Receive Operation call) RRS feed

  • Question

  • I have a very simple workflow service where I have two sequential WCF Receive/Reply activities. (The xamlx content is included at the end of this post.)

    In Visual Studio, from a workflow console application project within the same solution, I included a service reference to this workflow service. 
    In the past, the service reference gave me access to generated proxy client classes that I could use to call the WCF operations in the service.
    However, this time after I create the service reference there are no client proxy classes available.

    Based on the name of the interface used for both WCF Receive activities (ITestService), from past experience I expected to have access to a class named 'TestServiceClient' from which I would be able to call the Receive Operations (TestOperation1 and TestOperation2). 

    However, intellisense doesn't show 'TestServiceClient' like in the past and I have no idea what I'm doing differently now. What Intellisense does show is access to the interface 'ITestService', TestOperation1Request, TestOperation1Response, TestOperation2Request, TestOperation2Response, etc.

    Does anyone know the reason why there is now a difference and I don't have the generated client proxy to use? 
    What needs to be done to have access to the client proxy like in the past?

    Here's the xamlx. I can also provide more details if anything is unclear with my description.

    thanks

    <WorkflowService mc:Ignorable="sap" ConfigurationName="Service1" sap:VirtualizedContainerService.HintSize="329,882" Name="Service1" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/servicemodel" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:p="http://tempuri.org/" xmlns:p1="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Xml" xmlns:s3="clr-namespace:System;assembly=System.Core" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:ssa="clr-namespace:System.ServiceModel.Activities;assembly=System.ServiceModel.Activities" xmlns:ssx="clr-namespace:System.ServiceModel.XamlIntegration;assembly=System.ServiceModel" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:t="clr-namespace:TestServiceLibrary;assembly=TestServiceLibrary" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
      <p1:Sequence DisplayName="Sequence_MainPath" sad:XamlDebuggerXmlReader.FileName="C:\VS2010 Projects\CAREPOC\TestServiceLibrary\TestServiceLib.xamlx" sap:VirtualizedContainerService.HintSize="299,852" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
        <p1:Sequence.Variables>
          <p1:Variable x:TypeArguments="CorrelationHandle" Name="SharedHandle" />
        </p1:Sequence.Variables>
        <sap:WorkflowViewStateService.ViewState>
          <scg3:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg3:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <p1:Sequence DisplayName="Sequence1" sap:VirtualizedContainerService.HintSize="277,344">
          <p1:Sequence.Variables>
            <p1:Variable x:TypeArguments="t:ReceivedData" Name="varRecvData1" />
            <p1:Variable x:TypeArguments="t:SentData" Default="[New SentData()]" Name="varSendData1" />
          </p1:Sequence.Variables>
          <sap:WorkflowViewStateService.ViewState>
            <scg3:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            </scg3:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <Receive x:Name="__ReferenceID0" CanCreateInstance="True" sap:VirtualizedContainerService.HintSize="255,90" OperationName="TestOperation1" ServiceContractName="p:ITestService">
            <Receive.CorrelationInitializers>
              <QueryCorrelationInitializer CorrelationHandle="[SharedHandle]">
                <XPathMessageQuery x:Key="key1">
                  <XPathMessageQuery.Namespaces>
                    <ssx:XPathMessageContextMarkup>
                      <x:String x:Key="xg0">http://schemas.datacontract.org/2004/07/TestServiceLibrary</x:String>
                    </ssx:XPathMessageContextMarkup>
                  </XPathMessageQuery.Namespaces>sm:body()/xg0:ReceivedData/xg0:WorkflowID</XPathMessageQuery>
              </QueryCorrelationInitializer>
            </Receive.CorrelationInitializers>
            <ReceiveMessageContent>
              <p1:OutArgument x:TypeArguments="t:ReceivedData">[varRecvData1]</p1:OutArgument>
            </ReceiveMessageContent>
          </Receive>
          <SendReply Request="{x:Reference __ReferenceID0}" DisplayName="SendReplyToReceive" sap:VirtualizedContainerService.HintSize="255,90">
            <SendMessageContent>
              <p1:InArgument x:TypeArguments="t:SentData">[varSendData1]</p1:InArgument>
            </SendMessageContent>
          </SendReply>
        </p1:Sequence>
        <p1:Sequence DisplayName="Sequence2" sap:VirtualizedContainerService.HintSize="277,344">
          <p1:Sequence.Variables>
            <p1:Variable x:TypeArguments="t:ReceivedData" Name="varRecvData2" />
            <p1:Variable x:TypeArguments="t:SentData" Default="[New SentData()]" Name="varSendData2" />
          </p1:Sequence.Variables>
          <sap:WorkflowViewStateService.ViewState>
            <scg3:Dictionary x:TypeArguments="x:String, x:Object">
              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            </scg3:Dictionary>
          </sap:WorkflowViewStateService.ViewState>
          <Receive x:Name="__ReferenceID1" CorrelatesWith="[SharedHandle]" sap:VirtualizedContainerService.HintSize="255,90" OperationName="TestOperation2" ServiceContractName="p:ITestService">
            <Receive.CorrelatesOn>
              <XPathMessageQuery x:Key="key1">
                <XPathMessageQuery.Namespaces>
                  <ssx:XPathMessageContextMarkup>
                    <x:String x:Key="xg0">http://schemas.datacontract.org/2004/07/TestServiceLibrary</x:String>
                  </ssx:XPathMessageContextMarkup>
                </XPathMessageQuery.Namespaces>sm:body()/xg0:ReceivedData/xg0:WorkflowID</XPathMessageQuery>
            </Receive.CorrelatesOn>
            <ReceiveMessageContent>
              <p1:OutArgument x:TypeArguments="t:ReceivedData">[varRecvData2]</p1:OutArgument>
            </ReceiveMessageContent>
          </Receive>
          <SendReply Request="{x:Reference __ReferenceID1}" DisplayName="SendReplyToReceive" sap:VirtualizedContainerService.HintSize="255,90">
            <SendMessageContent>
              <p1:InArgument x:TypeArguments="t:SentData">[varSendData2]</p1:InArgument>
            </SendMessageContent>
          </SendReply>
        </p1:Sequence>
      </p1:Sequence>
    </WorkflowService>

     

     

     

     

     

    Wednesday, February 23, 2011 5:59 PM

Answers

  • Hi,

    The behavior is expected. Since your client project is Workflow Console Application, the "Add Service Reference" will generate WCF proxy as custom activities. In your case, ASR will generate two activities: TestOperation1, TestOperation2.  You can open the xaml file in client project, and then Build, you will find these two activities show up in toolbox.

     

    • Marked as answer by rgorman Thursday, February 24, 2011 6:38 PM
    Thursday, February 24, 2011 5:08 AM

All replies

  • Hi,

    The behavior is expected. Since your client project is Workflow Console Application, the "Add Service Reference" will generate WCF proxy as custom activities. In your case, ASR will generate two activities: TestOperation1, TestOperation2.  You can open the xaml file in client project, and then Build, you will find these two activities show up in toolbox.

     

    • Marked as answer by rgorman Thursday, February 24, 2011 6:38 PM
    Thursday, February 24, 2011 5:08 AM
  • Thank you for your response, Juyu. 

    William

    Thursday, February 24, 2011 5:24 PM