nauful / LibUA

Open-source OPC UA client and server library
Apache License 2.0
262 stars 94 forks source link

FindServers1 differs from GetEndpoints #101

Closed generik0 closed 2 years ago

generik0 commented 2 years ago

Hi again

Sorry for disturbing you again, with another client issue

The following is being reported by a Siemens PLC ua client.

Any thoughts? image

No idea is a fair enough answer :-)

generik0 commented 2 years ago

I also get it on the demo lib, with LibUa core, when using teh discovery image

nauful commented 2 years ago

In the sample application:

uaAppDesc = new ApplicationDescription(
    "urn:DemoApplication", "http://quantensystems.com/",
    new LocalizedText("en-US", "QuantenSystems demo server"), ApplicationType.Server,
    null, null, null);

The last parameter can provide an array of discovery server urls if you need that e.g. server endpoint for connection is different from the one used for discovery. This is usually unnecessary unless you have a discovery server, ApplicationType.DiscoveryServer, separate from your normal server.

This is the server handler for GetEndpoints: public override IList<EndpointDescription> GetEndpointDescriptions(string endpointUrlHint)

This is the server handler for FindServers: public override ApplicationDescription GetApplicationDescription(string endpointUrlHint)

generik0 commented 2 years ago

Hi @nauful thats perfect thanks!

I might make a PR so we don't get this warning ie add to the demo server. Ok?