Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
Receiving StructureSpecification with field indices 0,1,2,3,4,6,8 from server
April 22, 2026
15:49, EEST
Avatar
fio65
Member
Members
Forum Posts: 8
Member Since:
November 29, 2021
sp_UserOfflineSmall Offline

Hi together,

We use the Java SDK 5.5.0 for the OPCUA client.
when migrating to prosys java sdk 5.x we discovered the following behavior:

From an OPCUA server (not implemented in prosys – unknown which provider) we must write a complex type.
We do not know the Structure in advance, but instead we only know the field names.
Thus, we get the StructureSpecification from the DataType Node and create a new AbstractStructure using

AbstractStructure abstractStructure = (AbstractStructure) specification.toInstanceBuilder().build();

If a label name is x whose value should be set to y, we call

abstractStructure.set(x,y)

This worked fine until migrating to version 5.x
Then we receive an IllegalArgumentException at the method ‘validateField’
The reason is that the server sends us 7 field specifications with field indices 0,1,2,3,4,6,8
In my opinion thats clearly wrongly defined in the server.
However, its hard, time-consuming, and expensive to change that in the server.
Is there a way to handle this in the client side?

Essentially, I cant call any method in the AbstractStructure, neither setting nor getting values with fieldIndices 6 or 8

Many thanks for your help!

April 23, 2026
10:42, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1093
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

It is unlikely that a pre-5.x working Structure thing would have been defined wrong in the server, if it works it needs both sides to be basically exactly correct. I think we might actually have a bug in the client side, this thing has gotten quite a lot of internal changes. Could you verify the following: By “field index”, do you mean FieldSpecification.getFieldIndex()? If yes, is FieldSpecification.isArray() true for “index 6 and 8” and false for all others?

If you can access the server, using UaExpert or our https://prosysopc.com/products…..a-browser/ is the DataTypeDefinition Attribute for the Structure DataType node ‘Bad_AttributeInvalid’ or does it show a StructureDefinition? I would assume Bad_AttributeInvalid, though if it is StructureDefinition that doesn’t necessarily rule out the scenario I have in mind. Will do some investigating..

April 23, 2026
12:25, EEST
Avatar
fio65
Member
Members
Forum Posts: 8
Member Since:
November 29, 2021
sp_UserOfflineSmall Offline

Hi,

by field index I mean FieldSpecification.getFieldIndex() yes.
For both indices 6 and 8, the method isArray() returns true and false for all others.

I will check this afternoon using uaExpert.

Maybe another relevant info: arrayDimension is null for both arrays, which also seems wrong. However, this was also working before..

To me it looks like the AbstractStructure/DynamicStructure are handling values of FieldSpecifications differently since version 5.x.
Before, it was working without the fieldIndex and now it seems to be using it

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 84
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 146
rocket science: 114
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 904
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1587
Posts: 6693
Newest Members:
Michaelkam, chnmrc, ahmad.qureshi3@se.abb.com, connieorchard88, carlotae86, otiliabanks, kasha94646158368, bridgetterandle, julietabernacchi, eulakilvington
Moderators: Jouni Aro: 1058, Pyry: 1, Petri: 1, Bjarne Boström: 1081, Jimmy Ni: 26, Matti Siponen: 370, Lusetti: 1
Administrators: admin: 1