Inheritance: IServiceMessage
Exemple #1
0
        /// <summary>
        /// Asynchronously calls the Call service.
        /// </summary>
        public virtual IAsyncResult BeginCall(CallMessage message, AsyncCallback callback, object callbackData)
        {
            try
            {
                // check for bad data.
                if (message == null) throw new ArgumentNullException("message");

                // set the request context.
                SetRequestContext(RequestEncoding.Xml);

                // create handler.
                ProcessRequestAsyncResult result = new ProcessRequestAsyncResult(this, callback, callbackData, 0);
                return result.BeginProcessRequest(SecureChannelContext.Current, message.CallRequest);
            }
            catch (Exception e)
            {
                throw CreateSoapFault(message.CallRequest, e);
            }
        }
Exemple #2
0
        /// <summary>
        /// The operation contract for the Call service.
        /// </summary>
        public virtual CallResponseMessage Call(CallMessage request)
        {
            CallResponse response = null;

            try
            {
                // OnRequestReceived(message.CallRequest);

                SetRequestContext(RequestEncoding.Xml);
                response = (CallResponse)Call(request.CallRequest);
                // OnResponseSent(response);
                return new CallResponseMessage(response);
            }
            catch (Exception e)
            {
                Exception fault = CreateSoapFault(request.CallRequest, e);
                // OnResponseFaultSent(fault);
                throw fault;
            }
        }
Exemple #3
0
 /// <summary>
 /// The operation contract for the Call service.
 /// </summary>
 public virtual CallResponseMessage Call(CallMessage request)
 {
     try
     {
         SetRequestContext(RequestEncoding.Xml);
         CallResponse response = (CallResponse)Call(request.CallRequest);
         return new CallResponseMessage(response);
     }
     catch (Exception e)
     {
         throw CreateSoapFault(request.CallRequest, e);
     }
 }
Exemple #4
0
 public CallResponseMessage Call(CallMessage request)
 {
     throw new NotImplementedException();
 }