Search code examples
web-servicessoapibm-midrangerpgle

Automate Deployment IWS Webservices on IBMi


How does one go about automating the creation of Webservices on the IBMi?

Using the GUI at http://my.ibmi:2001/HTTPAdmin is a painfully slow process, and prone to fat finger errors. Thus my quest for automation.

During my research, I was unable to find the CL commands to export my RPGLE *SRVPGM procedures as Web Services.

Automation for IBMi V6R1 or V7R1.

Reference Sites:


Solution

  • Answer found at

    All scripts relating to Webservices are in

    • /QIBM/ProdData/OS/WebServices/V1/server/bin

    Step:

    1. STRQSH
    2. cd /QIBM/ProdData/OS/WebServices/V1/server/bin
    3. installWebService.sh -h

    Command usage:
    installWebService.sh
    -server 'server-name' -programObject 'program-object'
    [-service 'service-name'] [-pcml 'pcml-file'] [-userid 'userid']
    [-libraryList 'library-list'] [-libraryListPosition '*FIRST|*LAST']
    [-disableNillableWSDLElements] [-disableOptionalWSDLElements]
    [-addUnderscoreToWSDLElementNames] [-libraryListPosition '*FIRST|*LAST'] [-printErrorDetails] [-help]

    Where:

    • server is the name of the Web services server in which the service will be installed.
    • programObject is the integrated file system path to the ILE program or
      service program. For example, '/QSYS.LIB/MYLIB.LIB/MYPGM.[SRVPGM or PGM]'
    • service is the name of Web service to be installed. This parameter is
      optional. If not specified, the program object name will be used.
    • pcml is a path to the PCML file. This parameter is optional. If not
      specified, the program object must contain the PCML data.
    • userid is the user profile the Web service will be modified to run under. This parameter is optional. If not specified, the Web service will run
      under the Web services server user profile. Note: The Web service server's
      user profile needs to have *USE authority to the user profile specified on
      this parameter. A value of *SERVER will ensure the Web service runs under the
      same user profile as the Web services server.
    • libraryList is a list of libraries, that will be added to the library
      list prior to invoking the Web service. Each library in the list must
      be delimited by a colon. This parameter is optional.
    • libraryListPosition is the position in the user portion of the job
      library list where the list of libraries specified in -libraryList will be
      placed. A value of *FIRST inserts the libraries at the beginning of
      the user portion of the library list. A value of *LAST inserts the libraries
      at the end of the user portion of the library list. This parameter is
      optional. If not specified the default value of *LAST is used.
    • disableNillableWSDLElements will define elements in generated WSDL as
      not nillable. If not specified, elements are defined as nillable.
      This parameter is ignored for version 1.3 of Web services engine.
    • disableOptionalWSDLElements will define elements in generated WSDL as
      not optional. If not specified, elements are defined as optional.
      This parameter is ignored for version 1.3 of Web services engine.
    • addUnderscoreToWSDLElementNames will generate WSDL element names
      that start with the underscore (_) character, as was always done in
      version 1.3 of the Web services engine. If not specified, element names
      in WSDL will not start with the underscore character.
      This parameter is ignored for version 1.3 of Web services engine.
    • printErrorDetails will show additional error information, such as stack
      traces and error codes, if the command fails. This parameter is optional.
    • help displays the command syntax. This parameter is optional.