Rocket Uniface Support Resources

 View Only
  • 1.  REST API and NAME convention

    Posted 12-18-2023 10:51

    Hello, 
    We are creating REST interface for web access. 
    Is it possible to use a name for the REST and an other name for the svc

    We have naming standards but the are not end-user friendly

    for exemple, the url would be              https://.../isAlive
    but the internal svc woud be               SFY00000S

    I just wonder if there could be a http service renamer or something like that...

    I tried to create a signature or to use the [SERVICES_EXEC] of the .asn but I could not achieve what I tried.

    If anyone have an idea

    Thanks in advance

    Yves



    ------------------------------
    Yves De Montmollin
    Aon Suisse Sa
    ------------------------------


  • 2.  RE: REST API and NAME convention

    PARTNER
    Posted 12-19-2023 07:56

    Hello Yves,

    With uniface i think the only think you can do , it's create an usp component named 'isalive' and get request in the exec trigger, and then, redirect to your 'SFY00000S' component.

    With Tomcat you can develop an java servlet named 'isalive' and redirect the request toward your uniface url.

    Also with Tomcat If you use the "org.apache.catalina.valves.rewrite.RewriteValve" you can maybe use an rewrite.config file (same folder as the web.inf)

    Gilles.



    ------------------------------
    Hortion Gilles
    Dedalus Healthcare France
    Artigues Pres Bordeaux FR
    ------------------------------



  • 3.  RE: REST API and NAME convention

    PARTNER
    Posted 12-19-2023 10:12

    Either the solution Gilles gave, or use a reverse proxy (like nginx) to globally build routes for your web API.

    Uniface cannot deal with that, and tomcat is rather limited (rewrite.config is tidy).

    With a "facade" proxy server, you don't have to worry about the sexiness of the API, or even to make it HTTPS (anything behind the proxy can be insecure and roles are properly defined between the public service and the content provider service).

    Richard



    ------------------------------
    Richard Gill
    Software Developer
    Dedalus Healthcare France
    Artigues Pres Bordeaux FR
    ------------------------------



  • 4.  RE: REST API and NAME convention

    ROCKETEER
    Posted 01-03-2024 07:59

    Hello Yves,

    The option I can think of - at this moment - is to modify the USYSHTTP component. Since 10.4.02 this is made available and documented.

    You could add a mapping from external name to internal component name. I do not have an example for you unfortunately.

    https://docs.rocketsoftware.com/bundle/uniface_104/page/qct1665702683487.html



    ------------------------------
    Sjaak van Schie
    Principal Software Engineer
    Rocket Software - Uniface
    Amsterdam - Netherlands
    ------------------------------