застрял с авторизацией OTRS web сервисах (SOAP) при обращении из .NET приложения. OTRS проинсталлирован на Apache/2.2.22 (Linux/SUSE) с интеграцией с Active Directory для авторизации пользователей. Я взял WSDL файл с OTRS github для создания необходимых классов для доступа к OTRS web сервисам. Затем я создал app.config для соединения с OTRS web сервисами. Тестовый код на C#:
Код: Выделить всё
public class Test : OTRS_WebService.GenericTicketConnector_InterfaceClient
{
}
class Program
{
static void Main(string[] args)
{
Test tst = new Test();
OTRS_WebService.OTRS_SessionCreate sc = new OTRS_WebService.OTRS_SessionCreate();
sc.ItemElementName = OTRS_WebService.ItemChoiceType8.UserLogin;
sc.Item = "soap"; //Login to access SOAP
sc.Password = "1234567"; //Password to access SOAP
var rsp = tst.SessionCreate(sc);
}
}
После запуска SessionCreate если в app.config clientCredentialType="Ntlm" получаю сообщение об ошибке:
Message: "The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate'."
Inner exception: "The remote server returned an error: (401) Unauthorized."
Если clientCredentialType="Windows",тогда сообщение об ошибке: "The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate'."
И все, дальше никак не продвинусь, как только не играл с настройками авторизации в app.config.