none
Broker Response not returning/hanging RRS feed

  • Question

  • I'm trying to run a WCF service I've created via HPC (2012 R2).  The service has a complex type as both input and return value.  Basically the service takes the complex data type, runs some calculations, populates additional fields in the data structure, and returns the modified data. The entire service is in a try-catch-finally loop, so it should simply return the input unchanged if it fails. 

    In the client, the session starts and runs to completion (with failure likely as it returns too quickly) and eventually shows as 'Finished' in the job management tab of the Cluster Manager.  The client hangs on the foreach line listed below

    int j = 0;

    foreach (BrokerResponse<WCFResponse> response in hpcResponses)  {     j++;

    //Other stuff

    }

    with a break statement on j++; I never get there.  I'm about to leave this overnight to see if it times out or produces an error.  I can toss in more code snippets if needed.  I've created other test services, albeit which return simple types, which I'm using as a template so I'm at a loss as to why this is failing silently.


    • Edited by KWilliams1 Monday, February 23, 2015 11:17 PM
    Monday, February 23, 2015 11:14 PM

All replies

  • Hi KWilliams1,

    Do you mean that with simple data type, the service client works well, however with complext data type it doesn't? Could you post more service and client code? Btw, you may specify a timeout in the BrokerClient.GetResponses() call which by default is Timeout.Infinite.

    Best,

    Yutong

    Thursday, February 26, 2015 8:24 AM
    Moderator
  • For example, if in the SOA service there is a data contract for person

    class Person {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime DateOfBirth { get; set;}
        public DateTime CurrentDate {get;set;}
        public int Age { get; set; }
    }

    And an operation contract that calculates age based on the difference between current date and date of birth.

    Person calculateAge(Person InputPerson);

    The input and output types are the data contract. This hangs until time out hours later.  However, if I use
    Person calculateAge(string FirstName, string LastName, DateTime DateOfBirth, DateTime CurrentDate)

    I get the Person as a return object without issue.
          
    Thursday, March 12, 2015 8:06 PM
  • Hi KWilliams1,

    I tried the composite data contract you provided as below on HPC Pack 2012 R2 (4.2.4400), the SOA session just worked fine with the SOA HelloWorld R2 sample code @ here http://www.microsoft.com/zh-cn/download/details.aspx?id=41633.

    [DataContract]
        public class Person
        {
            [DataMember]
            public string FirstName { get; set; }
            [DataMember]
            public string LastName { get; set; }
            [DataMember]
            public DateTime DateOfBirth { get; set; }
            [DataMember]
            public DateTime CurrentDate { get; set; }
            [DataMember]
            public int Age { get; set; }
        }

    Could you double check if the HPC Pack client and server versions do match? Could the composite data type client work on the Head Node or other client machines? You may also want to enable SOA/WCF traces to take a deep look as mentioned in the blog here http://blogs.technet.com/b/windowshpc/archive/2011/07/28/enabling-tracing-for-hpc-soa-applications.aspx.

    Best,

    Yutong

    Tuesday, March 17, 2015 4:17 AM
    Moderator