Page 1 of 1
(RDMLX) ClientGUID and ServerGUID
Posted: Thu May 02, 2013 3:45 pm
by MegumiSawada
Hi,
Could I ask some questions regarding ClientGUID and ServerGUID?
1.How is the ClientGUID generated to be "Unique" to each other?
I thought it is generated like other GUID(generally used) which comes from IP address, time and so on.
However when I uninstall the client app and re-install it,the ClientGUID is not changed.
2.We'd like to store the returned value of ClientGUID and RTVersion into detabase,
so could you please let me know the type and digit of these?
- ClientGUID (String?)
- RTVersion (Decimal?)
3.Could I ask about ServerGUID?
I understand that you can set any serverGUID as long as it is unique.
Can we pass it to other reusable parts?
Can I ask where does the returned value actually stored?
Best Regards,
Megumi Sawada
Re: (RDMLX) ClientGUID and ServerGUID
Posted: Thu May 02, 2013 5:20 pm
by Paul
1. The ClientGUID is generated using a standard GUID generation algorithm. However it is stored in the iOS secure store so it can’t be tampered with easily as a security feature.
The Information stored in such a container survives application uninstall.
The impact is that client installation ID will be generated on the first install only – subsequent installation will use the same ID.
NOTE that client installation ID is generally unique, however is not guaranteed to be unique across devices.
To guarantee uniqueness, the server assigned ID should be used instead.
2. You can see how to use these values in the example formview LREX0011.
The return value from Get_ClientGUID method is a prim_alph. The value on my device looks to 36 characters long.
The return value from Get_ClientVersion method is prim_num. Currently two digits.
3. Once set the ServerGUID is available to any formview reusable part. You should always check if it has a value before using. Set it if it is blank.
The value is actually stored on the client device.
Re: (RDMLX) ClientGUID and ServerGUID
Posted: Thu May 02, 2013 6:49 pm
by MegumiSawada
Hi Paul,
I see.These help me a lot.
Thank you!
Regards,
Megumi
Re: (RDMLX) ClientGUID and ServerGUID
Posted: Fri May 17, 2013 7:07 pm
by MegumiSawada
Hi Paul,
I've tried to get ServerGUID from other reusable parts,but fails.
Do I miss something?
***Reusable parts which set the ServerGUID
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #LRNG_FORM)
Mthroutine Name(HandleRequest) Options(*REDEFINE)
Define_Com Class(#Prim_Alph) Name(#ServerGUID1)
Define_Com Class(#Prim_Alph) Name(#ServerGUID2)
#Com_Owner.Using Element('/Form.Fields')
#COM_OWNER.Set_Form Grid_Col_N(2) Grid_Col_Width(Fill)
#ServerGUID1 := '112233445566'
#COM_OWNER.Set_ServerGUID Serverguid(#ServerGUID1)
#COM_OWNER.Get_ServerGUID Serverguid(#ServerGUID2)
#COM_OWNER.Set_Label Text('Server ID') Layout_Col(1) Layout_Row(3)
#COM_OWNER.Set_Form Grid_Col_N(2) Grid_Col_Width(Fill)
#COM_OWNER.Set_TextBox Value(#ServerGUID2) Layout_Col(2) Layout_Row(3) Disabled(True) Color(Blue)
Endroutine
End_Com
***Reusable parts which get the ServerGUID
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #LRNG_FORM)
Mthroutine Name(HandleRequest) Options(*REDEFINE)
Define_Com Class(#Prim_Alph) Name(#ServerGUID1)
#Com_Owner.Using Element('/Form.Fields')
#COM_OWNER.Set_Form Grid_Col_N(2) Grid_Col_Width(Fill)
#COM_OWNER.Get_ServerGUID Serverguid(#ServerGUID1)
#COM_OWNER.Set_TextBox Value(#ServerGUID1) Layout_Col(2) Layout_Row(2) Disabled(True) Color(Blue)
#COM_OWNER.Set_Label Text('Server ID') Layout_Col(1) Layout_Row(2)
#COM_OWNER.Set_Form Grid_Col_N(2) Grid_Col_Width(Fill)
Endroutine
End_Com
I'll be delighted if I can have your advice.
Regards,
Megumi
Re: (RDMLX) ClientGUID and ServerGUID
Posted: Mon May 20, 2013 4:36 pm
by Paul
Thanks Megumi for asking about this.
Using your supplied code has highlighted a problem with setting the ServerGUID (Server assigned Client ID) in LRNG_FORM.
This will be corrected in the next version of the LongRange LANSA server package.
Before that time the ServerGUID can be set and retrieved directly using the
#LRngServices.GetSystem method. For example to set...
Code: Select all
#LRngServices.SetSystem Name('SYS-SERVER-ASSG-CLIENT-ID') To(#ServerGUID1)
and to retrieve...
Code: Select all
#LRngServices.GetSystem Name('SYS-SERVER-ASSG-CLIENT-ID') Into(#ServerGUID2)
Thanks again
Re: (RDMLX) ClientGUID and ServerGUID
Posted: Wed May 22, 2013 7:50 pm
by MegumiSawada
Hi Paul,
Thank you for investigation and providing a work around!
I confirmed it works as expected.
Best Regards,
Megumi