public void Doit(TodoManager mgr) { StructValue req = new StructValue(MyValueFactoryCuae._mt_etch_bindings_csharp_examples_cuae_Cuae_ReqWithMessage, vf); req.Add(MyValueFactoryCuae._mf_code, code); req.Add(MyValueFactoryCuae._mf_msg, message); Message msg = new Message(MyValueFactoryCuae._mt_etch_bindings_csharp_examples_cuae_CuaeClient_doit2, vf); msg.Add(MyValueFactoryCuae._mf_req, req); Mailbox mb = svc.BeginCall(msg); Object value = svc.EndCall(mb, MyValueFactoryCuae._mt_etch_bindings_csharp_examples_cuae_CuaeServer__result_doit2); if (value is Exception) { Exception e = (Exception)value; throw e; } StructValue resp = (StructValue)value; // resp.CheckType( MyValueFactoryCuae._mt_etch_bindings_csharp_examples_cuae_Cuae_Response ); MyValueFactoryCuae._mt_etch_bindings_csharp_examples_cuae_Cuae_Response.CheckIsAssignableFrom(resp.GetXType); Console.WriteLine("**** delayDoit2b: req {0} response {1}\n", code, resp); // String m = (String) resp.Get( MyValueFactoryCuae._mf_msg ); }
///<summary>Finishes a call sequence by waiting for the response message.</summary> ///<param name = mb>a mailbox which will be used to read the response, returned by /// _BeginCall(Message) </param> ///<param name = responseType> the type of the expected response </param> ///<returns>the value of the response field if it isn't an exception.</returns> ///<throws> Exception if there is a problem sending or a timeout waiting or /// if the result value was an exception.</throws> public Object _EndCall(Mailbox mb, XType responseType) { return(_svc.EndCall(mb, responseType)); }