none
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);
    cf.Open();
    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);
    result.AsyncWaitHandle.WaitOne(10000);

    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?

    regards,


    Software Engineer

    Wednesday, July 31, 2013 3:48 PM

Answers

All replies