kevinherron / ua-client-sdk

OPC-UA Client SDK for Java
27 stars 16 forks source link

java.net.URISyntaxException: Illegal character in hostname at index #10

Closed Faerylnahr closed 7 years ago

Faerylnahr commented 7 years ago

Hi,

I have trouble connection to my OPC-UA server using the endpointUrl opc.tcp://1.2.3.4:1111. Even though my endpointUrl contains the IP address at some point the hostname is returnded. It contains an underscore thus producing the above mentioned error message. Right after this codeline EndpointDescription[] endpoints = UaTcpStackClient.getEndpoints(endpointUrl).get(); the endpoint contains the hostname instead of the IP address. Is there some way to use IP address instead of hostname?

Kind regards, Stefi

Faerylnahr commented 7 years ago

For everybody who is having trouble with a similar issue please have a look at: http://stackoverflow.com/questions/40554198/java-opc-ua-client-eclipse-milo-endpoint-url-changes-to-localhost