views:

162

answers:

1

I'm using VS 2010 and .net 4.0 beta 1 to do some workflow using WCF. I've created a XAMLX WCF/WF service to receive and process an instance of a class. The class is just a DTO marked with DataContract/DataMember attributes. I've tested it with the WcfTestClient and it works.

So, now I've created another WCF/WF workflow to consume this service - just a console one this time. The XAML is below. I've changed the companyname and lopped out a few attributes (to keep the size down) from the DTO InArgs but otherwise it's untouched.

When I run this, the object doesn't arrive: the WF variable in the XAMLX service is null. Since it works with the WcfTestClient my assumption is that somehow it's not getting sent. I'm not sure how I can confirm this. So, I'm after two things:

  1. Suggestions as to how I can debug this - I'm new to WCF and WF and don't have much experience debugging either.
  2. Can anyone spot what I've done wrong?

Here's my XAML:

<p:Activity mc:Ignorable="" 
            x:Class="TestWorkflowConsoleApp1.Sequence1" 
            xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities/design" 
            xmlns:jtaa="clr-namespace:Company1.TPS.ActivityLibrary.ActiveDirectory;assembly=Company1.TPS.ActivityLibrary.ActiveDirectory"
            xmlns:jtsi="clr-namespace:Company1.TPS.Shovel.Infrastructure;assembly=Company1.TPS.Shovel.Infrastructure" 
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
            xmlns:p="http://schemas.microsoft.com/netfx/2009/xaml/activities" 
            xmlns:p1="http://schemas.microsoft.com/netfx/2009/xaml/servicemodel" 
            xmlns:p2="http://tempuri.org/" 
            xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" 
            xmlns:t="clr-namespace:TestWorkflowConsoleApp1;assembly=TestWorkflowConsoleApp1" 
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
  <p:Sequence DisplayName="Outer Sequence" 
              sad:XamlDebuggerXmlReader.FileName="C:\Work\Visual Studio 2010\Projects\WF\TestWorkflowConsoleApp1\TestWorkflowConsoleApp1\Sequence1.xaml">
    <p:Sequence.Variables>
      <p:Variable x:TypeArguments="jtsi:AccountDetails" 
                  Name="NewAccountDetails" />
      <p:Variable x:TypeArguments="x:String" 
                  Name="Answer" />
    </p:Sequence.Variables>
    <jtaa:CreateAccountDetailsInstance AccountDisplayName="[&quot;kangaroo&quot;]" 
                                       AccountEmployeeID="[&quot;&lt;12345678&gt;&quot;]" 
                                       AccountFirstName="[&quot;Dennis&quot;]" 
                                       AccountLastName="[&quot;Kangaroo&quot;]" 
                                       Result="[NewAccountDetails]" />
    <p:WriteLine>["Sending request: " + NewAccountDetails.DisplayName]</p:WriteLine>
    <p:Sequence>
      <p:Sequence.Variables>
        <p:Variable x:TypeArguments="p1:CorrelationHandle" 
                    Name="__Handle" />
      </p:Sequence.Variables>
      <p1:Send x:Name="__ReferenceID0" 
               OperationName="GetData" 
               ServiceContractName="p2:Contract1" 
               ValueType="jtsi:AccountDetails">
        <p1:Send.AdditionalCorrelations>
          <p:InArgument x:TypeArguments="p1:CorrelationHandle" 
                        x:Key="ChannelBasedCorrelation">[__Handle]</p:InArgument>
        </p1:Send.AdditionalCorrelations>
        <p1:Send.Endpoint>
          <p1:Endpoint Uri="http://localhost:65193/CreateServiceUserService.xamlx/Contract1"&gt;
            <p1:Endpoint.Binding>
              <p1:BasicHttpBinding Name="basicHttpBinding" />
            </p1:Endpoint.Binding>
          </p1:Endpoint>
        </p1:Send.Endpoint>
        <p:InArgument x:TypeArguments="jtsi:AccountDetails">[NewAccountDetails]</p:InArgument>
      </p1:Send>
      <p1:ReceiveReply Request="{x:Reference __ReferenceID0}" 
                       ValueType="x:String">
        <p:OutArgument x:TypeArguments="x:String">[Answer]</p:OutArgument>
      </p1:ReceiveReply>
    </p:Sequence>
    <p:WriteLine>["The response was " + Answer]</p:WriteLine>
    <t:ReadLine />
  </p:Sequence>
</p:Activity>

Here's the DTO:

[DataContract]
public class AccountDetails
{
    public string FirstName { get; set; }
    [DataMember]
    public string LastName { get; set; }
    [DataMember]
    public string DisplayName { get; set; }
    [DataMember]
    public string EmployeeID { get; set; }
    [DataMember]
}
A: 

Solved but I can't remember how.

serialhobbyist