/// <summary> /// The operation contract for the RegisterServer service. /// </summary> public virtual RegisterServerResponseMessage RegisterServer(RegisterServerMessage request) { try { SetRequestContext(RequestEncoding.Xml); RegisterServerResponse response = (RegisterServerResponse)RegisterServer(request.RegisterServerRequest); return new RegisterServerResponseMessage(response); } catch (Exception e) { throw CreateSoapFault(request.RegisterServerRequest, e); } }
/// <summary> /// Asynchronously calls the RegisterServer service. /// </summary> public virtual IAsyncResult BeginRegisterServer(RegisterServerMessage 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.RegisterServerRequest); } catch (Exception e) { throw CreateSoapFault(message.RegisterServerRequest, e); } }
/// <summary> /// The operation contract for the RegisterServer service. /// </summary> public virtual RegisterServerResponseMessage RegisterServer(RegisterServerMessage request) { RegisterServerResponse response = null; try { // OnRequestReceived(message.RegisterServerRequest); SetRequestContext(RequestEncoding.Xml); response = (RegisterServerResponse)RegisterServer(request.RegisterServerRequest); // OnResponseSent(response); return new RegisterServerResponseMessage(response); } catch (Exception e) { Exception fault = CreateSoapFault(request.RegisterServerRequest, e); // OnResponseFaultSent(fault); throw fault; } }