mmc41 / IHCClientSDK

.NET based software development kit for IHC clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'Not implemented' response when authenticating (IHC 2.7 firmware)

Soeren-Panduro opened this issue · comments

I'm facing login problems.
I have verified IP address and credentials.

  • Failing - StatusCode: 501, ReasonPhrase: 'Not implemented'
  • At ihcclient\src\services\authenticationService.cs,
    • Method: Authenticate,
    • Line: var resp = await impl.authenticateAsync(new inputMessageName2() { authenticate1 = new WSAuthenticationData { username = userName, password = password, application = application } });
  • Controller
    • Firmware version : 2.7.132
    • HW version: 6.1

Interesting:
a) Did you enable API access in the standard IHC administrator interface app from LK?
b) Did you make a "ihcsettings.json" file with your info?

If you still can't make it work post the entire C# program you are testing with + the ihcsettings.json file (WITHOUT your username and password)

I'm running the tests in ihcclient_tests - and yes the ihcsettings.json has been set up(correctly).
I'd expect everything being set up correctly - based on the fact, that I have an old app working perfectly - using the "NIhc" project in .Net 3.5. (Same credentials and IP btw.)

If you are sure everything is set up correctly, it could be a compatibility issue. I have only tested the SDK on a 3.0 controller and you have a 2.7 controller. It might be that the web service interface for your 2.7 controller is different from the 3.0 controller I have created client web service stubs for (I vaguely remember hearing about this but I am not sure). If you have time, you can look in the main ihcproject and generate new stubs and check if there is a difference. There are two .sh files in the project to help with that using a mac (or maybe linux). For windows you will have to look at the .sh source and do it manually or create a powershell version

See https://github.com/mmc41/IHCClientSDK/tree/main/ihcclient for more info about internals. I am very interested in hearing about your findings.

Working on it - it is pretty complex to rewrite to another WSDL version.
My WSDL's generate different outputMessageName[number] and inputMessageName[number] numbers - so I more or less have to fix all interface files :-(
Additionally I don't get any WSDL for messagecontrollog and openapi - these don't exist in my controller version.

.sh changes for windows GIT bash:

curl -kLSs http://$ip/wsdl/authentication.wsdl -o authentication.wsdl
curl -kLSs http://$ip/wsdl/configuration.wsdl -o configuration.wsdl
curl -kLSs http://$ip/wsdl/controller.wsdl -o controller.wsdl
curl -kLSs http://$ip/wsdl/messagecontrollog.wsdl -o messagecontrollog.wsdl
curl -kLSs http://$ip/wsdl/module.wsdl -o module.wsdl
curl -kLSs http://$ip/wsdl/notificationmanager.wsdl -o notificationmanager.wsdl
curl -kLSs http://$ip/wsdl/resourceinteraction.wsdl -o resourceinteraction.wsdl
curl -kLSs http://$ip/wsdl/timemanager.wsdl -o timemanager.wsdl
curl -kLSs http://$ip/wsdl/usermanager.wsdl -o usermanager.wsdl
curl -kLSs http://$ip/wsdl/openapi.wsdl -o openapi.wsdl

Interesting. This SDK is designed to abstract away the soap/wsdl implementation for the user of the SDK.. Hence, it should be possible for the various services to have multiple internal SoapImpl variants and swich between them internally depending on which version of the controller is targeted. Properly easiest with a user supplied IHC version argument in the service constructor. For the client code using the SDK there should be no difference between versions - except that some services are unsupported in 2.7 as you mention.

I can't test 2.7 code but I can review and answer questions about the code/design. If you succeed in this and create a PR I will be happy to review and merge such a thing.
.

@Soeren-Panduro Hvis du ligger dine WSDL filer til folderen ihcclient/wsdl_2_7 (via et PR), så kan jeg se forskellen og jeg kan prøve at se hvad jeg kan gøre