Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Soeren-Panduro opened this issue Jan 7, 2023 · 8 comments

Comments

@Soeren-Panduro
Copy link

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
@mmc41
Copy link
Owner

mmc41 commented Jan 7, 2023

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)

@Soeren-Panduro
Copy link
Author

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.)

@mmc41
Copy link
Owner

mmc41 commented Jan 7, 2023

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

@mmc41
Copy link
Owner

mmc41 commented Jan 7, 2023

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

@Soeren-Panduro
Copy link
Author

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.

@Soeren-Panduro
Copy link
Author

.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

@mmc41
Copy link
Owner

mmc41 commented Jan 7, 2023

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.
.

@mmc41 mmc41 changed the title 'Not implemented' response when authenticating 'Not implemented' response when authenticating (IHC 2.7 firmware) Jan 28, 2023
@mmc41
Copy link
Owner

mmc41 commented Apr 3, 2023

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants