Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

Uniface 9: WS call-out and occurrence data type

WS call-out and occurrence data type

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, I've imported a WSDL with Uniface (9.6.05.01 - 0519_1) and now I've my SOAP signature like this:

PARAMETER IN OUT DATA TYPE
Loginresult   X Occurrence
Username X   String
Password X   String

  The call-out work "quite" fine, but result in some unwanted behaviuors: 1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?   Thanks all Claudio

15 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

WS call-out and occurrence data type

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, I've imported a WSDL with Uniface (9.6.05.01 - 0519_1) and now I've my SOAP signature like this:

PARAMETER IN OUT DATA TYPE
Loginresult   X Occurrence
Username X   String
Password X   String

  The call-out work "quite" fine, but result in some unwanted behaviuors: 1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?   Thanks all Claudio

diseli said Hello Claudio, Thanks for the additional info. And you are welcome. This makes it a bit clearer for me. Regarding 2): this will only work when you assign the name of the entity to v_xml before doing the activate; e.g.

v_xml = "ent1.mod1" activate “MY_WS”.my_method(v_xml, username, password) The result is written to the fields of the painted entity "ent1.mod1". Hope this helps. Kind regards, Daniel  

Thanks Daniel, there is any way/workaround/trick to have it directly in a variable without painting the correlated entity? Thanks again Kind Regards Claudio


Author: Claudio (claudio.palladini@cortislentini.it)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

WS call-out and occurrence data type

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, I've imported a WSDL with Uniface (9.6.05.01 - 0519_1) and now I've my SOAP signature like this:

PARAMETER IN OUT DATA TYPE
Loginresult   X Occurrence
Username X   String
Password X   String

  The call-out work "quite" fine, but result in some unwanted behaviuors: 1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?   Thanks all Claudio

Hello Claudio, Thanks for the additional info. And you are welcome. This makes it a bit clearer for me. Regarding 2): this will only work when you assign the name of the entity to v_xml before doing the activate; e.g.

v_xml = "ent1.mod1" activate “MY_WS”.my_method(v_xml, username, password) The result is written to the fields of the painted entity "ent1.mod1". Hope this helps. Kind regards, Daniel


Author: diseli (daniel.iseli@uniface.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

WS call-out and occurrence data type

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, I've imported a WSDL with Uniface (9.6.05.01 - 0519_1) and now I've my SOAP signature like this:

PARAMETER IN OUT DATA TYPE
Loginresult   X Occurrence
Username X   String
Password X   String

  The call-out work "quite" fine, but result in some unwanted behaviuors: 1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?   Thanks all Claudio

diseli said
Claudio said
1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?
 1) When an Occurrence parameter is used then an implicit creocc is performed on each call to the operation. This behavior is as-documented (see paragraph "Entity and Occurrence Parameters" here). An Entity parameter on the other hand will not do this. 2) I don't really understand what you are trying to say here. Constructed parameters (like Entity and Occurrence Parameters) must be specified as a string that contains the name of a modeled entity that is painted on the component. Hope this helps. Thanks, Daniel  

Hello Daniel, and thanks for your quick answer. 1) I need to try to change the parameter type with entity, thanks. 2) I made the call-out with  activate "MY_WS".my_method(v_xml, username, password), so I would expected some kind of value in v_xml variable. Just this. Sorry if I did not explain, or explains it incompletely. Thanks for your help, Kind Regards Claudio


Author: Claudio (claudio.palladini@cortislentini.it)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

WS call-out and occurrence data type

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, I've imported a WSDL with Uniface (9.6.05.01 - 0519_1) and now I've my SOAP signature like this:

PARAMETER IN OUT DATA TYPE
Loginresult   X Occurrence
Username X   String
Password X   String

  The call-out work "quite" fine, but result in some unwanted behaviuors: 1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?   Thanks all Claudio

Claudio said
1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?

 1) When an Occurrence parameter is used then an implicit creocc is performed on each call to the operation. This behavior is as-documented (see paragraph "Entity and Occurrence Parameters" here). An Entity parameter on the other hand will not do this. 2) I don't really understand what you are trying to say here. Constructed parameters (like Entity and Occurrence Parameters) must be specified as a string that contains the name of a modeled entity that is painted on the component. Hope this helps. Thanks, Daniel


Author: diseli (daniel.iseli@uniface.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:38 AM UTC

WS call-out and occurrence data type

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, I've imported a WSDL with Uniface (9.6.05.01 - 0519_1) and now I've my SOAP signature like this:

PARAMETER IN OUT DATA TYPE
Loginresult   X Occurrence
Username X   String
Password X   String

  The call-out work "quite" fine, but result in some unwanted behaviuors: 1) It add an occurrence in the focused entity, where my calling button is placed, with contents of the "loginresult" out parameter. 2) The variable passed to parameter "loginresult" it's EVER empty. My question is: what's the correct way to handle this kind of parameters?   Thanks all Claudio

Claudio said Gianni: I've seen it because it referred in the Web Services chapter, my reply was to better explain. However, I don't think it's possible to define a variable that maps an entity.
rogerw said Hi, if you just have to move around an "simple" occurrence or entity it will probably work. The problem with Uniface and web-services is usually complex data-types. C#, Java etc. languages handles these by objects and serialization/deserialization. Uniface have tried to manage these problems by structs. Everyone who has used Uniface structs know that they are quite difficult to program. Especially then, you would really want some intelliSense behaviour into Uniface. 
Hi RogerW, bingo: 286 complex type + 100 simple type = funny and pessimistic coding days... Thanks Regards Claudio  

Ciao Claudio, you are asking to refer to a pointer or an handle in Uniface terminology. As of today (U9.7.03) being Uniface component based and NOT object based, handles are not available/usable on all internal objects: - when you need to apply some logic to an entity while you are building the related hitlist you should program your logic into the specific component (form/service) managing that entity and its hitlist. - when you need to apply some logic moving entity contents around after completing/truncating the hitlist you can easily build a Uniface list with: vEntity = "" forentity "MYENTITY" putlistitems/occ vOcc, "MYENTITY" putitem vEntity, -1, vOcc endfor and do whatever you need with your vEntity list... Structs: they are implementing/managing trees and a tree is never a simple object to deal with. I agree with the idea that current structs implementation could be improved... Gianni


Author: gianni (gianni.sandigliano@unifacesolutions.com)