【发布时间】:2015-05-08 11:09:28
【问题描述】:
我在使用 SOAPUI 向我的 ServiceStack API 发送身份验证请求时收到此错误。
Expecting element 'Authenticate' from namespace 'http://schemas.servicestack.net/types'.. Encountered 'Element' with name 'Authenticate', namespace 'http://correctnamespace.com/schemas/2015/05/MyAPI/'
这是我的 apphost 设置:
SetConfig(new HostConfig
{
HandlerFactoryPath = "api",
DefaultContentType = "application/json",
WsdlServiceNamespace = "http://correctnamespace.com/schemas/2015/05/MyAPI/",
DebugMode = false,
UseHttpsLinks = Core.Config.UserRemoteConfig()
});
Plugins.Add(new AuthFeature(
() => new AuthUserSession(),
new IAuthProvider[]
{
new CustomAuthProvider()
})
{
IncludeAssignRoleServices = false,
IncludeAuthMetadataProvider = false,
HtmlRedirect = null
});
我不明白为什么 servicestack 期望错误的命名空间,谁能帮助我了解如何将预期的命名空间设置为正确的命名空间?
【问题讨论】:
标签: .net api soap servicestack