Ejemplo n.º 1
0
        /// <summary>
        /// Asynchronously calls the TestStack service.
        /// </summary>
        public virtual IAsyncResult BeginTestStack(TestStackMessage 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.TestStackRequest);
            }
            catch (Exception e)
            {
                throw CreateSoapFault(message.TestStackRequest, e);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// The operation contract for the TestStack service.
 /// </summary>
 public virtual TestStackResponseMessage TestStack(TestStackMessage request)
 {
     try
     {
         SetRequestContext(RequestEncoding.Xml);
         TestStackResponse response = (TestStackResponse)TestStack(request.TestStackRequest);
         return new TestStackResponseMessage(response);
     }
     catch (Exception e)
     {
         throw CreateSoapFault(request.TestStackRequest, e);
     }
 }