本文整理汇总了C#中IController.ParseRequest方法的典型用法代码示例。如果您正苦于以下问题:C# IController.ParseRequest方法的具体用法?C# IController.ParseRequest怎么用?C# IController.ParseRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IController
的用法示例。
在下文中一共展示了IController.ParseRequest方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleRequest
/// <summary>
/// The method that handle the processing of the sdmx query and orchestrate the
/// calls to different building blocks.
/// </summary>
/// <param name="input">
/// The xml containing the SDMX Query
/// </param>
/// <param name="controller">
/// The Controller of the request
/// </param>
/// <param name="xmlQualifiedName">
/// Name of the XML qualified.
/// </param>
/// <param name="operation">
/// The operation.
/// </param>
/// <returns>
/// The queried data in specified format
/// </returns>
/// <exception cref="System.ServiceModel.Web.WebFaultException">
/// Internal server error.
/// </exception>
private static Message HandleRequest(Message input, IController<Message, XmlWriter> controller, XmlQualifiedName xmlQualifiedName, SoapOperation operation)
{
if (_log.IsDebugEnabled)
{
_log.DebugFormat(CultureInfo.InvariantCulture, "Request: {0}\n", input);
}
try
{
IStreamController<XmlWriter> streamController = controller.ParseRequest(input);
WebOperationContext ctx = WebOperationContext.Current;
if (ctx == null)
{
_log.Error("Current WebOperationContext is null. Please check service configuration.");
throw new WebFaultException(HttpStatusCode.InternalServerError);
}
Message message = new SdmxMessageSoap(
streamController,
xmlQualifiedName: xmlQualifiedName,
exceptionHandler: exception => _messageFaultBuilder.BuildException(exception, operation.ToString()));
return message;
}
catch (Exception e)
{
_log.Error(operation.ToString(), e);
throw _messageFaultBuilder.BuildException(e, operation.ToString());
}
}
示例2: HandleRequest
/// <summary>
/// The method that handle the processing of the sdmx query and orchestrate the
/// calls to different building blocks.
/// </summary>
/// <param name="input">
/// The xml containing the SDMX Query
/// </param>
/// <param name="controller">
/// The Controller of the request
/// </param>
/// <param name="xmlQualifiedName">
/// Name of the XML qualified.
/// </param>
/// <param name="getSoapOperation">
/// The get SOAP operation.
/// </param>
/// <returns>
/// The queried data in specified format
/// </returns>
/// <exception cref="Org.Sdmxsource.Sdmx.Api.Exception.SdmxInternalServerException">
/// Not initialized correctly
/// </exception>
private static Message HandleRequest(Message input, IController<Message, XmlWriter> controller, XmlQualifiedName xmlQualifiedName, SoapOperation getSoapOperation)
{
try
{
IStreamController<XmlWriter> streamController = controller.ParseRequest(input);
WebOperationContext ctx = WebOperationContext.Current;
if (ctx == null)
{
_log.Error("Current WebOperationContext is null. Please check service configuration.");
throw new SdmxInternalServerException("Not initialized correctly");
}
Message message = new SdmxMessageSoap(streamController, exception => _messageFaultBuilder.BuildException(exception, getSoapOperation.ToString()), xmlQualifiedName);
return message;
}
catch (Exception e)
{
_log.Error(xmlQualifiedName, e);
////return Message.CreateMessage(MessageVersion.Soap11, _messageFaultBuilder.Build(e, xmlQualifiedName.Name), string.Empty);
throw _messageFaultBuilder.BuildException(e, getSoapOperation.ToString());
}
}
示例3: HandleRequest
/// <summary>
/// The method that handle the processing of the SDMX query and orchestrate the
/// calls to different building blocks.
/// </summary>
/// <param name="input">The xml containing the query bean</param>
/// <param name="controller">The Controller of the request</param>
/// <param name="soapOperation">The SOAP operation.</param>
/// <returns>
/// The queried data in specified format
/// </returns>
private XmlStreamWrapper HandleRequest(XmlNode input, IController<XmlNode, XmlWriter> controller, SoapOperation soapOperation)
{
_logger.DebugFormat(CultureInfo.InvariantCulture, "Received request for {0} for endpoint {1}", soapOperation, this.Endpoint);
IStreamController<XmlWriter> streamController = controller.ParseRequest(input);
return new XmlStreamWrapper(streamController, soapOperation);
}