Getting Service Return while using ITwoWayAsync RRS feed

  • Question

  • Hello Guys,

    I have created a service which takes typed requests then calls another service(netTcpBinding, hosted in BizTalk) which is generic service (takes strings)

    For this I have written below code

    const string Action = "BeginTwoWayMethod";
    ITwoWayAsync proxy = null;
    ChannelFactory<ITwoWayAsync> cf = null;
    cf = new ChannelFactory<ITwoWayAsync>(this.clientEndpointConfig);
    proxy = cf.CreateChannel();
    XmlTextReader requestBody = new XmlTextReader(new StringReader(Request));
    Message msg = Message.CreateMessage(MessageVersion.Default, Action, requestBody);
    IAsyncResult result = null;
    result = proxy.BeginTwoWayMethod(msg, null, null);

    I can make calls now, but how to get Response object back?

    I can only see few properties in result like "IsCompleted" and few more. But none of these talks about response object.

    Would response object come in "msg" parameter?


    Software Engineer

    Wednesday, July 31, 2013 3:48 PM


All replies