Inheritance: IServiceMessage
Exemplo n.º 1
0
        /// <summary>
        /// Asynchronously calls the Write service.
        /// </summary>
        public virtual IAsyncResult BeginWrite(WriteMessage 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.WriteRequest);
            }
            catch (Exception e)
            {
                throw CreateSoapFault(message.WriteRequest, e);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// The operation contract for the Write service.
        /// </summary>
        public virtual WriteResponseMessage Write(WriteMessage request)
        {
            WriteResponse response = null;

            try
            {
                // OnRequestReceived(message.WriteRequest);

                SetRequestContext(RequestEncoding.Xml);
                response = (WriteResponse)Write(request.WriteRequest);
                // OnResponseSent(response);
                return new WriteResponseMessage(response);
            }
            catch (Exception e)
            {
                Exception fault = CreateSoapFault(request.WriteRequest, e);
                // OnResponseFaultSent(fault);
                throw fault;
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// The operation contract for the Write service.
 /// </summary>
 public virtual WriteResponseMessage Write(WriteMessage request)
 {
     try
     {
         SetRequestContext(RequestEncoding.Xml);
         WriteResponse response = (WriteResponse)Write(request.WriteRequest);
         return new WriteResponseMessage(response);
     }
     catch (Exception e)
     {
         throw CreateSoapFault(request.WriteRequest, e);
     }
 }
Exemplo n.º 4
0
 public WriteResponseMessage Write(WriteMessage request)
 {
     throw new NotImplementedException();
 }