Service Stack (REST) SOAP and WSDL not working

感情迁移 提交于 2019-12-07 14:42:38

问题


I implemented ServiceStack Hello World ,every thing is ok,except one important thing. its SOAP11 and SOAP12 and also WSDL not working. when accessing url http://localhost:8082/SOAP11/ for SOAP11 or SOAP12 it says :

{
"ResponseStatus":{
 "ErrorCode":"NotImplementedException",
 "Message":"The method or operation is not implemented.",
 "StackTrace":"   at ServiceStack.WebHost.Endpoints.Support.EndpointHandlerBase.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName) in C:\\src\\ServiceStack\\src\\ServiceStack\\WebHost.EndPoints\\Support\\EndpointHandlerBase.cs:line 52\n   at ServiceStack.WebHost.Endpoints.AppHostHttpListenerBase.ProcessRequest(HttpListenerContext context) in C:\\src\\ServiceStack\\src\\ServiceStack\\WebHost.EndPoints\\AppHostHttpListenerBase.cs:line 57\n   at ServiceStack.WebHost.Endpoints.Support.HttpListenerBase.ListenerCallback(IAsyncResult asyncResult) in C:\\src\\ServiceStack\\src\\ServiceStack\\WebHost.EndPoints\\Support\\HttpListenerBase.cs:line 197"
}
}

I implemented it via console host. my console host class :

 public class AppHost
    : AppHostHttpListenerBase
{
    public AppHost() //Tell ServiceStack the name and where to find your web services
        : base("ServiceStack Examples", typeof(InventoryREST.Hello).Assembly) { }

    public override void Configure(Funq.Container container)
    {
    }
}

and when I want to access it via WSDL , it shows nothing,just blank page and cpu is working ...


回答1:


SOAP endpoints are not available when hosted on a HttpListener Host (i.e. in a stand-alone Console).

You will need to host it in an ASP.NET host to view the XSD's and WSDLs.




回答2:


The Hello World Example project is actually hosted at /servicestack/ so the correct urls would be:

Metadata page: http://localhost:8082/servicestack/metadata

SOAP 1.1 WSDL: http://localhost:8082/servicestack/soap11

SOAP 1.2 WSDL: http://localhost:8082/servicestack/soap12

Note: the WSDL endpoints above is also the Endpoints of your SOAP web services, i.e. your SOAP Client would POST SOAP messages to the above endpoints.

If you prefer they weren't hosted at a custom path, you will need to will need to change the Web.config to setup servicestack listening on the root / path.



来源:https://stackoverflow.com/questions/8124181/service-stack-rest-soap-and-wsdl-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!