ServiceStack/ServiceStack — Issue #71: svcutil and slsvcutil cause an InvalidOperationException
Author: elliveny
Created: 2012-01-19 17:06:01+00:00
State: open

Running ServiceStack.Examples-v3.21 if I run ServiceStack.Hello directly from VS2010 and then try to generate soap client code using one of the following:

svcutil "http://localhost:62577/servicestack/soap12"

or

slsvcutil "http://localhost:62577/servicestack/soap12"

(note that slsvcutil.exe is in C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Tools\)

then I see:

System.InvalidOperationException was unhandled by user code
Message=The body of the message cannot be read because it is empty.
Source=System.ServiceModel
StackTrace:
at System.ServiceModel.Channels.Message.GetReaderAtBodyContents()
at ServiceStack.WebHost.Endpoints.Support.SoapHandler.ExecuteMessage(Message requestMsg, EndpointAttributes endpointAttributes) in C:\src\ServiceStack\src\ServiceStack\WebHost.EndPoints

\Support\SoapHandler.cs:line 57
at ServiceStack.WebHost.Endpoints.Support.SoapHandler.Send(Message requestMsg) in C:\src\ServiceStack\src\ServiceStack\WebHost.EndPoints\Support\SoapHandler.cs:line 36
at ServiceStack.WebHost.Endpoints.Soap12MessageSyncReplyHttpHandler.ProcessRequest(HttpContext context) in C:\src\ServiceStack\src\ServiceStack\WebHost.EndPoints\Soap12Handlers.cs:line 53
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
InnerException:

I see the same if I update the ServiceStack.Examples\lib folder with DLLs built from the latest GitHub code:

System.InvalidOperationException was unhandled by user code
Message=The body of the message cannot be read because it is empty.
Source=System.ServiceModel
StackTrace:
at System.ServiceModel.Channels.Message.GetReaderAtBodyContents()
at ServiceStack.WebHost.Endpoints.Support.SoapHandler.ExecuteMessage(Message requestMsg, EndpointAttributes endpointAttributes) in E:\ExternalDev\ServiceStack-ServiceStack-425b778\src\ServiceStack\WebHost.EndPoints\Support\SoapHandler.cs:line 57
at ServiceStack.WebHost.Endpoints.Support.SoapHandler.Send(Message requestMsg) in E:\ExternalDev\ServiceStack-ServiceStack-425b778\src\ServiceStack\WebHost.EndPoints\Support\SoapHandler.cs:line 36
at ServiceStack.WebHost.Endpoints.Soap12MessageSyncReplyHttpHandler.ProcessRequest(HttpContext context) in E:\ExternalDev\ServiceStack-ServiceStack-425b778\src\ServiceStack\WebHost.EndPoints\Soap12Handlers.cs:line 53
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
InnerException: