private void DefineHelloWorldSoapActionRoute(INancySoapAdapter soapAdapter)
        {
            const string mySoap11ServiceRoutePattern = "/MySampleSoap11Service";

            DefineSoapRoute(mySoap11ServiceRoutePattern, soapAdapter);

            soapAdapter.RegisterSoapActionHandler(
                mySoap11ServiceRoutePattern,
                "urn:MySampleSoap11Service#HelloWorldSoapAction",
                (_, _) =>
                Soap11NancyResponseFactory.Create(
                    SoapBuilder.CreateSoap11Envelope().WithBody.AddEntry("<root>Hello SOAP World!</root>"),
                    HttpStatusCode.OK));

            soapAdapter.RegisterSoapActionHandler(
                mySoap11ServiceRoutePattern,
                "urn:MySampleSoap11Service#AnotherSoapAction",
                (_, _) =>
                Soap11NancyResponseFactory.Create(
                    SoapBuilder.CreateSoap11Envelope().WithBody.AddEntry("<root>Hello Another SOAP World!</root>"),
                    HttpStatusCode.OK));
        }
 public TestCaseNancyModule(INancySoapAdapter soapAdapter)
 {
     DefineSoapRoute(TestCaseRoutes.MySoap11Service, soapAdapter);
     DefineSoapRoute(TestCaseRoutes.MySoap12Service, soapAdapter);
 }
 private void DefineSoapRoute(string routePattern, INancySoapAdapter soapAdapter)
 {
     Post(routePattern, args => soapAdapter.ProcessRequest(routePattern, base.Request, args));
 }
Пример #4
0
 public NancySoapAdapterBootstrapper(INancySoapAdapter soapAdapter)
 {
     this.soapAdapter = soapAdapter;
 }
Пример #5
0
 public NancySoapAdapterBootstrapper()
 {
     this.soapAdapter = new NancySoapAdapter();
 }
 public SampleSoapNancyModule(INancySoapAdapter soapAdapter)
 {
     DefineHelloWorldSoapActionRoute(soapAdapter);
 }