0

Will demonstrate it simply. I'm just executing the following line:

client.writeValue(nodeId, client.readValue(nodeId));

This reads the value from the server and directly writes it back - No effect. However this works as intended for "Doubles" and "Strings" but when doing this with a node containing a BOOLEAN (UaExpert says it is a boolean), I get the following error/exception:

com.prosysopc.ua.StatusException: Bad_TypeMismatch (0x80740000) "The value supplied for the attribute is not of the same type as the attribute's value." StatusCode=Bad_TypeMismatch (0x80740000) "The value supplied for the attribute is not of the same type as the attribute's value."


How can that be? Is there a bug in the Java API? Or a setting issue in the server?

Huge thanks in advance!

DragonGamer
  • 834
  • 3
  • 9
  • 27
  • I don't think there's enough information here to help you. What server is this? What client? Have you looked at Wireshark or other logging to verify what you think is happening is what is actually happening? – Kevin Herron Jul 22 '16 at 15:19

1 Answers1

1

The error message is pretty obvious. I used to always have these errors they always occur if there's a type mismatch. Look in the server if the variable is boolean which is being assigned the value and check the type in your program

مسعود
  • 679
  • 10
  • 25