Uniface Soap Service

Author: stijn.courtheyn@xperthis.be (Stijn Courtheyn)

We are looking into creating Uniface Soap services. We currently have created in .Net a webservice that calls a com exposed Uniface service. This service we have now available as a soap service and it works (URouter, UServer, Tomcat) But now I have a question. When we call an operation we send a uniface list as parameter (key1=value [GOLD;] key2=value) And the resulting Uniface list is translated to a xmldocument and then send back over the .net webservices to the client. But how do we send the uniface list to the Uniface Soap service?


  1. Hi stcourth, If I've correctly understood your question you are asking how to manage the GOLDkey concept when having to dialog with other technologies. What I can suggest is to translate Uniface list separators to anothers more o less complex sequence of character(s). It can easily implemented using $replace() function like: when sending out: myConvertedList = $replace(myUnifaceList, 1, "GOLD;", ";", -1) and receiving back: myUnifaceList = $replace(myUnifaceList, 1, ";", "GOLD;", -1) The simplest case is to use ; and ! in place of GOLD; and GOLD! like in the just shown example. The potential issue in this simplest case is that values in your original lists can also include ; and ! giving you back potential error in the list conversion. A possible solution to this issue is to substitute the simple character with a more complex characters sequence not normally used when writing with natural languages used around the world; we can think of ;! or ;!;. This choice is generating a little overhead in the string holding your list but it is generally more consistent. Hope it helps... Gianni

    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  2. Gianni, Your solution will work, but we know already tat we have ; and ! in the real data. Current we use: dim hxml as new hxml 'hxml.dll is the com created Uniface services hxml hxml.exeop2("HPLANNER", "WSGET_BEDPLAN","CAMPUS_ID=001GOLD;WARD_ID=V1C", returnList) Then we loop over the return list and create a corresponding xml message. Now with hxml as Uniface soap service: we have the webservice exeop2 To send a gold key in the webservice request: it isn't the gold key in the uniface service. It results in this: the gold chars are not readable and changed to ??.... I think that we need to convert the uniface list to xml. But there is no such thing in Uniface as ListToStruct StructToXML exists so it would be very easy to have the ListToStruct / StructToList function.       <EXEOP2Response xmlns="urn:uniface:applic:wrapped:services:HXML">          <return>0</return>          <PPARAM1>CAMPUS_ID=001·;WARD_ID=V1C</PPARAM1>          <PPARAM2><![CDATA[ROOM_DESCR=Chambre 0001??15??1BBED_DESCR=Lit 01??15??1BINACTIVE_BED=F??15??1BAUTOPLAN=T??15??1BOCC_TYPE_SORT=1??15??1BBLOCK_FROM=??15??1BBLOCK_REASON=??15??1BBLOCK_TILL=??15??1BADM_DOCTOR_ID=??15??1BROOM_ASKED=??15??1BEXP_ADM_DAYS=??15??1BCODE_SITUATION=??15??1BRESERV_INFO=??15??1BCOUNTER=10023??15??1BU_VERSION=_??15??1BU_CREATOR=14373??15??1BU_DATIM=2016071511320373??15??1BU_WHO=14373??15??1BOCC_TYPE=A??15??1BCAMPUS_ID=001??15??1BWARD_ID=DZ001??15??1BROOM_ID=0001??15??1BBED_ID=01??15??1BVISIT_ID=??15??1BPAT_ID=??15??1BDEP_ID=??15??1BDEP_TYPE=??15??1BDOCTOR_ID_TREAT=??15??1BWARD_

    Author: Stijn Courtheyn (stijn.courtheyn@xperthis.be)
  3. Using $encode("URL") on a list gives me.  1%3DA%1B2%3DB%15%1B3%3DC Using $encode("USTRING",$decode("URL",....)) on this output returns the string I first sent. So, %3D is =, %1B is Gold-; and %15%1B is Gold-!,Gold-;.  I have tried decoding it as is, and also with the = signs in place, both work.  I am not sure if there are other characters in your data the URL encode/decode would complain at, but it's an 'easy' decode if it works. 

    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  4. Iain Sharp said I am not sure if there are other characters in your data the URL encode/decode would complain at, but it's an 'easy' decode if it works.   

    If there are other characters to escape, what about Encode:  $encode("HEX",$encoded("URAW",<your_UIL>))   or short: $encode("HEX",<your_UIL>) Decode:  $encode("USTRING",$decode("HEX",<a_encoded_value>)) Pay attention to the fact, that the output of $decode is a raw-string! 1. If you use a temporary variable, you have to define this as raw (not string!) 2. You have always to "decode" the raw data to normal strings by $encode("USTRING",...) Ingo

    Author: istiller (i2stiller@gmx.de)