ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Creating HTTP Server Instead of IWS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating HTTP Server Instead of IWS

    We are now a "provider" for some web services on the Power 9. I am using Scott Klement's tutorial on creating a REST server without using IWS. Using the wizard worked great but I want to get a little more creative and was looking at his "DIY" section. I have a request from an end user company that I don't think will work using IWS (wants to change the context-root).

    I can get through most of the steps but a couple kinda have me stumped.

    In the IWS setup wizard it asks to "Specify user ID for this server". I used the default of QWSERVICE. This is what I would want on my DIY server creation. I'm looking at this:

    Code:
    DefaultFsCCSID 37
    DefaultNetCCSID 1208
    CgiConvMode %%MIXED/MIXED%
    
    % ScriptAlias /api/customers /qsys.lib/skwebsrv.lib/cust001r.pgm
    
    <Directory /qsys.lib/skwebsrv.lib>
    
    SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;QGPL;SKLEMENT;SKWEBSRV;YAJL"
    require valid-user
    AuthType basic
    AuthName "SK REST APIs"
    PasswdFile %%SYSTEM%
    % UserId %%CLIENT%%
    
    </Directory>
    In that section what do I need to do to use QWSERVICE as my preferred user ID? Or if I needed to use another existing user ID? What would be required in that section?

    Also I will have multiple endpoints for inquiries, history, order creating , etc. Would I need directory sections for each script alias or would just the one directory section work for all my endpoints listed as script aliases?

    All but one of my endpoints will be using user QWSERVICE but one of them will require user ID DAYEND. Would that require a separate scrip alias/directory section?

    Thanks in advance for any assistance....
Working...
X