I'm getting this error when using SOAPUI to send an authenticate request to my 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/'
Here's my apphost setup:
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
});
I don't understand why servicestack is expecting the wrong namespace, can anyone help me in understanding how to set the expected namespace to the correct namespace?
You set your custom ns at the wsdl level, but the type itself is still using its own ns which I assume is the default one "http://schemas.servicestack.net/types". Not sure how you could change those built-in ns, not even sure if that's possible, but you might create your own auth provider with your custom types so you can set your custom ns