public void Wsdl_state_is_correct() { var wsdlGenerator = new Soap11WsdlMetadataHandler(); var xsdMetadata = new XsdMetadata(Metadata); var wsdlTemplate = wsdlGenerator.GetWsdlTemplate(xsdMetadata, "http://w3c.org/types", false, "http://w3c.org/types", "Service Name"); Assert.That(wsdlTemplate.ReplyOperationNames, Is.EquivalentTo(xsdMetadata.GetReplyOperationNames(Format.Soap12))); Assert.That(wsdlTemplate.OneWayOperationNames, Is.EquivalentTo(xsdMetadata.GetOneWayOperationNames(Format.Soap12))); }
/// <summary>Enables processing of HTTP Web requests by a custom HttpHandler that implements the <see cref="T:System.Web.IHttpHandler" /> interface.</summary> /// /// <param name="context">An <see cref="T:System.Web.HttpContext" /> object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to /// service HTTP requests. /// </param> public override void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == HttpMethods.Get) { var wsdl = new Soap11WsdlMetadataHandler(); wsdl.Execute(context); return; } SendOneWay(null); }
/// <summary>Enables processing of HTTP Web requests by a custom HttpHandler that implements the <see cref="T:System.Web.IHttpHandler" /> interface.</summary> /// /// <param name="context">An <see cref="T:System.Web.HttpContext" /> object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to /// service HTTP requests. /// </param> public new void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == HttpMethods.Get) { var wsdl = new Soap11WsdlMetadataHandler(); wsdl.Execute(context); return; } var responseMessage = Send(null); context.Response.ContentType = GetSoapContentType(context.Request.ContentType); using (var writer = XmlWriter.Create(context.Response.OutputStream)) { responseMessage.WriteMessage(writer); } }
/// <summary>Process the request.</summary> /// /// <param name="httpReq"> The HTTP request.</param> /// <param name="httpRes"> The HTTP resource.</param> /// <param name="operationName">Name of the operation.</param> public override void ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, string operationName) { if (httpReq.HttpMethod == HttpMethods.Get) { var wsdl = new Soap11WsdlMetadataHandler(); wsdl.Execute(httpReq, httpRes); return; } var responseMessage = Send(null, httpReq, httpRes); httpRes.ContentType = GetSoapContentType(httpReq.ContentType); using (var writer = XmlWriter.Create(httpRes.OutputStream)) { responseMessage.WriteMessage(writer); } }