[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Ftpapi Digest, Vol 62, Issue 20



   Michael,
   It seems as if "getProfilesReturn" is defined as an array of
   "anyType". That means that the web service can return any type of data
   in that array. Therefore WSDL2RPG cannot forecast what type of
   information the web service will return and hence cannot generate code
   for it. What you got back from the web service is a map of key/value
   pairs.
   Unfortunately in that case it is up to you to parse the map and to
   retrieve the values from it. If I was you I would enrich the generated
   stub module with the missing code. Perhaps you want to follow these
   steps to understand what the stub does and how to get the values of
   the map out of the response message:
   1) Change "impl_item_of_anyType_t" to a data structure likes this (and
   compile the stub):
         *
        D impl_item_of_anyType_t...
        D                 DS                  template
        D  x                            10I 0
        D  key                          64A
        D  value                       256A
         *
        D impl_RpgArrayOfArrayOf_xsd_anyType_t...
        D                 DS                  template
        D                                     qualified
        D  x                            10I 0
        D  item
   likeds(impl_item_of_anyType_t)
        D                                     dim(DIM_A1)
   2) Start the debugger for the stub (service program?)
   3) Add a breakpoint to procedure
   impl_item_of_anyTypeStart_of_impl_getProfilesRpc()
   When the debugger stops here with depth=1, "name" should contain
   "getProfilesReturn".
   For depth=2 it should contain "item" and for depth=3 it should contain
   "key" or "value".
   The same thing should be true for step 3 below.
   4) Add a breakpoint to procedure
   impl_item_of_anyTypeEnd_of_impl_getProfilesRpc()
   As you can see, this procedure already contains the code to increment
   the array index of "impl_getProfilesReturn" (but we only expect to get
   a single element):
      impl_getProfilesReturn.x = impl_getProfilesReturn.x + 1;
   But it lacks the statements needed to retrieve the data because it
   does not now the type of data because of "anyType". The missing
   statements should look similar to (not sure about the namespace
   value):
            when (depth = 2
                   and
                   name = 'item'
                   and
                   namespace = 'urn:Inventory');
                  // Increment index of map
                  currentItem.x = currentItem.x + 1;
            when (depth = 3
                   and
                   name = 'key'
                   and
                   namespace = 'urn:Inventory');
    B02        if (not Value_isNil(attrs));
                  x = currentItem.x;
                  UnMarshaller_toStringV6(
                     %addr(currentItem.key)
                     : %addr(currentItem.key(x): *DATA)
                     : %size(currentItem.key(x))
                     : itemValue.pData
                     : itemValue.size);
    E02        endif;
            when (depth = 3
                   and
                   name = 'value'
                   and
                   namespace = 'urn:Inventory');
    B02        if (not Value_isNil(attrs));
                  x = currentItem.x;
                  UnMarshaller_toStringV6(
                     %addr(currentItem.ort)
                     : %addr(currentItem.value(x): *DATA)
                     : %size(currentItem.value(x))
                     : itemValue.pData
                     : itemValue.size);
    E02        endif;
   Before changing the code you may just add the breakpoints and run the
   program to see what happens. Especially look at the contents of
   "name", "depth", "itemValue.pData" and "itemValue.size". You can see
   the value addressed by "itemValue.pData" like this:
     eval itemValue.pData :x 64
   or
     eval itemValue.pData :c 64
   Please have in mind that all I could do was to look at the stub and
   the debug log as provided by you. I had no chance to verify or even
   test my suggestions. Hence it is very likely that some details (or
   assumptions) may be wrong.
   Last but not least another option is to download the WSDL file and to
   modify it to reflect the actual structure of the data returned by the
   web service. Then WSDL2RPG could generate a new stub from the modified
   WSDL file.
   Thomas.
   ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 18.08.2011 21:59:43:
   > Von: mkoester@xxxxxxxxxxxxx
   > An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > Datum: 18.08.2011 22:10
   > Betreff: RE: Ftpapi Digest, Vol 62, Issue 20
   > Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   >
   > Thanks for the advise on activating the http log, Thomas.
   >
   > Now then, I suspect the problems occur in the parsing and/or
   > presentation of the response from the web service.  Given that it's
   > not a publicly accessible server, I guess the next step is for me to
   > share the stub, caller, and log data, and hope someone knows what to
   > make of it.  The Northbound Interface shows a fairly extensive set
   > of key/value pairs returned for this request.  It appears from the
   > returned xml in the log that there are indeed many, many key/value
   > pairs.  I would have figured the Stub would return a data structure
   > much like the one sent to the service (e.g., comprised of an integer
   > to indicate the number of pairs, and an array of key/value pairs).
   > But the Stub does not reflect that.  Perhaps from a failing in the
   > WSDL itself?
   >
   > We run version 6.1, with WSDL2RPG 1.14 beta 11.  Httpapi is version
   > 1.24.  Expat was loaded with Httpapi, and appears to be circa
   05/2007.
   >
   > Provided below are the stub, caller, and httplog data.
   >
   > If I don't see a reply before 6 PM (US-Eastern), I'll be back at it
   on Monday.
   > Thanks.
   >    Michael
   > __________________________________
   >
   > The Stub source (modified to imbed log on credentials in the URL) is
   > as follows:
   >
   >       /IF NOT DEFINED(PROTOTYPE_TSTINVEN01)
   >
   *=====================================================================
   =
   >       *  Generated by WSDL2RPG 1.14beta11 / 23.07.2011
   >       *  Built on Aug 18, 2011 (13:20:52)
   >       *  Built for V6R1M0
   >       *  Based on WS_STUB v1.14
   >
   *=====================================================================
   =
   >       *
   >       *   Please search for 'INFO:' to get basic information how to
   call
   >       *   the web service.
   >       *
   >       *   Default attachment handling (for demonstration) was added
   to
   >       *   WS_STUB but is disabled by default.
   >       *
   >       *   In order to enable or disable default attachment handling
   you have
   >       *   to define or undefine the following compiler condition
   name:
   >       *      DEFAULT_ATTACHMENT_HANDLING
   >       /UNDEFINE DEFAULT_ATTACHMENT_HANDLING
   >       *
   >       *   By default attachments are stored in folder:
   >       *      '/tmp/attachments'
   >       *
   >       *   You can change the default attachment folder by calling
   the
   >       *   following procedure before calling the web service:
   >       *      Inventory_setAttachmentFolder()
   >       *
   >       *   Default attachment handling was added to demonstrate how
   >       *   to manage attachments. Please search the generate stub
   >       *   module for 'TODO:' to see what code belongs to attachment
   >       *   support.
   >       *
   >       *   Log4rpg:
   >       /UNDEFINE LOGGING_SERVICE
   >       *
   >
   *=====================================================================
   =
   >       *   Pre-Compiler tags used by STRPREPRC to retrieve creation
   >       *   commands from the source member.
   >       *
   ---------------------------------------------------------------------
   >       * >>PRE-COMPILER<<
   >       *   >>CRTCMD<< CRTRPGMOD    MODULE(&LI/&OB) +
   >       *                           SRCFILE(&SL/&SF) +
   >       *                           SRCMBR(&SM);
   >       *   >>COMPILE<<
   >       *     >>PARM<< TRUNCNBR(*NO);
   >       *     >>PARM<< DBGVIEW(*LIST);
   >       *   >>END-COMPILE<<
   >       *   >>EXECUTE<<
   >       *   >>CMD<<    CRTSRVPGM +
   >       *              SRVPGM(&LI/&OB) +
   >       *              MODULE(&LI/&OB) +
   >       *              EXPORT(*ALL) +
   >       *              BNDSRVPGM(*LIBL/WSDL2RPGRT +
   >       *                        *LIBL/MIME     +
   >       *                        *LIBL/HTTPMIME +
   >       *                        *LIBL/BASICS1) +
   >       *              TEXT('+
   >       *              Web Service: getProfiles()+
   >       *              ') +
   >       *              DETAIL(*BASIC);
   >       * >>END-PRE-COMPILER<<
   >
   *=====================================================================
   =
   >      H NOMAIN
   >      H DEBUG
   >      H BNDDIR('HTTPAPI' : 'QC2LE' : 'TFSUTILS')
   >      H OPTION(*SRCSTMT : *NODEBUGIO)
   >      H EXTBININT(*YES)
   >       /ENDIF
   >       *
   >       * INFO:
   >       * This is the procedure you call to consume the Web Service:
   >       * ----------------------------------------------------------
   >       * Operation: impl:getProfiles
   >       * Returns  : impl_getProfilesRpc
   >       *
   >       * INFO:
   >       * Include fields in your test/production programs referring to
   the *_t
   >       * type templates used in this prototype, using a LIKE(*_t) or
   > LIKEDS(*_t).
   >       * These fields will be your request and response messages.
   >       *
   >      D Inventory_getProfiles...
   >      D                 PR
   likeds(impl_getProfilesRpc_t)
   >      D
   extproc('Inventory_getProfiles')
   >      D  i_in0                              likeds(apachesoap_Map_t)
   >      D  o_msg                              like(wsdl_errText_t )
   >       *
   >       *   Array dimensions:
   >      D DIM_A1          C                   256
   >      D DIM_A2          C                   256
   >       *
   >       *   Types:
   >       *
   >      D apachesoap_mapItem_t...
   >      D                 DS                  template
   >      D                                     qualified
   >      D  key                        4096A   varying
   >      D  value                      4096A   varying
   >       *
   >       *
   >      D apachesoap_Map_t...
   >      D                 DS                  template
   >      D                                     qualified
   >      D  item
   likeds(apachesoap_RpgArrayOfItem_t)
   >       *
   >       *
   >      D apachesoap_RpgArrayOfItem_t...
   >      D                 DS                  template
   >      D                                     qualified
   >      D  x                            10I 0
   >      D  mapItem
   likeds(apachesoap_mapItem_t)
   >      D                                     dim(DIM_A2)
   >       *
   >       *
   >      D impl_getProfilesRpc_t...
   >      D                 DS                  template
   >      D                                     qualified
   >      D  getProfilesReturn...
   >      D                                     likeds
   > (impl_RpgArrayOfArrayOf_xsd_...
   >      D                                     anyType_t)
   >       *
   >      D impl_item_of_anyType_t...
   >      D                 S           4096A   varying
   >      D                                     template
   >       *
   >      D impl_RpgArrayOfArrayOf_xsd_anyType_t...
   >      D                 DS                  template
   >      D                                     qualified
   >      D  x                            10I 0
   >      D  item
   like(impl_item_of_anyType_t)
   >      D                                     dim(DIM_A1)
   >       /IF DEFINED(LOGGING_SERVICE)
   >       *
   >       *   Starts the Log4rpg logging service.
   >      D Inventory_startLoggingService...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _startLoggingService+
   >      D                                     ')
   >      D  i_path                             const
   like(LOG4RPG_path_t   )
   >      D                                            options(*nopass)
   >      D  i_waitMinutes                10I 0 const  options(*nopass)
   >      D  i_unit                       10A   const  options(*nopass)
   >       /ENDIF
   >       *
   >       *   Web service: Enables/disables the debug log of HTTP API
   >      D Inventory_setHttpDebug...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _setHttpDebug+
   >      D                                     ')
   >      D   i_status                      N   const
   >      D   i_fileName                 500A   const  varying
   options(*nopass)
   >       *
   >       *   Web service: Sets the proxy server to use for the
   connection
   >      D Inventory_setProxy...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _setProxy+
   >      D                                     ')
   >      D  i_server                    256A   const
   >      D  i_port                       10I 0 const
   >       *
   >       *   Web service: Returns the endpoint of the Web service
   >      D Inventory_getEndpoint...
   >      D                 PR         32767A          varying
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _getEndpoint+
   >      D                                     ')
   >       *
   >       *   Web service: Sets the endpoint of the Web service
   >      D Inventory_setEndpoint...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _setEndpoint+
   >      D                                     ')
   >      D  i_url                     32767A   const varying
   options(*varsize)
   >       *
   >       *   Web service: Returns the host name of the Web Service
   endpoint
   >      D Inventory_getHost...
   >      D                 PR         32767A          varying
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _getHost+
   >      D                                     ')
   >       *
   >       *   Web service: Sets the host name of the Web service
   endpoint
   >      D Inventory_setHost...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _setHost+
   >      D                                     ')
   >      D  i_url                     32767A   const varying
   options(*varsize)
   >       *
   >       *   Web service: Returns the port of the Web Service endpoint
   >      D Inventory_getPort...
   >      D                 PR            10I 0
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _getPort+
   >      D                                     ')
   >       *
   >       *   Web service: Sets the port of the Web service endpoint
   >      D Inventory_setPort...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _setPort+
   >      D                                     ')
   >      D  i_port                       10I 0 const
   >       *
   >       *   Registers an user callback procedure, that is called
   whenever
   >       *   a web service requires user authentification.
   >      D Inventory_registerLoginCallback...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _registerLoginCallback+
   >      D                                     ')
   >      D  i_pLoginProc                   *   value  procptr
   >       *
   >       *   Http: Returns cTrue in case of an error, else cFalse.
   >      D Inventory_isError...
   >      D                 PR              N
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _isError+
   >      D                                     ')
   >       *
   >       *   Http: Returns the last HTTP error (code) that occurred.
   >      D Inventory_HttpError_getCode...
   >      D                 PR                  like(wsdl_http_ErrorNo_t
    )
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _HttpError_getCode+
   >      D                                     ')
   >       *
   >       *   Http: Returns the last HTTP error (text) that occurred.
   >      D Inventory_HttpError_getText...
   >      D                 PR
   like(wsdl_http_ErrorText_t)
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _HttpError_getText+
   >      D                                     ')
   >       *
   >       *   Soap: Returns the last SOAP error (code) that occurred.
   >      D Inventory_SoapError_getCode...
   >      D                 PR
   like(wsdl_soap_faultcode_t  )
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _SoapError_getCode+
   >      D                                     ')
   >       *
   >       *   Soap: Returns the last SOAP error (text) that occurred.
   >      D Inventory_SoapError_getText...
   >      D                 PR
   like(wsdl_soap_faultstring_t)
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _SoapError_getText+
   >      D                                     ')
   >       *
   >       *   Soap: Returns the last XML error (code) that occurred.
   >      D Inventory_XmlError_getCode...
   >      D                 PR                  like(wsdl_xml_errorNo_t
    )
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _XmlError_getCode+
   >      D                                     ')
   >       *
   >       *   Soap: Returns the last XML error (text) that occurred.
   >      D Inventory_XmlError_getText...
   >      D                 PR                  like(wsdl_xml_ErrorText_t
    )
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _XmlError_getText+
   >      D                                     ')
   >       *
   >       *   Returns the file name of the attachment that is associated
   to
   >       *   a given content ID.
   >      D Inventory_Attachments_get...
   >      D                 PR                  like(wsdl_path_t     )
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _Attachments_get+
   >      D                                     ')
   >      D  i_attachmentID...
   >      D                                     const
   like(wsdl_attachmentID_t )
   >       *
   >       *   Returns the file name of the attachment that is associated
   to
   >       *   a given index.
   >      D Inventory_Attachments_getAtPos...
   >      D                 PR                  likeds(wsdl_attachment_t
   )
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _Attachments_getAtPos+
   >      D                                     ')
   >      D  i_index                      10I 0 const
   >       *
   >       *   Returns the number of attachments that were downloaded
   with the
   >       *   last call to the web service.
   >      D Inventory_Attachments_getNumE...
   >      D                 PR            10I 0
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _Attachments_getNumE+
   >      D                                     ')
   >       *
   >       *   Removes all attachments from the list of attachments of
   > this web service.
   >      D Inventory_Attachments_removeAll...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _Attachments_removeAll+
   >      D                                     ')
   >       *
   >       *   Enables/disables a workaround for Web services that are
   driven
   >       *   by Axis and that are affected by the AXIS-2095 bug.
   >      D Inventory_enableAxis2095...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _enableAxis2095+
   >      D                                     ')
   >      D  i_isEnabled                    N   const
   >       *
   >       *   User callback to supply login information
   >       *   Returns WSDL_SUCCESS if successful, WSDL_ERROR upon error.
   >       *
   >       *   Parameter description:
   >       *     i_authType         Authentication type:
   >       *                          WSDL_AUTH_TYPE_HTTP  - HTTP server.
   >       *                          WSDL_AUTH_TYPE_PROXY - Proxy
   server.
   >       *     i_realm            Authentication realm.
   >       *     i_numAttempts      Number of login attempts.
   >       *     o_user             UserName to use.
   >       *     o_password         Password to use.
   >       *
   >      D Inventory_supplyLoginData...
   >      D                 PR            10I 0
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _supplyLoginData+
   >      D                                     ')
   >      D  i_authType                   14A          const  varying
   >      D  i_realm                     126A          const  varying
   >      D  i_numAttempts                10I 0        const
   >      D  o_user                       50A                 varying
   >      D  o_password                   50A                 varying
   >       *
   >       *   Specifies the name of the folder where to put attachments
   in.
   >      D Inventory_setAttachmentFolder...
   >      D                 PR
   >      D                                     extproc('+
   >      D                                     Inventory+
   >      D                                     _setAttachmentFolder+
   >      D                                     ')
   >      D  i_folder                   1024A   const  varying
   options(*varsize)
   >       *
   >  CPY  /COPY QWSDL2RPG,TYPES_H
   >       *
   >       /IF DEFINED(PROTOTYPE_TSTINVEN01)
   >       /EOF
   >       /ENDIF
   >       *
   ---------------------------------------------------------------------
   >       *
   >  CPY  /COPY QBASICS1,PBASICS1                      Tools/400 Runtime
   Library
   >  CPY  /COPY QMIME,PMIME                            Tools/400 MIME
   Parser
   >  CPY  /COPY QMIME,HTTPMIME_H                       Tools/400 MIME
   > Parser to HTTP API adapter
   >  CPY  /COPY QRPGLESRC,HTTPAPI_H                    HTTP-API Service
   Program
   >  CPY  /COPY QWSDL2RPG,PWSDL2R70                    WSDL2RPG: HTTP
   > API Header Extensions
   >  CPY  /COPY QWSDL2RPG,PWSDL2R71                    WSDL2RPG: HTTP
   Debug Log
   >  CPY  /COPY QWSDL2RPG,PWSDL2R86                    WSDL2RPG: Stream
   >  CPY  /COPY QWSDL2RPG,PWSDL2R87                    WSDL2RPG:
   > ManagedMemoryDataSource
   >  CPY  /COPY QWSDL2RPG,PWSDL2R89                    WSDL2RPG: List of
   > attachments
   >  CPY  /COPY QWSDL2RPG,PWSDL2R90                    WSDL2RPG: AppMsg
   >  CPY  /COPY QWSDL2RPG,PWSDL2R94                    WSDL2RPG:
   MultiRef
   >  CPY  /COPY QWSDL2RPG,PWSDL2R97                    WSDL2RPG: eXpat
   Adapter
   >  CPY  /COPY QWSDL2RPG,PWSDL2R98                    WSDL2RPG:
   > UnMarshaller/Marshaller
   >  CPY  /COPY QWSDL2RPG,PWSDL2R42                    WSDL2RPG: User
   > name and password
   >       *
   >       /IF DEFINED(LOGGING_SERVICE)
   >  CPY  /COPY QWSDL2RPG,PLOG4RPG                     Log4rpg: The
   > Log4rpg service program
   >  CPY  /COPY QWSDL2RPG,PLOG4RPG00                   Log4rpg: The
   > Log4rpg stub module
   >       /ENDIF
   >       *
   >       * ------------------------------------
   >       *  Internal prototypes
   >       * ------------------------------------
   >       *
   >       *   Reopens a given input stream in order to send it over
   >       *   the wire again.
   >      D reOpenInputStream...
   >      D                 PR
   like(wsdl_hStream_t    )
   >      D                                     extproc('+
   >      D                                     reOpenInputStream+
   >      D                                     ')
   >      D  i_hDataSource                      const
   like(wsdl_hDataSource_t)
   >      D  i_hInpStream                       value
   like(wsdl_hStream_t    )
   >       *
   >       *   Login in to proxy server or http server.
   >      D login...
   >      D                 PR            10I 0
   >      D                                     extproc('+
   >      D                                     login+
   >      D                                     ')
   >      D  i_http_err                   10I 0 value
   >      D  i_numAttempts                10I 0 value
   >       *
   >       *   Sets the content type and the SOAP action of the POST
   message.
   >      D HTTP_setContentTypeAndSOAPAction...
   >      D                 PR
   >      D                                     extproc('+
   >      D
   HTTP_setContentTypeAndSOAPAction+
   >      D                                     ')
   >      D  o_addlHdrs                 1024A          varying
   >      D  i_pUserData                    *   value
   >       *
   >      D impl_getProfilesRpcStart...
   >      D                 PR
   >      D
   extproc('impl_getProfilesRpcStart')
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >      D impl_getProfilesRpcEnd...
   >      D                 PR
   >      D
   extproc('impl_getProfilesRpcEnd')
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  value                     65535A   varying
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >      D impl_item_of_anyTypeStart_of_impl_getProfilesRpc...
   >      D                 PR
   >      D                                     extproc
   > ('impl_item_of_anyTypeStart_o+
   >      D                                     f_impl_getProfilesRpc')
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >      D impl_item_of_anyTypeEnd_of_impl_getProfilesRpc...
   >      D                 PR
   >      D                                     extproc
   > ('impl_item_of_anyTypeEnd_of_+
   >      D                                     impl_getProfilesRpc')
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  value                     65535A   varying
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >       *   Receice response of HTTP post operation.
   >      D HTTP_receiveResponse...
   >      D                 PR            10I 0 extproc('+
   >      D                                     HTTP_receiveResponse+
   >      D                                     ')
   >      D  i_hStream                    10I 0 value
   >      D  i_data                         *   value
   >      D  i_length                     10I 0 value
   >       *
   >       *   SOAP message: Envelope
   >      D SOAPMessage_Envelope...
   >      D                 PR                  extproc('+
   >      D                                     SOAPMessage_Envelope+
   >      D                                     ')
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >       *   SOAP message: fault information
   >      D SOAPMessage_FaultStart...
   >      D                 PR                  extproc('+
   >      D                                     SOAPMessage_FaultStart+
   >      D                                     ')
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >       *   SOAP message: fault information
   >      D SOAPMessage_FaultEnd...
   >      D                 PR                  extproc('+
   >      D                                     SOAPMessage_FaultEnd+
   >      D                                     ')
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   value                    65535A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >       *   SOAP message: fault details
   >      D SOAPMessage_FaultDetailStart...
   >      D                 PR                  extproc('+
   >      D
   SOAPMessage_FaultDetailStart+
   >      D                                     ')
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >       *   SOAP message: fault details
   >      D SOAPMessage_FaultDetailEnd...
   >      D                 PR                  extproc('+
   >      D
   SOAPMessage_FaultDetailEnd+
   >      D                                     ')
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   value                    65535A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >       *   SOAP message: NULL callback procedure
   >      D SOAPMessage_unexpectedElementStart...
   >      D                 PR
   >      D                                     extproc('+
   >      D
   SOAPMessage_unexpectedElementStart+
   >      D                                     ')
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >       *   SOAP message: NULL callback procedure
   >      D SOAPMessage_unexpectedElementEnd...
   >      D                 PR
   >      D                                     extproc('+
   >      D
   SOAPMessage_unexpectedElementEnd+
   >      D                                     ')
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   value                    65535A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D ignoreUnexpectedSoapHeader...
   >      D                 PR              N
   >      D                                     extproc('+
   >      D
   ignoreUnexpectedSoapHeader+
   >      D                                     ')
   >
   >       *   DataEast customizations
   >
   > mk    *   Set the URL based on data in the EPequipmnt 'DSLAM' record
   > mk   D BuildURLfromEPequipmnt...
   > mk   D                 PR         32767a   varying
   > mk   D                                     extproc('DSLAM_URL')
   > mk   D WebServiceName               256a   varying
   > mk   D                                     const
   > mk   D LoginNeeded                     n   const
   >
   >       * ------------------------------------
   >       *  Global fields & constants
   >       * ------------------------------------
   >       *
   >       *   Web service port name
   >      D cWEB_SERVICE_PORT...
   >      D                 C                   'Inventory'
   >       *
   >       *   UUID of the web service as generated by WSDL2RPG
   >      D cSERVICE_UUID   C
   '30A56001C640194DA35A0004AC101091'
   >       *
   >       *   SOAP response header
   >       *
   >       *   Reference to the 'respSoapHeader' field.
   >      D g_pRespSoapHeader...
   >      D                 S               *   inz
   >       *
   >       *   XMLSAXParser handle
   >      D g_hSAXParser    S
   like(xmlSaxParser_handle_t) inz
   >       *
   >       *   MIME parser
   >      D g_hMIMEParser   S                   like(mime_hMime_t ) inz
   >       *
   >       *   MIME message indicator
   >      D g_isMimeMessage...
   >      D                 S               N   inz(cFalse)
   >       *
   >       *   Content ID of the SOAP message part
   >      D g_SOAPMessageID...
   >      D                 S            512A   varying inz
   >       *
   >       *   Indicator "parse SOAP message"
   >      D g_doParseSOAPMessage...
   >      D                 S               N   inz(cFalse)
   >       *
   >       *   Indicator "SOAP message parsed"
   >      D g_SOAPMessage_done...
   >      D                 S               N   inz(cFalse)
   >       *
   >       *   Body part counter
   >      D g_BodyPart_counter...
   >      D                 S             10I 0 inz
   >       *
   >       *   Default and current attachment folder
   >      D cATTACHMENT_FOLDER...
   >      D                 C                   '/tmp/attachments/'
   >       *
   >      D g_attachmentFolder...
   >      D                 S           1024A   varying
   inz(cATTACHMENT_FOLDER)
   >       *
   >       *   HTTP response "initialized" indicator
   >      D g_HTTP_isInit...
   >      D                 S               N   inz(cFalse)
   >       *
   >       *   POST data CCSID (1208 = UTF-8)
   >      D g_post_ccsid...
   >      D                 S             10I 0 inz(1208)
   >       *
   >       *   HTTP debug log settings
   >      D g_httpDebug     DS                  qualified
   >      D  status                         N   inz
   >      D  fileName                    500A   inz varying
   >       *
   >       *   Proxy server to use
   >      D g_proxy         DS                  qualified
   >      D  server                      256A   inz
   >      D  port                         10I 0 inz
   >       *
   >       *   Switch for AXIS bug AXIS-2095
   >      D g_isAXIS_2095   S               N   inz(cFalse)
   >       *
   >       *   Error information
   >      D g_errors        DS                  likeds(wsdl_errors_t    )
   inz
   >       *
   >       *   User callback to supply login information
   >       *   Returns WSDL_SUCCESS if successful, WSDL_ERROR upon error.
   >      D g_getLoginDataImpl...
   >      D                 S               *   procptr inz
   >       *
   >      D getLoginDataImpl...
   >      D                 PR            10I 0
   >      D
   extproc(g_getLoginDataImpl)
   >      D  i_authType                   14A          const  varying
   >      D  i_realm                     126A          const  varying
   >      D  i_numAttempts                10I 0        const
   >      D  o_user                       50A                 varying
   >      D  o_password                   50A                 varying
   >       *
   >       *   Web service endpoint as specified in the WSDL file.
   >      D cURL            C                   'http://192.168.41.252:
   > 9090/axis/ser+
   >      D                                     vices/Inventory'
   >       *
   >       *   Web service endpoint
   >      D g_url           S          32767A   varying inz(cURL)
   >       *
   >       * -------------------------------------------
   >       *  TODO: Added to implement default
   >       *        attachment handling.
   >       * -------------------------------------------
   >       /IF DEFINED(DEFAULT_ATTACHMENT_HANDLING)
   >  CPY  /COPY QWSDL2RPG,CLIB                         C Runtime Library
   >       *
   >       *  User data scoped to the current part
   >      D partUserData_t...
   >      D                 DS                  qualified
   > based(pDummy)
   >      D  FD                           10i 0
   >       *
   >       /ENDIF
   >       *
   =====================================================================
   >       * Operation: impl:getProfiles
   >       * Returns  : impl_getProfilesRpc
   >       *
   =====================================================================
   >      P Inventory_getProfiles...
   >      P                 B                   export
   >      D Inventory_getProfiles...
   >      D                 PI
   likeds(impl_getProfilesRpc_t)
   >      D  i_in0                              likeds(apachesoap_Map_t)
   >      D  o_msg                       128A   varying
   >       *
   >       *  Return value
   >      D rtnValue        DS
   likeds(impl_getProfilesRpc_t)
   >      D                                     inz
   >       *
   >       *  Local fields
   >      D isUnexpectedError...
   >      D                 S               N   inz(cFalse)
   >      D isRedirect      S               N   inz(cFalse)
   >      D request         S          65535A   varying inz
   >      D url             S                   like(g_url) inz
   >      D rc              S             10I 0 inz
   >      D rcvm0200        DS                  likeds(rcvm0200_t ) inz
   >      D msg             DS                  likeds(msg_t      ) inz
   >      D headers         DS                  likeds(headers_t  ) inz
   >       *
   >      D hDataSource     S                   like(wsdl_hDataSource_t
   ) inz
   >      D hOutStream      S                   like(wsdl_hStream_t
   ) inz
   >      D hSAXParser      S
   like(xmlSaxParser_handle_t) inz
   >      D hMIMEParser     S                   like(mime_hMime_t
   ) inz
   >      D hInpStream      S                   like(wsdl_hStream_t
   ) inz
   >      D contentType     S                   like(wsdl_contentType_t
   ) inz
   >       *
   >       *  Login helper fields
   >      D err             S             10I 0 inz
   >      D lastErr         S             10I 0 inz(-1)
   >      D numAttempts     S             10I 0 inz
   >       *
   >       *  Array iterator fields
   >      D X_A1            S             10I 0 inz
   >      D X_A2            S             10I 0 inz
   >       *
   >      D curItem_of_anyType_A1...
   >      D                 S
   like(impl_item_of_anyType_t)
   >      D                                     inz
   >       *
   >      D curMapItem_A2   DS
   likeds(apachesoap_mapItem_t)
   >      D                                     inz
   >       *
   >      D userData        DS
   likeds(impl_getProfilesRpc_t)
   >      D                                     inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   > - - - - - -
   >       /free
   >
   >          // Set url to include login credentials
   > mk       g_url = BuildURLfromEPequipmnt('Inventory' : cTrue);
   > mk       if g_url = 'ERROR';
   > mk          // unable to build the URL from the EPequipmnt record.
   > mk          // Use the default value in the cURL constant;
   > mk          g_url = cURL;
   > mk       endif;
   >        //  ----  End DataEast custom code...
   >
   >          o_msg = '';
   >
   >          monitor;
   >
   >             // Initialize map to manage <multiRef> elements
   >             MultiRef_new();
   >
   >             // Remove all attachments of this service from the list
   > of attachments
   >             Attachments_removeAll(Attachments_theInstance():
   cSERVICE_UUID);
   >
   >             // Enable/disable HTTP debug log
   >  B01        if (g_httpDebug.status = *ON);
   >  B02           if (g_httpDebug.fileName <> '');
   >                   http_debug(*ON: g_httpDebug.fileName);
   >  X02           else;
   >                   http_debug(*ON);
   >  E02           endif;
   >  X01        else;
   >                http_debug(*OFF);
   >  E01        endif;
   >
   >             // Set proxy server to use
   >  B01        if (g_proxy.server <> '');
   >                http_setproxy(g_proxy.server: g_proxy.port);
   >  X01        else;
   >                http_setproxy('': 0);
   >  E01        endif;
   >
   >             // Set CCSID for POST data according
   >             // to the encoding of the SOAP envelope
   >             HTTP_SetCCSIDs(g_post_ccsid: HTTP_EBCDIC);
   >
   >             // Create and open data source to store the request
   message
   >             hDataSource = ManagedMemoryDataSource_new();
   >
   >             contentType = 'text/xml';
   >             hOutStream = ManagedMemoryDataSource_OutputStream_open(
   >                                hDataSource: contentType:
   g_post_ccsid);
   >
   >             // Produce SOAP request message
   >             request =
   >                '<?xml version="1.0" encoding="UTF-8"?>'
           +
   >                '<soapenv:Envelope'
          +
   >                '
   xmlns:soapenv="[1]http://schemas.xmlsoap.org/soap/envelope/";' +
   >             ' xmlns:apachesoap="[2]http://xml.apache.org/xml-soap";'
   +
   >             ' xmlns:impl="urn:Inventory"' +
   >             '
   xmlns:soapenc="[3]http://schemas.xmlsoap.org/soap/encoding/";' +
   >             ' xmlns:xsd="[4]http://www.w3.org/2001/XMLSchema";' +
   >             '
   xmlns:xsi="[5]http://www.w3.org/2001/XMLSchema-instance";' +
   >                '>'
          +
   >                '<soapenv:Body>'
           +
   >             '';
   >
   >          if (%len(request) > 0);
   >             // Add previous bytes of request message to output
   stream
   >             ManagedMemoryDataSource_OutputStream_write(hOutStream: %
   > addr(requ...
   >             est: *DATA): %len(request));
   >             clear request;
   >          endif;
   >
   >          request = request +
   >          '<impl:getProfiles' +
   >                '
   soapenv:encodingStyle="[6]http://schemas.xmlsoap.org/soap/e+
   >                ncoding/"' +
   >          '>' +
   >          '<in0' +
   >                ' xsi:type="apachesoap:Map"' +
   >          '>' +
   >             '';
   >
   >          if (%len(request) > 0);
   >             // Add previous bytes of request message to output
   stream
   >             ManagedMemoryDataSource_OutputStream_write(hOutStream: %
   > addr(requ...
   >             est: *DATA): %len(request));
   >             clear request;
   >          endif;
   >
   >          for X_A2 = 1 to i_in0.item.x;
   >             curMapItem_A2 = i_in0.item.mapItem(X_A2);
   >
   >             request = request +
   >             '<item' +
   >                ' xsi:type="apachesoap:mapItem"' +
   >             '>' +
   >             '<key>' +
   >                '';
   >
   >             if (%len(request) > 0);
   >                // Add previous bytes of request message to output
   stream
   >
   ManagedMemoryDataSource_OutputStream_write(hOutStream: %addr(
   >                request: *DATA): %len(request));
   >                clear request;
   >             endif;
   >             Marshaller_toAnyTypeV6(
   >                %addr(curMapItem_A2.key)
   >                : %addr(curMapItem_A2.key: *DATA)
   >                : %len(curMapItem_A2.key)
   >                : hOutStream);
   >
   >             request = request +
   >             '</key>' +
   >             '<value>' +
   >                '';
   >
   >             if (%len(request) > 0);
   >                // Add previous bytes of request message to output
   stream
   >
   ManagedMemoryDataSource_OutputStream_write(hOutStream: %addr(
   >                request: *DATA): %len(request));
   >                clear request;
   >             endif;
   >             Marshaller_toAnyTypeV6(
   >                %addr(curMapItem_A2.value)
   >                : %addr(curMapItem_A2.value: *DATA)
   >                : %len(curMapItem_A2.value)
   >                : hOutStream);
   >
   >             request = request +
   >             '</value>' +
   >             '</item>' +
   >                '';
   >
   >             if (%len(request) > 0);
   >                // Add previous bytes of request message to output
   stream
   >
   ManagedMemoryDataSource_OutputStream_write(hOutStream: %addr(
   >                request: *DATA): %len(request));
   >                clear request;
   >             endif;
   >          endfor;
   >
   >          request = request +
   >          '</in0>' +
   >          '</impl:getProfiles>' +
   >                '</soapenv:Body>'
          +
   >                '</soapenv:Envelope>';
   >
   >             // Add remaining bytes of request message to output
   stream
   >  B01        if (%len(request) > 0);
   >                ManagedMemoryDataSource_OutputStream_write(
   >                      hOutStream: %addr(request) + 2: %len(request));
   >  E01        endif;
   >
   >             // Close output stream and finish the request message
   >             ManagedMemoryDataSource_OutputStream_close(hOutStream);
   >
   >             // Open input stream
   >             hInpStream = ManagedMemoryDataSource_InputStream_open
   > (hDataSource);
   >
   >             // Clear error code
   >             clear g_errors;
   >             g_errors.errType = WSDL_HTTP_SUCCESS;
   >
   >             // HTTPAPI: Enables additional headers
   >             http_xproc(HTTP_POINT_ADDL_HEADER
   >                        : %paddr('HTTP_setContentTypeAndSOAPAction')
   >                        : %addr(headers));
   >
   >             headers.contentType =
   >
   ManagedMemoryDataSource_getContentType(hDataSource);
   >             headers.soapAction  = '';
   >
   >             // ---------------------------------------
   >             //   Post request and parse response
   >             // ---------------------------------------
   >
   >             // Create parser (callbacks style: HTTP API)
   >             XMLSAXParser_new(hSAXParser: cTrue);
   >             XMLSAXParser_setDoNamespaces(hSAXParser: cTrue);
   >             XMLSAXParser_registerCallback(hSAXParser
   >                : cXML_CB_SAX_STARTELEMENT
   >                : %paddr('SOAPMessage_Envelope'));
   >             XMLSAXParser_prepareParse(hSAXParser: %addr(userData));
   >
   >             // Create MIME parser in case we need it
   >             hMIMEParser = MIMEParser_new();
   >             MIMEParser_setDecodeData(hMIMEParser: cTrue);
   >             http_mime_DataSink_initialize(hMIMEParser
   >                                           : *NULL
   >                                           :
   %paddr('HTTPDataSink_startPart')
   >                                           :
   %paddr('HTTPDataSink_bodyData')
   >                                           :
   %paddr('HTTPDataSink_endPart'));
   >
   >             // Make parser available for HTTP_receiveResponse()
   >             g_hSAXParser    = hSAXParser;
   >             g_hMIMEParser   = hMIMEParser;
   >             g_isMimeMessage = cFalse;
   >             g_HTTP_isInit   = cFalse;
   >             g_SOAPMessageID = '';
   >             g_doParseSOAPMessage = cFalse;
   >             g_SOAPMessage_done   = cFalse;
   >             g_BodyPart_counter   = 0;
   >
   >             // Make SOAP response header available to
   SOAPMessage_Envelope
   >             g_pRespSoapHeader = *NULL;
   >
   >             // eXpat: Post request and parse response
   >             url = Inventory_getEndpoint();
   >  B01        dou (err <> HTTP_NDAUTH and err <> HTTP_PXNDAUTH);
   >                // Get document from server and handle http redirects
   >                //   301 Moved Permanently
   >                //   302 Found
   >                //   303 See Other
   >                //   307 Temporary Redirect
   >  B02           dou (not isRedirect);
   >                   rc = http_url_post_raw2(
   >                      url
   >                      : hInpStream
   >                      : %paddr(
   >
   'WSDL2R87_ManagedMemoryDataSource_InputStream_read')
   >                      : ManagedMemoryDataSource_getSize(hDataSource)
   >                      : 0
   >                      : %paddr('HTTP_receiveResponse')
   >                      : HTTP_TIMEOUT
   >                      : HTTP_USERAGENT
   >                      : '');
   >  B03              if (rc = 301 or rc = 302 or rc = 303 or rc = 307);
   >                      url = http_redir_loc();
   >                      // Reopen data stream
   >                      hInpStream = reOpenInputStream(hDataSource:
   hInpStream);
   >                      isRedirect = cTrue;
   >  X03              else;
   >                      isRedirect = cFalse;
   >  E03              endif;
   >  E02           enddo;
   >
   >                // The first time we request a document that requires
   > user/password
   >                // it will return a HTTP_NDAUTH error.
   >  B02           if (rc <> 1);
   >                   http_error(err);
   >  B03              if (err = HTTP_NDAUTH or err = HTTP_PXNDAUTH);
   >  B04                 if (g_getLoginDataImpl = *NULL);
   >                         leave;
   >  E04                 endif;
   >
   >  B04                 if (err <> lastErr);
   >                         lastErr = err;
   >                         numAttempts = 0;
   >  E04                 endif;
   >                      numAttempts = numAttempts + 1;
   >
   >  B04                 if (login(err: numAttempts) <> 1);
   >                         leave;
   >  E04                 endif;
   >
   >                      // Reopen data stream
   >                      hInpStream = reOpenInputStream(hDataSource:
   hInpStream);
   >  E03              endif;
   >  X02           else;
   >                   MultiRef_finalize();
   >                   err = 0;
   >  E02           endif;
   >  E01        enddo;
   >
   >             // Preserve parser error code and message text
   >  B01        if (err = HTTP_RDWERR);
   >                g_errors.xmlError.code = XMLToolkit_getError(
   >                                               hSAXParser
   >                                               :
   g_errors.xmlError.text
   >                                               :
   g_errors.xmlError.line
   >                                               :
   g_errors.xmlError.column);
   >  E01        endif;
   >
   >             XMLSAXParser_endParse(hSAXParser);
   >
   >  B01        if (g_isMimeMessage);
   >                MIMEParser_endParse(hMIMEParser);
   >                g_isMimeMessage = cFalse;
   >  E01        endif;
   >
   >             g_HTTP_isInit = cFalse;
   >
   >          on-error;
   >             isUnexpectedError = cTrue;
   >             rcvm0200 = f_rcvPgmMsg(cMsg_Any: *: cMsg_Act_Same: 0
   >                                    : cMsg_Same: cMsg_ToMyself);
   >             http_DebugLog_appendRcvMsg(rcvm0200);
   >             msg = f_cvtRcvMsgToMsg(rcvm0200);
   >             g_errors.errType        = WSDL_HTTP_ERROR_UNEXPECTED;
   >             g_errors.httpError.no   = WSDL_HTTP_ERROR_UNEXPECTED;
   >             g_errors.httpError.text = f_rtvMsgText(msg);
   >             rc    = g_errors.httpError.no;
   >             o_msg = g_errors.httpError.text;
   >          endmon;
   >
   >          g_hSAXParser  = *NULL;
   >          g_hMIMEParser = *NULL;
   >
   >  B01     if (not isUnexpectedError);
   >  B02        if (err <> 0);
   >                g_errors.errType = WSDL_HTTP_ERROR;
   >
   >                // Set http error code and message text
   >                g_errors.httpError.no   = err;
   >                g_errors.httpError.text = http_error();
   >
   >                // Return error message text to caller
   >  B03           if (g_errors.httpError.text <> '');
   >                   o_msg = g_errors.httpError.text;
   >  X03           else;
   >                   o_msg = Inventory_SoapError_getText();
   >  E03           endif;
   >                clear rtnValue;
   >             else;
   >                o_msg = '';
   >                rtnValue = userData;
   >             endif;
   >  E02     endif;
   >
   >  B02     if (not XMLSAXParser_isNull(hSAXParser));
   >             XMLSAXParser_delete(hSAXParser);
   >  E02     endif;
   >
   >  B02     if (not MIMEParser_isNull(hMIMEParser));
   >             MIMEParser_delete(hMIMEParser);
   >  E02     endif;
   >
   >  B02     if (not ManagedMemoryDataSource_isNull(hDataSource));
   >  B03        if (ManagedMemoryDataSource_Stream_isOpen(hInpStream));
   >
   ManagedMemoryDataSource_InputStream_close(hInpStream);
   >  E03        endif;
   >  B03        if (ManagedMemoryDataSource_Stream_isOpen(hOutStream));
   >
   ManagedMemoryDataSource_OutputStream_close(hOutStream);
   >  E03        endif;
   >             ManagedMemoryDataSource_delete(hDataSource);
   >  E02     endif;
   >
   >  B02     if (not MultiRef_isNull());
   >             MultiRef_delete();
   >  E02     endif;
   >
   >  B02     if (http_DebugLog_isOpen());
   >             http_DebugLog_close();
   >  E02     endif;
   >
   >          return rtnValue;
   >
   >       /end-free
   >       *
   >      P Inventory_getProfiles...
   >      P                 E
   >       *
   >       *
   >       *
   ==================================================================
   >       * Return value: impl:getProfilesRpc
   >       *
   ==================================================================
   >      P impl_getProfilesRpcStart...
   >      P                 B
   >      D impl_getProfilesRpcStart...
   >      D                 PI
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D currentItem     DS
   likeds(impl_getProfilesRpc_t)
   >      D                                     based(pCurrentItem)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - -
   >       /free
   >
   >          // Get access to current item
   >          pCurrentItem = userdata;
   >
   >          select;
   >          when (depth = 1
   >                 and
   >                 name = 'getProfilesRpc');
   >             if (MultiRef_isReference(attrs));
   >                MultiRef_put(
   >                   attrs
   >                   : XMLSAXParser_getUserData()
   >                   : depth
   >                   : namespace
   >                   : name
   >                   : path
   >                   : XMLSAXParser_getStartCallback()
   >                   : XMLSAXParser_getEndCallback()
   >                   : *omit
   >                   : %addr(currentItem)
   >                   : %size(currentItem)
   >                   );
   >             endif;
   >             return;
   >
   >          when (depth = 2
   >                 and
   >                 name = 'getProfilesReturn'
   >                 and
   >                 namespace = '');
   >             XMLSAXParser_delegateElementProcessing(
   >                %addr(currentItem.getProfilesReturn)
   >                :
   %paddr('impl_item_of_anyTypeStart_of_impl_getProfilesRpc')
   >                :
   %paddr('impl_item_of_anyTypeEnd_of_impl_getProfilesRpc')
   >                );
   >             return;
   >
   >          endsl;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P impl_getProfilesRpcStart...
   >      P                 E
   >       *
   >       *
   ==================================================================
   >       * Return value: impl:getProfilesRpc
   >       *
   ==================================================================
   >      P impl_getProfilesRpcEnd...
   >      P                 B
   >      D impl_getProfilesRpcEnd...
   >      D                 PI
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  value                     65535A   varying
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D currentItem     DS
   likeds(impl_getProfilesRpc_t)
   >      D                                     based(pCurrentItem)
   >       *
   >      D itemValue       DS
   likeds(wsdl_fullElementData_t)
   >      D                                     inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - -
   >       /free
   >
   >          // Get access to current item
   >          pCurrentItem = userdata;
   >
   >          // Get full element data
   >          itemValue = XMLSAXParser_getFullElementData();
   >
   >          select;
   >          endsl;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P impl_getProfilesRpcEnd...
   >      P                 E
   >       *
   >       *
   ==================================================================
   >       * Return value: impl:getProfilesReturn
   >       *
   ==================================================================
   >      P impl_item_of_anyTypeStart_of_impl_getProfilesRpc...
   >      P                 B
   >      D impl_item_of_anyTypeStart_of_impl_getProfilesRpc...
   >      D                 PI
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D x               S             10I 0 inz
   >       *
   >      D impl_getProfilesReturn...
   >      D                 DS                  likeds
   > (impl_RpgArrayOfArrayOf_xsd_...
   >      D                                     anyType_t)
   >      D                                     based(userdata)
   >       *
   >      D currentItem     S
   like(impl_item_of_anyType_t)
   >      D                                     based(pCurrentItem)
   >       *
   >      D emptyItem       S
   like(impl_item_of_anyType_t)
   >      D                                     inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - -
   >       /free
   >
   >          // Return to caller if array is SOAP encoded.
   >          // Depth=1 indicates that we are at the top
   >          // of the array but not on item level.
   >          if (depth = 1);
   >             if (MultiRef_isReference(attrs));
   >                MultiRef_put(
   >                   attrs
   >                   : XMLSAXParser_getUserData()
   >                   : depth
   >                   : namespace
   >                   : name
   >                   : path
   >                   : XMLSAXParser_getStartCallback()
   >                   : XMLSAXParser_getEndCallback()
   >                   : *omit
   >                   : %addr(impl_getProfilesReturn)
   >                   : %size(impl_getProfilesReturn)
   >                   );
   >             endif;
   >             return;
   >          endif;
   >
   >          // Get access to current array item
   >          if (MultiRef_doCaptureData() and MultiRef_hasItemIndex());
   >             x = MultiRef_getItemIndex();
   >          else;
   >             if (depth = 2);
   >                impl_getProfilesReturn.x = impl_getProfilesReturn.x +
   1;
   >             endif;
   >             x = impl_getProfilesReturn.x;
   >          endif;
   >
   >          pCurrentItem = %addr(impl_getProfilesReturn.item(x));
   >
   >          select;
   >          when (depth = 2);
   >             if (MultiRef_isReference(attrs));
   >                MultiRef_put(
   >                   attrs
   >                   : XMLSAXParser_getUserData()
   >                   : depth
   >                   : namespace
   >                   : name
   >                   : path
   >                   : XMLSAXParser_getStartCallback()
   >                   : XMLSAXParser_getEndCallback()
   >                   : x
   >                   : %addr(currentItem)
   >                   : %size(currentItem)
   >                   );
   >             endif;
   >             return;
   >
   >          endsl;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P impl_item_of_anyTypeStart_of_impl_getProfilesRpc...
   >      P                 E
   >       *
   >       *
   ==================================================================
   >       * Return value: impl:getProfilesReturn
   >       *
   ==================================================================
   >      P impl_item_of_anyTypeEnd_of_impl_getProfilesRpc...
   >      P                 B
   >      D impl_item_of_anyTypeEnd_of_impl_getProfilesRpc...
   >      D                 PI
   >      D  userdata                       *   value
   >      D  depth                        10I 0 value
   >      D  namespace                  1024A   varying const
   >      D  name                       1024A   varying const
   >      D  path                      24576A   varying const
   >      D  value                     65535A   varying
   >      D  attrs                          *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D x               S             10I 0 inz
   >       *
   >      D impl_getProfilesReturn...
   >      D                 DS                  likeds
   > (impl_RpgArrayOfArrayOf_xsd_...
   >      D                                     anyType_t)
   >      D                                     based(userdata)
   >       *
   >      D currentItem     S
   like(impl_item_of_anyType_t)
   >      D                                     based(pCurrentItem)
   >       *
   >      D itemValue       DS
   likeds(wsdl_fullElementData_t)
   >      D                                     inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - -
   >       /free
   >
   >          // Return to caller if array is SOAP encoded.
   >          // Depth=1 indicates that we are at the top
   >          // of the array but not on item level.
   >          if (depth = 1);
   >             return;
   >          endif;
   >
   >          // Get access to current array item
   >          if (MultiRef_doCaptureData() and MultiRef_hasItemIndex());
   >             x = MultiRef_getItemIndex();
   >          else;
   >             x = impl_getProfilesReturn.x;
   >          endif;
   >
   >          pCurrentItem = %addr(impl_getProfilesReturn.item(x));
   >
   >          // Get full element data
   >          itemValue = XMLSAXParser_getFullElementData();
   >
   >          select;
   >          when (depth = 2);
   >             if (not Value_isNil(attrs));
   >                UnMarshaller_toStringV6(
   >                   %addr(currentItem)
   >                   : %addr(currentItem: *DATA)
   >                   : %size(currentItem)
   >                   : itemValue.pData
   >                   : itemValue.size);
   >             endif;
   >
   >          endsl;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P impl_item_of_anyTypeEnd_of_impl_getProfilesRpc...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Reopens a given input stream in order to send it over
   >       *   the wire again.
   >       *
   =====================================================================
   >      P reOpenInputStream...
   >  ERR P                 B
   >       *
   >      D reOpenInputStream...
   >      D                 PI
   like(wsdl_hStream_t    )
   >      D  i_hDataSource                      const
   like(wsdl_hDataSource_t)
   >      D  i_hInpStream                       value
   like(wsdl_hStream_t    )
   >       *
   >       *  Return value
   >      D hInpStream      S                   like(wsdl_hStream_t
   ) inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          ManagedMemoryDataSource_InputStream_close(i_hInpStream);
   >          hInpStream =
   >
   ManagedMemoryDataSource_InputStream_open(i_hDataSource);
   >
   >          return hInpStream;
   >
   >       /end-free
   >       *
   >      P reOpenInputStream...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Login in to proxy server or http server.
   >       *
   =====================================================================
   >      P login...
   >      P                 B
   >       *
   >      D login...
   >      D                 PI            10I 0
   >      D  i_http_err                   10I 0 value
   >      D  i_numAttempts                10I 0 value
   >       *
   >       *  Return value
   >      D rc              S             10I 0 inz
   >       *
   >       *  Helper fields
   >      D basic           S               N   inz
   >      D digest          S               N   inz
   >      D realm           S            124A   inz
   >      D authType        S             14A   inz varying
   >      D userid          S             50A   inz varying
   >      D password        S             50A   inz varying
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (i_http_err = HTTP_NDAUTH);
   >             http_getauth(basic: digest: realm);
   >             authType = WSDL_AUTH_TYPE_HTTP;
   >          else;
   >             http_proxy_getauth(basic: realm);
   >             authType = WSDL_AUTH_TYPE_PROXY;
   >          endif;
   >
   >          rc = getLoginDataImpl(authType: realm
   >                                : i_numAttempts: userid: password);
   >          if (rc <> 1);
   >             userid = '';
   >             password = '';
   >             return rc;
   >          endif;
   >
   >          if (i_http_err = HTTP_NDAUTH);
   >             if (digest);
   >                http_setAuth(HTTP_AUTH_MD5_DIGEST
   >                             : userid: password);
   >             else;
   >                http_setAuth(HTTP_AUTH_BASIC
   >                             : userid: password);
   >             endif;
   >          else;
   >             if (digest);
   >                http_proxy_setAuth(HTTP_AUTH_MD5_DIGEST
   >                                   : userid: password);
   >             else;
   >                http_proxy_setAuth(HTTP_AUTH_BASIC
   >                                   : userid: password);
   >             endif;
   >          endif;
   >
   >          userid = '';
   >          password = '';
   >
   >          return rc;
   >
   >       /end-free
   >       *
   >      P login...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Sets the content type and the SOAP action of the POST
   message.
   >       *
   =====================================================================
   >      P HTTP_setContentTypeAndSOAPAction...
   >      P                 B
   >       *
   >      D HTTP_setContentTypeAndSOAPAction...
   >      D                 PI
   >      D  o_addlHdrs                 1024A          varying
   >      D  i_pUserData                    *   value
   >       *
   >       *  User Data
   >      D headers         DS                  likeds(headers_t) based
   > (i_pUserData)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          o_addlHdrs = cHTTP_HEADER_CONTENT_TYPE + ': ' +
   >                       headers.contentType + cEBCDIC_CRLF +
   >                       cHTTP_HEADER_SOAP_ACTION + ': ' +
   >                       headers.soapAction + cEBCDIC_CRLF;
   >
   >       /end-free
   >       *
   >      P HTTP_setContentTypeAndSOAPAction...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Receice response of HTTP post operation.
   >       *
   =====================================================================
   >      P HTTP_receiveResponse...
   >      P                 B
   >       *
   >      D HTTP_receiveResponse...
   >      D                 PI            10I 0
   >      D  i_hStream                    10I 0 value
   >      D  i_data                         *   value
   >      D  i_length                     10I 0 value
   >       *
   >      D contentType     S           1024A   inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (not g_HTTP_isInit);
   >             select;
   >             when (http_getContentType() = 'text');
   >                if (http_getContentSubType() = 'html');
   >                   if (f_exist('WSDL2RPG': '*LIBL': '*MSGF'));
   >                      clear USR0030;
   >                      USR00301 = cWEB_SERVICE_PORT;
   >
   AppMsg_sendCancelMsg(AppMsg_newError('USR0030':USR0030));
   >                   else;
   >                      AppMsg_sendCancelMsg(
   >                         f_newMsg('CPF9898'
   >                               : 'Unexpected HTML data received from
   > web service'
   >                               : '*ESCAPE'
   >                               : 'QCPFMSG'));
   >                   endif;
   >                endif;
   >             when (http_getContentType() = 'multipart');
   >                contentType = %trim(http_header('content-type'));
   >                MIMEParser_beginParse(g_hMIMEParser);
   >                MIMEParser_setContentType(g_hMIMEParser:
   contentType);
   >                g_SOAPMessageID = http_getContentTypeAttr('start':
   cTrue);
   >                g_isMimeMessage = cTrue;
   >             endsl;
   >             g_HTTP_isInit = cTrue;
   >          endif;
   >
   >          if (g_isMimeMessage);
   >             if (MIMEParser_parse(g_hMIMEParser: i_data: i_length) =
   cTrue);
   >                return i_length;
   >             else;
   >                return -1;
   >             endif;
   >          else;
   >             if (XMLSAXParser_parse(g_hSAXParser: i_data: i_length) =
   cTrue);
   >                return i_length;
   >             else;
   >                return -1;
   >                // return i_length;
   >             endif;
   >          endif;
   >
   >       /end-free
   >       *
   >      P HTTP_receiveResponse...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Starts a MIME body part.
   >       *   This procedure is called whenever a new part is started.
   >       *
   =====================================================================
   >       *   Parameters:
   >       *     i_pPart            Handle of the current part.
   >       *     i_pUserData        Pointer to user data as specified at
   >       *                        http_mime_DataSink_initialize().
   >       *
   =====================================================================
   >      P HTTPDataSink_startPart...
   >      P                 B
   >       *
   >      D HTTPDataSink_startPart...
   >      D                 PI
   >      D  i_pPart                        *   const
   >      D  i_pUserData                    *   const
   >       *
   >      D contentID       S            512A   varying inz
   >      D contentSubType  S             16A   varying inz
   >       *
   >       * -------------------------------------------
   >       *  TODO: Add fields to open
   >       *        the file and to store the
   >       *        file descriptor.
   >       * -------------------------------------------
   >       /IF DEFINED(DEFAULT_ATTACHMENT_HANDLING)
   >      D contentType     S             10I 0 inz
   >      D fileName        S           1024A   varying inz
   >      D fileExt         S             10A   varying inz
   >       *
   >      D partUserData    DS                  likeds(partUserData_t )
   >      D                                     based(pPartUserData)
   >       /ENDIF
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (http_mime_Part_getType(i_pPart) <> cMIME_BASICPART);
   >             return;
   >          endif;
   >
   >          g_BodyPart_counter = g_BodyPart_counter + 1;
   >
   >          contentID      = http_mime_Part_getContentID(i_pPart);
   >          contentSubType = http_mime_Part_getContentSubType(i_pPart);
   >
   >          if (not g_SOAPMessage_done);
   >             if (g_SOAPMessageID <> '');
   >                if (contentSubType = 'xml' and contentID =
   g_SOAPMessageID);
   >                   g_doParseSOAPMessage = cTrue;
   >                   return;
   >                endif;
   >             else;
   >                if (g_BodyPart_counter = 1);
   >                   g_doParseSOAPMessage = cTrue;
   >                   return;
   >                endif;
   >             endif;
   >          endif;
   >
   >          // -----------------------------------------
   >          // TODO:
   >          // Add your code to handle attachments here|
   >          // E.g.: Open output file.
   >          // -----------------------------------------
   >       /IF DEFINED(DEFAULT_ATTACHMENT_HANDLING)
   >
   >          // Ignore all attachments that are not a BasicPart
   >          if (http_mime_Part_getType(i_pPart) <> cMIME_BASICPART);
   >             return;
   >          endif;
   >
   >          fileName       = http_mime_Part_getFileName(i_pPart);
   >          contentID      = http_mime_Part_getContentID(i_pPart);
   >          contentType    = http_mime_Part_getContentType(i_pPart);
   >          contentSubType = http_mime_Part_getContentSubType(i_pPart);
   >
   >          if (contentType = cMIME_TYPE_TEXT);
   >             fileExt = 'txt';
   >          else;
   >             fileExt = contentSubType;
   >          endif;
   >
   >          fileName = g_attachmentFolder +
   >                     %char(%timestamp()) + '_' + contentID + '_' +
   >                     fileName  + '.' + fileExt;
   >          fileName = %xlate(':<>': '___': fileName);
   >
   >          // Assign filename to content-ID and put it into the list
   > of attachments
   >          Attachments_put(Attachments_theInstance()
   >                          : cSERVICE_UUID
   >                          : contentID
   >                          : fileName);
   >
   >          // Produce the user data of that Part to
   >          // store the file descriptor of the open file.
   >          pPartUserData = %alloc(%size(partUserData_t));
   >          clear partUserData;
   >
   >          partUserData.FD = open(fileName
   >                                 : O_CREAT + O_EXCL +
   >                                   O_SHARE_RDONLY + O_WRONLY +
   O_CCSID
   >                                 : S_IRWXU + S_IRWXG + S_IRWXO
   >                                 : 819);   // CCSID does not matter
   because
   >                                           // we write binary data
   >
   >          // Set user data of the current Part.
   >          http_mime_Part_setUserData(i_pPart: pPartUserData);
   >       /ENDIF
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P HTTPDataSink_startPart...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Receices MIME part body data.
   >       *   This procedure is called whenever new body data is
   available.
   >       *
   =====================================================================
   >       *   Parameters:
   >       *     i_pPart            Handle of the current part.
   >       *     i_pUserData        Pointer to user data as specified at
   >       *                        http_mime_DataSink_initialize().
   >       *     i_data             Pointer to decoded body data.
   >       *     i_size             Size of decoded body data.
   >       *
   =====================================================================
   >      P HTTPDataSink_bodyData...
   >      P                 B
   >       *
   >      D HTTPDataSink_bodyData...
   >      D                 PI
   >      D  i_pPart                        *   const
   >      D  i_pUserData                    *   const
   >      D  i_data                         *   const
   >      D  i_size                       10I 0 const
   >       *
   >       * -------------------------------------------
   >       *  TODO: Add fields to write
   >       *        the attachment to the file
   >       *        opened in HTTPDataSink_startPart().
   >       * -------------------------------------------
   >       /IF DEFINED(DEFAULT_ATTACHMENT_HANDLING)
   >      D rc              S             10I 0 inz
   >       *
   >      D partUserData    DS                  likeds(partUserData_t )
   >      D                                     based(pPartUserData)
   >       /ENDIF
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (g_doParseSOAPMessage);
   >             XMLSAXParser_parse(g_hSAXParser: i_data: i_size);
   >             return;
   >          endif;
   >
   >          // -----------------------------------------
   >          // TODO:
   >          // Add your code to handle attachments here|
   >          // E.g.: Write received data to output file.
   >          // -----------------------------------------
   >
   >       /IF DEFINED(DEFAULT_ATTACHMENT_HANDLING)
   >          // Gain access to the user data of the current Part.
   >          pPartUserData = http_mime_Part_getUserData(i_pPart);
   >          if (pPartUserData = *NULL);
   >             return;
   >          endif;
   >
   >          // Return to caller if no file is open.
   >          if (partUserData.FD <= 0);
   >             return;
   >          endif;
   >
   >          // Append attachment data to the file.
   >          rc = write(partUserData.FD: i_data: i_size);
   >       /ENDIF
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P HTTPDataSink_bodyData...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Ends a MIME body part.
   >       *   This procedure is called whenever a new part ends.
   >       *
   =====================================================================
   >       *   Parameters:
   >       *     i_pPart            Handle of the current part.
   >       *     i_pUserData        Pointer to user data as specified at
   >       *                        http_mime_DataSink_initialize().
   >       *
   =====================================================================
   >      P HTTPDataSink_endPart...
   >      P                 B
   >       *
   >      D HTTPDataSink_endPart...
   >      D                 PI
   >      D  i_pPart                        *   const
   >      D  i_pUserData                    *   const
   >       *
   >       * -------------------------------------------
   >       *  TODO: Add fields to close the file
   >       *        opened in HTTPDataSink_startPart().
   >       * -------------------------------------------
   >       /IF DEFINED(DEFAULT_ATTACHMENT_HANDLING)
   >      D rc              S             10I 0 inz
   >       *
   >      D partUserData    DS                  likeds(partUserData_t )
   >      D                                     based(pPartUserData)
   >       /ENDIF
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (http_mime_Part_getType(i_pPart) <> cMIME_BASICPART);
   >             return;
   >          endif;
   >
   >          if (g_doParseSOAPMessage);
   >             g_doParseSOAPMessage = cFalse;
   >             g_SOAPMessage_done   = cTrue;
   >             return;
   >          endif;
   >
   >          // -----------------------------------------
   >          // TODO:
   >          // Add your code to handle attachments here|
   >          // E.g.: Close output file.
   >          // -----------------------------------------
   >       /IF DEFINED(DEFAULT_ATTACHMENT_HANDLING)
   >
   >          // Gain access to the user data of the current Part.
   >          pPartUserData = http_mime_Part_getUserData(i_pPart);
   >          if (pPartUserData = *NULL);
   >             return;
   >          endif;
   >
   >          // Return to caller if no file is open.
   >          if (partUserData.FD <= 0);
   >             return;
   >          endif;
   >
   >          // Close the file.
   >          callp close(partUserData.FD);
   >          partUserData.FD = 0;
   >
   >          // Free memory allocated in HTTPDataSink_startPart()
   >          dealloc(N) pPartUserData;
   >       /ENDIF
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P HTTPDataSink_endPart...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   SOAP message: Envelope
   >       *
   =====================================================================
   >      P SOAPMessage_Envelope...
   >      P                 B
   >       *
   >      D SOAPMessage_Envelope...
   >      D                 PI
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (depth = 1 and f_lcase(name) = 'html');
   >             if (f_exist('WSDL2RPG': '*LIBL': '*MSGF'));
   >                clear USR0030;
   >                USR00301 = cWEB_SERVICE_PORT;
   >                AppMsg_sendCancelMsg(AppMsg_newError('USR0030':
   USR0030));
   >             else;
   >                AppMsg_sendCancelMsg(
   >                      f_newMsg('CPF9898'
   >                               : 'Unexpected HTML data received from
   > web service'
   >                               : '*ESCAPE'
   >                               : 'QCPFMSG'));
   >             endif;
   >          endif;
   >
   >          select;
   >          when (path = '/Envelope/Header');
   >             XMLSAXParser_delegateElementProcessing(
   >                g_pRespSoapHeader
   >                : %paddr('SOAPMessage_unexpectedElementStart')
   >                : %paddr('SOAPMessage_unexpectedElementEnd'));
   >            return;
   >
   >          when (path = '/Envelope/Body');
   >
   >             select;
   >             when (name = 'Fault');
   >                XMLSAXParser_delegateElementProcessing(
   >                   %addr(g_errors.soapFault)
   >                   : %paddr('SOAPMessage_FaultStart')
   >                   : %paddr('SOAPMessage_FaultEnd'));
   >               return;
   >
   >             when (MultiRef_isData(attrs));
   >                XMLSAXParser_delegateElementProcessing(
   >                   *NULL
   >                   : MultiRef_getStartCallback()
   >                   : MultiRef_getEndCallback());
   >                return;
   >
   >             other;
   >                XMLSAXParser_delegateElementProcessing(
   >                   userdata
   >                   : %paddr('impl_getProfilesRpcStart')
   >                   : %paddr('impl_getProfilesRpcEnd'));
   >               return;
   >             endsl;
   >
   >          endsl;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P SOAPMessage_Envelope...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   SOAP message: fault information
   >       *
   =====================================================================
   >      P SOAPMessage_FaultStart...
   >      P                 B
   >       *
   >      D SOAPMessage_FaultStart...
   >      D                 PI
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D fault...
   >      D                 DS                  based(userdata)
   >      D                                     likeds(wsdl_soapFault_t )
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (depth = 1);
   >             return;
   >          endif;
   >
   >          select;
   >          when (name = 'detail');
   >             XMLSAXParser_delegateElementProcessing(
   >                %addr(fault.detail)
   >                : %paddr('SOAPMessage_FaultDetailStart')
   >                : %paddr('SOAPMessage_FaultDetailEnd'));
   >          endsl;
   >
   >       /end-free
   >       *
   >      P SOAPMessage_FaultStart...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   SOAP message: fault information
   >       *
   =====================================================================
   >      P SOAPMessage_FaultEnd...
   >      P                 B
   >       *
   >      D SOAPMessage_FaultEnd...
   >      D                 PI
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   value                    65535A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D fault...
   >      D                 DS                  based(userdata)
   >      D                                     likeds(wsdl_soapFault_t )
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (depth = 1);
   >             return;
   >          endif;
   >
   >          select;
   >          when (name = 'faultcode');
   >             fault.code = value;
   >          when (name = 'faultstring');
   >             fault.string = value;
   >          endsl;
   >
   >       /end-free
   >       *
   >      P SOAPMessage_FaultEnd...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   SOAP message: fault details
   >       *
   =====================================================================
   >      P SOAPMessage_FaultDetailStart...
   >      P                 B
   >       *
   >      D SOAPMessage_FaultDetailStart...
   >      D                 PI
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D detail...
   >      D                 DS                  based(userdata)
   >      D
   likeds(wsdl_soap_faultDetail_t)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (depth = 1);
   >             return;
   >          endif;
   >
   >          select;
   >          endsl;
   >
   >       /end-free
   >       *
   >      P SOAPMessage_FaultDetailStart...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   SOAP message: fault details
   >       *
   =====================================================================
   >      P SOAPMessage_FaultDetailEnd...
   >      P                 B
   >       *
   >      D SOAPMessage_FaultDetailEnd...
   >      D                 PI
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   value                    65535A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       *
   >      D detail...
   >      D                 DS                  based(userdata)
   >      D
   likeds(wsdl_soap_faultDetail_t)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (depth = 1);
   >             return;
   >          endif;
   >
   >          select;
   >          when (name = 'hostname');
   >             detail.hostname = value;
   >          endsl;
   >
   >       /end-free
   >       *
   >      P SOAPMessage_FaultDetailEnd...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   SOAP message: NULL callback procedure
   >       *
   =====================================================================
   >      P SOAPMessage_unexpectedElementStart...
   >      P                 B
   >       *
   >      D SOAPMessage_unexpectedElementStart...
   >      D                 PI
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (ignoreUnexpectedSoapHeader());
   >             http_DebugLog_appendText(
   >                'Warning: Received unexpected Soap header: <' + name
   + '>');
   >             return;
   >          endif;
   >
   >          if (f_exist('WSDL2RPG': '*LIBL': '*MSGF'));
   >             clear USR0042;
   >             USR00421 = 'SOAPMessage_unexpectedElementStart';
   >             USR00422 = 'SOAPMessage_unexpectedElementEnd';
   >             AppMsg_sendCancelMsg(AppMsg_newError('USR0042':
   USR0042));
   >          else;
   >             AppMsg_sendCancelMsg(
   >                f_newMsg('CPF9898'
   >                      : 'Unexpected Soap element received from web
   service.'
   >                      : '*ESCAPE'
   >                      : 'QCPFMSG'));
   >          endif;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P SOAPMessage_unexpectedElementStart...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   SOAP message: NULL callback procedure
   >       *
   =====================================================================
   >      P SOAPMessage_unexpectedElementEnd...
   >      P                 B
   >       *
   >      D SOAPMessage_unexpectedElementEnd...
   >      D                 PI
   >      D   userdata                      *   value
   >      D   depth                       10I 0 value
   >      D   namespace                 1024A   varying const
   >      D   name                      1024A   varying const
   >      D   path                     24576A   varying const
   >      D   value                    65535A   varying const
   >      D   attrs                         *   dim(32767)
   >      D                                     const options(*varsize)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (ignoreUnexpectedSoapHeader());
   >             http_DebugLog_appendText(
   >                'Warning: Received unexpected Soap header: ' +
   value);
   >             http_DebugLog_appendText(
   >                'Warning: Received unexpected Soap header: </' + name
   + '>');
   >             return;
   >          endif;
   >
   >          if (f_exist('WSDL2RPG': '*LIBL': '*MSGF'));
   >             clear USR0042;
   >             USR00421 = 'SOAPMessage_unexpectedElementStart';
   >             USR00422 = 'SOAPMessage_unexpectedElementEnd';
   >             AppMsg_sendCancelMsg(AppMsg_newError('USR0042':
   USR0042));
   >          else;
   >             AppMsg_sendCancelMsg(
   >                f_newMsg('CPF9898'
   >                      : 'Unexpected Soap element received from web
   service.'
   >                      : '*ESCAPE'
   >                      : 'QCPFMSG'));
   >          endif;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P SOAPMessage_unexpectedElementEnd...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Specifies, whether unexpected Soap headers are ignored or
   not.
   >       *
   =====================================================================
   >      P ignoreUnexpectedSoapHeader...
   >      P                 B
   >       *
   >      D ignoreUnexpectedSoapHeader...
   >      D                 PI              N
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return cFalse;
   >
   >       /end-free
   >       *
   >      P ignoreUnexpectedSoapHeader...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Registers an user callback procedure, that is called
   whenever
   >       *   a web service requires user authentification.
   >       *
   =====================================================================
   >      P Inventory_registerLoginCallback...
   >      P                 B                   export
   >       *
   >      D Inventory_registerLoginCallback...
   >      D                 PI
   >   D  D  i_pLoginProc                   *   value  procptr
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          g_getLoginDataImpl = i_pLoginProc;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_registerLoginCallback...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Http: Returns the last HTTP error (code) that occurred.
   >       *
   =====================================================================
   >      P Inventory_isError...
   >      P                 B                   export
   >       *
   >      D Inventory_isError...
   >      D                 PI              N
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          if (g_errors.errType = WSDL_HTTP_SUCCESS);
   >             return cFalse;
   >          else;
   >             return cTrue;
   >          endif;
   >
   >       /end-free
   >       *
   >      P Inventory_isError...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Http: Returns the last HTTP error (code) that occurred.
   >       *
   =====================================================================
   >      P Inventory_HttpError_getCode...
   >      P                 B                   export
   >       *
   >      D Inventory_HttpError_getCode...
   >      D                 PI                  like(wsdl_http_ErrorNo_t
    )
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return g_errors.httpError.no;
   >
   >       /end-free
   >       *
   >      P Inventory_HttpError_getCode...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Http: Returns the last HTTP error (text) that occurred.
   >       *
   =====================================================================
   >      P Inventory_HttpError_getText...
   >      P                 B                   export
   >       *
   >      D Inventory_HttpError_getText...
   >      D                 PI
   like(wsdl_http_ErrorText_t)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return g_errors.httpError.text;
   >
   >       /end-free
   >       *
   >      P Inventory_HttpError_getText...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Soap: Returns the last SOAP error (code) that occurred.
   >       *
   =====================================================================
   >      P Inventory_SoapError_getCode...
   >      P                 B                   export
   >       *
   >      D Inventory_SoapError_getCode...
   >      D                 PI
   like(wsdl_soap_faultcode_t  )
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return g_errors.soapFault.code;
   >
   >       /end-free
   >       *
   >      P Inventory_SoapError_getCode...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Soap: Returns the last SOAP error (text) that occurred.
   >       *
   =====================================================================
   >      P Inventory_SoapError_getText...
   >      P                 B                   export
   >       *
   >      D Inventory_SoapError_getText...
   >      D                 PI
   like(wsdl_soap_faultstring_t)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return g_errors.soapFault.string;
   >
   >       /end-free
   >       *
   >      P Inventory_SoapError_getText...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   XML: Returns the last XML error (code) that occurred.
   >       *
   =====================================================================
   >      P Inventory_XmlError_getCode...
   >      P                 B                   export
   >       *
   >      D Inventory_XmlError_getCode...
   >      D                 PI                  like(wsdl_xml_ErrorNo_t
    )
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return g_errors.xmlError.code;
   >
   >       /end-free
   >       *
   >      P Inventory_XmlError_getCode...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   XML: Returns the last XML error (text) that occurred.
   >       *
   =====================================================================
   >      P Inventory_XmlError_getText...
   >      P                 B                   export
   >       *
   >      D Inventory_XmlError_getText...
   >      D                 PI                  like(wsdl_xml_ErrorText_t
    )
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return g_errors.xmlError.text;
   >
   >       /end-free
   >       *
   >      P Inventory_XmlError_getText...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Returns the file name of the attachment that is associated
   to
   >       *   a given content ID.
   >       *
   =====================================================================
   >      P Inventory_Attachments_get...
   >      P                 B                   export
   >       *
   >      D Inventory_Attachments_get...
   >      D                 PI                  like(wsdl_path_t     )
   >      D  i_attachmentID...
   >      D                                     const
   like(wsdl_attachmentID_t )
   >       *
   >      D fileName        S                   like(wsdl_path_t     )
   inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          fileName = Attachments_get(Attachments_theInstance()
   >                                     : cSERVICE_UUID
   >                                     : i_attachmentID);
   >          return fileName;
   >
   >       /end-free
   >       *
   >      P Inventory_Attachments_get...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Returns the file name of the attachment that is associated
   to
   >       *   a given index.
   >       *
   =====================================================================
   >      P Inventory_Attachments_getAtPos...
   >      P                 B                   export
   >       *
   >      D Inventory_Attachments_getAtPos...
   >      D                 PI                  likeds(wsdl_attachment_t
   )
   >      D  i_index                      10I 0 const
   >       *
   >      D attachment      DS                  likeds(wsdl_attachment_t
   ) inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          attachment = Attachments_getAtPos(Attachments_theInstance()
   >                                            : cSERVICE_UUID
   >                                            : i_index);
   >          return attachment;
   >
   >       /end-free
   >       *
   >      P Inventory_Attachments_getAtPos...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Returns the number of attachments that were downloaded
   with
   >       *   the last call of the web service.
   >       *
   =====================================================================
   >      P Inventory_Attachments_getNumE...
   >      P                 B                   export
   >       *
   >      D Inventory_Attachments_getNumE...
   >      D                 PI            10I 0
   >       *
   >      D numE            S             10I 0 inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          numE =
   Attachments_getNumAttachments(Attachments_theInstance()
   >                                               : cSERVICE_UUID);
   >          return numE;
   >
   >       /end-free
   >       *
   >      P Inventory_Attachments_getNumE...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Removes all attachments from the list of attachments of
   >       *   this web service.
   >       *
   =====================================================================
   >      P Inventory_Attachments_removeAll...
   >      P                 B                   export
   >       *
   >      D Inventory_Attachments_removeAll...
   >      D                 PI
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          Attachments_removeAll(Attachments_theInstance()
   >                                : cSERVICE_UUID);
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_Attachments_removeAll...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >     R *   *** private/experimental ***
   >       *   Enables/disables a workaround for Web services that are
   driven
   >       *   by Axis and that are affected by the AXIS-2095 bug.
   >       *   Export this procedure if you really need it.
   >       *
   =====================================================================
   >      P Inventory_enableAxis2095...
   >      P                 B
   >       *
   >      D Inventory_enableAxis2095...
   >      D                 PI
   >      D  i_isEnabled                    N   const
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          deprecated();
   >
   >          g_isAXIS_2095 = i_isEnabled;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_enableAxis2095...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Specifies the name of the folder where to put attachments
   in.
   >       *
   =====================================================================
   >      P Inventory_setAttachmentFolder...
   >      P                 B                   export
   >       *
   >      D Inventory_setAttachmentFolder...
   >      D                 PI
   >      D  i_folder                   1024A   const  varying
   options(*varsize)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          g_attachmentFolder = i_folder;
   >
   >          g_attachmentFolder = %trimR(%xlate('Ö': '/':
   g_attachmentFolder));
   >          if (not f_endsWith('/': g_attachmentFolder));
   >             g_attachmentFolder = g_attachmentFolder + '/';
   >          endif;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_setAttachmentFolder...
   >      P                 E
   >       /IF DEFINED(LOGGING_SERVICE)
   >       *
   >       *
   =====================================================================
   >       *   Starts the Log4rpg logging service.
   >       *
   =====================================================================
   >      P Inventory_startLoggingService...
   >      P                 B                   export
   >       *
   >      D Inventory_startLoggingService...
   >      D                 PI
   >      D  i_path                             const
   like(LOG4RPG_path_t   )
   >      D                                            options(*nopass)
   >      D  i_waitMinutes                10I 0 const  options(*nopass)
   >      D  i_unit                       10A   const  options(*nopass)
   >       *
   >       *  Parameter positions
   >      D p_path          C                   1
   >      D p_waitMinutes   C                   2
   >      D p_unit          C                   3
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          LoggerStub_loadSrvPgm();
   >
   >          select;
   >          when (%parms() >= p_unit);
   >             Configurator_loadAndWatchPropertiesConfiguration(
   >                                                 i_path:
   > i_waitMinutes: i_unit);
   >          when (%parms() >= p_waitMinutes);
   >             Configurator_loadAndWatchPropertiesConfiguration(
   >                                                 i_path:
   i_waitMinutes);
   >          when (%parms() >= p_path);
   >             Configurator_loadPropertiesConfiguration(i_path);
   >          other;
   >             Configurator_loadDefaultConfiguration();
   >          endsl;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_startLoggingService...
   >      P                 E
   >       /ENDIF
   >       *
   >       *
   =====================================================================
   >       *   Web service: Enables/disables the debug log of HTTP API
   >       *
   =====================================================================
   >      P Inventory_setHttpDebug...
   >      P                 B                   export
   >       *
   >      D Inventory_setHttpDebug...
   >      D                 PI
   >      D   i_status                      N   const
   >      D   i_fileName                 500A   const  varying
   options(*nopass)
   >       *
   >       *  Parameter positions
   >      D p_fileName      C                   2
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          g_httpDebug.status = i_status;
   >
   >          if (%parms() >= p_fileName);
   >             g_httpDebug.fileName = i_fileName;
   >          else;
   >             g_httpDebug.fileName = HTTP_API_DEFAULT_LOG_FILE;
   >          endif;
   >
   >          if (i_status);
   >             http_DebugLog_open(g_httpDebug.fileName);
   >          else;
   >             http_DebugLog_close();
   >          endif;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_setHttpDebug...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Web service: Sets the proxy server to use for the
   connection
   >       *
   =====================================================================
   >      P Inventory_setProxy...
   >      P                 B                   export
   >       *
   >      D Inventory_setProxy...
   >      D                 PI
   >      D  i_server                    256A   const
   >      D  i_port                       10I 0 const
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          g_proxy.server = i_server;
   >          g_proxy.port   = i_port;
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_setProxy...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Web service: Returns the endpoint of the Web service
   >       *
   =====================================================================
   >      P Inventory_getEndpoint...
   >      P                 B                   export
   >       *
   >      D Inventory_getEndpoint...
   >      D                 PI         32767A          varying
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          return g_url;
   >
   >       /end-free
   >       *
   >      P Inventory_getEndpoint...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Web service: Sets the endpoint of the Web service
   >       *
   =====================================================================
   >      P Inventory_setEndpoint...
   >      P                 B                   export
   >       *
   >      D Inventory_setEndpoint...
   >      D                 PI
   >      D  i_url                     32767A   const varying
   options(*varsize)
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          g_url = %subst(i_url: 1: %len(i_url));
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_setEndpoint...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Web service: Returns the host name of the Web Service
   endpoint
   >       *
   =====================================================================
   >      P Inventory_getHost...
   >      P                 B                   export
   >       *
   >      D Inventory_getHost...
   >      D                 PI         32767A          varying
   >       *
   >      D tmpUrl          S                   like(url_t ) inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          tmpUrl = URL_new(g_url);
   >
   >          return URL_getHost(tmpUrl);
   >
   >       /end-free
   >       *
   >      P Inventory_getHost...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Web service: Sets the host name of the Web service
   endpoint
   >       *
   =====================================================================
   >      P Inventory_setHost...
   >      P                 B                   export
   >       *
   >      D Inventory_setHost...
   >      D                 PI
   >      D  i_host                    32767A   const varying
   options(*varsize)
   >       *
   >      D tmpUrl          S                   like(url_t ) inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          tmpUrl = URL_new(g_url);
   >          URL_setHost(tmpUrl: %subst(i_host: 1: %len(i_host)));
   >          g_url = URL_toString(tmpUrl);
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_setHost...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Web service: Returns the port of the Web Service endpoint
   >       *
   =====================================================================
   >      P Inventory_getPort...
   >      P                 B                   export
   >       *
   >      D Inventory_getPort...
   >      D                 PI            10I 0
   >       *
   >      D tmpUrl          S                   like(url_t ) inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          tmpUrl = URL_new(g_url);
   >
   >          return URL_getPort(tmpUrl);
   >
   >       /end-free
   >       *
   >      P Inventory_getPort...
   >      P                 E
   >       *
   >       *
   =====================================================================
   >       *   Web service: Sets the port of the Web service endpoint
   >       *
   =====================================================================
   >      P Inventory_setPort...
   >      P                 B                   export
   >       *
   >      D Inventory_setPort...
   >      D                 PI
   >      D  i_port                       10I 0 const
   >       *
   >      D tmpUrl          S                   like(url_t ) inz
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - -
   >       /free
   >
   >          tmpUrl = URL_new(g_url);
   >          URL_setPort(tmpUrl: i_port);
   >          g_url = URL_toString(tmpUrl);
   >
   >          return;
   >
   >       /end-free
   >       *
   >      P Inventory_setPort...
   >      P                 E
   >       *
   > __________________________________
   >
   > The Caller, modified to include the input parms and to show the
   > result via DSPLY is as follows:
   >
   >       *
   =====================================================================
   >       *  Generated by WSDL2RPG 1.14beta11 / 23.07.2011
   >       *  Built on Aug 18, 2011 (13:26:18)
   >       *  Built for V6R1M0
   >       *  Based on WS_PGM v1.14
   >       *
   =====================================================================
   >       *   Sample program to show how to call the
   >       *     Inventory_getProfiles()
   >       *   Web service.
   >       *
   =====================================================================
   >       *   Log4rpg Logging Service
   >       /UNDEFINE LOGGING_SERVICE
   >       *
   =====================================================================
   >       *   Pre-Compiler tags used by STRPREPRC to retrieve creation
   >       *   commands from the source member.
   >       *
   ---------------------------------------------------------------------
   >       * >>PRE-COMPILER<<
   >       *   >>CRTCMD<< CRTRPGMOD    MODULE(&LI/&OB) +
   >       *                           SRCFILE(&SL/&SF) +
   >       *                           SRCMBR(&SM);
   >       *   >>COMPILE<<
   >       *     >>PARM<< TRUNCNBR(*NO);
   >       *     >>PARM<< DBGVIEW(*LIST);
   >       *   >>END-COMPILE<<
   >       *   >>EXECUTE<<
   >       *   >>CMD<<    CRTPGM       PGM(&LI/&OB) +
   >       *                           MODULE(*PGM) +
   >       *                           BNDSRVPGM(*LIBL/TSTINVEN01  +
   >       *                                     ) +
   >       *                           DETAIL(*BASIC) +
   >       *                           ACTGRP(*NEW);
   >       * >>END-PRE-COMPILER<<
   >       *
   =====================================================================
   >      H DEBUG
   >      H OPTION(*SRCSTMT : *NODEBUGIO)
   >      H EXTBININT(*YES)
   >       *
   >       *  Include generated web service stub module to
   >       *  define the prototype of the web service procedure
   >       *  and the required type definitions (aka reference fields).
   >       /DEFINE PROTOTYPE_TSTINVEN01
   >  CPY  /COPY MKOESTER/QRPGLESRC,TSTINVEN01
   >       /UNDEFINE PROTOTYPE_TSTINVEN01
   >       *
   >       /IF DEFINED(LOGGING_SERVICE)
   >  CPY  /COPY QWSDL2RPG,PLOG4RPG                     Log4rpg: The
   > Log4rpg service program
   >  CPY  /COPY QWSDL2RPG,PLOG4RPG00                   Log4rpg: The
   > Log4rpg stub module
   >       /ENDIF
   >       *
   >       *  Program entry point
   >      D TSTGETPROF...
   >      D                 PR
   >       *
   >       *  Sends a message to the command line.
   >      D sndMsg...
   >      D                 PR                  extproc('sndMsg')
   >      D  i_text                      128A   value  varying
   >       *
   >       *
   =====================================================================
   >       *  Program entry point
   >       *
   =====================================================================
   >      D TSTGETPROF...
   >      D                 PI
   >       *
   >       *  Web service error message text
   >      D errText         S                   like(wsdl_errText_t ) inz
   >       *
   >       *  Request message
   >       *  These fields needs to be filled with reasonable values
   >       *  right before calling the web service.
   >      D in0             DS                  likeds(apachesoap_Map_t)
   >      D                                     inz
   >       *
   >       *  Response message
   >       *  This structure contains the result values returned by
   >       *  the web service.
   >      D getProfilesRpc  DS
   likeds(impl_getProfilesRpc_t)
   >      D                                     inz
   >       *
   >       *  Text of messages sent to the command line
   >      D text            S            128A   varying inz
   >
   >  mk  D DisplayThis     s             40a
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   -
   >       /free
   >       /if defined(LOGGING_SERVICE)
   >
   >          // Enable Log4rpg, in order to debug WSDL2RPG
   >          // (Enable Log4rpg when you are ask for it by the
   developer)
   >          Inventory_startLoggingService(
   >             'mbr:QWSDL2RPG.LOG4RPG');
   >       /endif
   >
   >          // Enable/disable http api debug log
   >          // (Enable the http api debug log in case of problems with
   > the web service)
   >          Inventory_setHttpDebug(
   >              *ON: '/tmp/httpapi_debug.txt');   // Default path of
   http api
   >
   >          // Specify a proxy server if your network requires it.
   >          // Inventory_setProxy(
   >          //    'your.proxy.server': 8080);
   >
   >          // Set the paramater values of the request message
   >          // of the web service.
   >          //    assign values here
   >          // Set number of array items:
   >  mk      in0.item.x = 1;
   >          // Set array item values:
   >          in0.item.mapItem(in0.item.x).key = 'profileName';
   >          in0.item.mapItem(in0.item.x).value = 'A_646MOD Bridged';
   >
   >          // Now let's call the web service.
   >          getProfilesRpc =
   >             Inventory_getProfiles(
   >                 in0:
   >                 errText);
   >
   >          // If the Web service finished successfully ...
   >  B01     if (not Inventory_isError());
   >             // ... get response data from response data structure
   >
   >  mk      DisplayThis = %editc(GetProfilesRpc.getProfilesReturn.x :
   '1');
   >  mk          DSPLY (%trim(DisplayThis));
   >
   >  mk      DisplayThis =
   %trim(getProfilesRpc.getProfilesReturn.item(1));
   >  mk          DSPLY (%trim(DisplayThis));
   >
   >  X01     else;
   >             // ... else show error messages ordered by priority:
   >             // 1. HTTP error information
   >             text = %char(
   >                       Inventory_HttpError_getCode()
   >                       ) + ': ' +
   >                    Inventory_HttpError_getText()
   >                    ;
   >             sndMsg(text);
   >             // 2. SOAP error information
   >  B02        if (Inventory_SoapError_getCode()
   >                   <> '');
   >                text = Inventory_SoapError_getCode()
   >                       + ': ' +
   >                       Inventory_SoapError_getText()
   >                       ;
   >                sndMsg(text);
   >  E02        endif;
   >             // 3. XML parser error information
   >  B02        if (Inventory_XmlError_getCode()
   >                   <> 0);
   >                text = %char(Inventory_XmlError_getCode())
   >                       + ': ' +
   >                       Inventory_XmlError_getText()
   >                       ;
   >                sndMsg(text);
   >  E02        endif;
   >  E01     endif;
   >
   >          *inlr = *on;
   >
   >       /end-free
   >       *
   >       *
   =====================================================================
   >       *  *** private ***
   >       *  Sends a message to the command line.
   >       *
   =====================================================================
   >      P sndMsg...
   >      P                 B
   >       *
   >      D sndMsg...
   >      D                 PI
   >      D  i_text                      128A   value  varying
   >       *
   >       *  Local fields
   >      D msgKey          S              4A   inz
   >       *
   >       *  Qualified message file name
   >      D qMsgF           DS                  qualified inz
   >      D  name                         10A
   >      D  lib                          10A
   >       *
   >       *  API error code
   >      D errCode         DS                  qualified inz
   >      D  bytPrv                       10I 0
   >      D  bytAvl                       10I 0
   >      D  excID                         7A
   >      D  reserved                      1A
   >      D  excDta                      256A
   >       *
   >       *  Send Program Message (QMHSNDPM) API
   >      D QMHSNDPM        PR                         extpgm('QMHSNDPM')
   >      D   i_msgID                      7A   const
   >      D   i_qMsgF                     20A   const
   >      D   i_msgData                32767A   const  options(*varsize )
   >      D   i_length                    10I 0 const
   >      D   i_msgType                   10A   const
   >      D   i_callStkE               32767A   const  options(*varsize )
   >      D   i_callStkC                  10I 0 const
   >      D   o_msgKey                     4A
   >      D   io_ErrCode               32767A          options(*varsize )
   >       * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   -
   >       /free
   >          clear qMsgF;
   >          qMsgF.name = 'QCPFMSG';
   >          qMsgF.lib  = '*LIBL';
   >          clear errCode;
   >          errCode.bytPrv = %size(errCode);
   >          QMHSNDPM('CPF9897': qMsgF: i_text: %len(i_text): '*INFO'
   >                   : '*CTLBDY': 1: msgKey: errCode);
   >          return;
   >       /end-free
   >       *
   >      P sndMsg...
   >      P                 E
   > __________________________________
   >
   > HTTPAPI Ver 1.24beta11 released 2010-09-09
   > OS/400 Ver V6R1M0
   >
   > New iconv() objects set, PostRem=1208. PostLoc=0. ProtRem=819.
   ProtLoc=0
   > http_persist_open(): entered
   > http_long_ParseURL(): entered
   > DNS resolver retrans: 2
   > DNS resolver retry  : 2
   > DNS resolver options: x'00000136'
   > DNS default domain: GSTNETWORKS.NET
   > DNS server found: 12.6.236.126
   > DNS server found: 12.160.200.5
   > http_persist_post(): entered
   > http_long_ParseURL(): entered
   > http_setauth(): entered
   > do_oper(POST): entered
   > POST /axis/services/Inventory HTTP/1.1
   > Host: 192.168.41.252:9090
   > User-Agent: http-api/1.24
   > Content-Length: 632
   > Authorization: Basic cm9vdDpwdWJsaWM=
   > Content-Type: text/xml
   > SOAPAction:
   >
   >
   > sendraw(): entered
   > <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
   xmlns:soapenv="
   > [7]http://schemas.xmlsoap.org/soap/envelope/";
   xmlns:apachesoap="http://
   > xml.apache.org/xml-soap" xmlns:impl="urn:Inventory" xmlns:soapenc="
   > [8]http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://
   > [9]www.w3.org/2001/XMLSchema" xmlns:xsi="[10]http://www.w3.org/2001/
   > XMLSchema-instance"><soapenv:Body><impl:getProfiles
   soapenv:encodingStyle="
   > [11]http://schemas.xmlsoap.org/soap/encoding/";><in0
   > xsi:type="apachesoap:Map"><item
   > xsi:type="apachesoap:mapItem"><key>profileName</key><value>A_646MOD
   > Bridged</value></item></in0></impl:getProfiles></soapenv:Body></
   > soapenv:Envelope>
   > recvresp(): entered
   > HTTP/1.1 200 OK
   > Server: Apache-Coyote/1.1
   > Set-Cookie: JSESSIONID=9343C6FFE7D8F2677F2197179B66F5C9; Path=/axis
   > Content-Type: text/xml;charset=utf-8
   > Transfer-Encoding: chunked
   > Date: Thu, 18 Aug 2011 18:10:08 GMT
   >
   >
   > SetError() #13: HTTP/1.1 200 OK
   > recvresp(): end with 200
   > recvdoc parms: chunked 0
   > header_load_cookies() entered
   > cookie_parse() entered
   > cookie =  JSESSIONID=9343C6FFE7D8F2677F2197179B66F5C9; Path=/axis
   > cookie attr JSESSIONID=9343C6FFE7D8F2677F2197179B66F5C9
   > cookie attr Path=/axis
   > recvchunk(): entered
   > get_chunk_size(): entered
   > 2000
   >
   > chunk size = 8192
   > get_chunk_size returned 8192
   > calling comm_blockread
   > <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
   xmlns:soapenv="
   > [12]http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://
   > [13]www.w3.org/2001/XMLSchema"
   xmlns:xsi="[14]http://www.w3.org/2001/
   > XMLSchema-instance"><soapenv:Body><ns1:getProfilesResponse
   >
   soapenv:encodingStyle="[15]http://schemas.xmlsoap.org/soap/encoding/";
   > xmlns:ns1="urn:Inventory"><getProfilesReturn
   > soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"
   xmlns:soapenc="
   > [16]http://schemas.xmlsoap.org/soap/encoding/";><getProfilesReturn
   > href="#id0"/></getProfilesReturn></ns1:getProfilesResponse><multiRef
   > id="id0" soapenc:root="0" soapenv:encodingStyle="http://
   > schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Map"
   xmlns:soapenc="
   > [17]http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns2="http://
   > xml.apache.org/xml-soap"><item><key
   > xsi:type="soapenc:string">WL_COUNTRY</key><value
   > xsi:type="soapenc:string">WL_COUNTRY_US</value></item><item><key
   > xsi:type="soapenc:string">WL_DEFAULT_TX_KEY</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">WL_WPA2_TKIP</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">displayName</key><value
   > xsi:type="soapenc:string">Profile_RG General_A_646MOD Bridged</
   > value></item><item><key xsi:type="soapenc:string">failureCount</
   > key><value xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_INET_VCI</key><value
   > xsi:type="soapenc:string">35</value></item><item><key
   > xsi:type="soapenc:string">RG_DSCP_STATUS_1</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">WL_WPA2_AES_CCMP</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_SUBSCRIBER_USER_PASSWORD</key><value
   > xsi:type="soapenc:string">admin</value></item><item><key
   > xsi:type="soapenc:string">stringstatus</key><value
   > xsi:type="soapenc:string">Clear</value></item><item><key
   > xsi:type="soapenc:string">RG_SNTP_SERVER</key><value
   > xsi:type="soapenc:string">192.168.41.5</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_HPNA</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">uClass</key><value
   > xsi:type="soapenc:string">null</value></item><item><key
   > xsi:type="soapenc:string">parentKey</key><value
   > xsi:type="soapenc:string">NULL</value></item><item><key
   > xsi:type="soapenc:string">RG_ROUTE_SUBNET_4</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_INET_FRAME_TYPE</key><value
   > xsi:type="soapenc:string">Tagged</value></item><item><key
   > xsi:type="soapenc:string">RG_ROUTE_SUBNET_3</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_ROUTE_SUBNET_2</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_ROUTE_SUBNET_1</key><value
   > xsi:type="soapenc:string">12.160.207.222</value></item><item><key
   > xsi:type="soapenc:string">WL_AUTO_CHANNEL</key><value
   > xsi:type="soapenc:string">Enabled</value></item><item><key
   > xsi:type="soapenc:string">RG_VOIP_VPI</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_END_USER_LOGIN</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_WL</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_MGMT_SUBNET_NAME_1</key><value
   > xsi:type="soapenc:string"></value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_UP_RATE_HPNA</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_TIME_ZONE</key><value
   > xsi:type="soapenc:string">EST</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_GLAN</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_INET_VLAN</key><value
   > xsi:type="soapenc:string">800</value></item><item><key
   > xsi:type="soapenc:string">WL_STATUS</key><value
   > xsi:type="soapenc:string">Enabled</value></item><item><key
   > xsi:type="soapenc:string">managed</key><value
   > xsi:type="soapenc:string">true</value></item><item><key
   > xsi:type="soapenc:string">RG_VOIP_VCI</key><value
   > xsi:type="soapenc:string">35</value></item><item><key
   > xsi:type="soapenc:string">WL_WPA2</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_HPNA</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">WL_WPA1</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_MGMT_VPI</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_VOIP_FRAME_TYPE</key><value
   > xsi:type="soapenc:string">Tagged</value></item><item><key
   > xsi:type="soapenc:string">RG_ADDITIONAL_VLAN_INCLUDE_VIDS</
   > key><value xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_6</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">status</key><value
   > xsi:type="soapenc:string">5</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_5</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_4</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_3</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_SUPER_USER_LOGIN</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_2</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_BOOTSTRAP_VLAN</key><value
   > xsi:type="soapenc:string">2100</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_UP_RATE_GLAN</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SERVICE_1</key><value
   > xsi:type="soapenc:string">RG_INTERNET_SERVICE</value></
   > item><item><key xsi:type="soapenc:string">RG_CES_VLAN</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">classname</key><value
   > xsi:type="soapenc:string">ProfileMO</value></item><item><key
   > xsi:type="soapenc:string">WL_PROFILE</key><value
   > xsi:type="soapenc:string">WL_MIXED_G_WIFI</value></item><item><key
   > xsi:type="soapenc:string">tester</key><value
   > xsi:type="soapenc:string">ping</value></item><item><key
   > xsi:type="soapenc:string">RG_MGMT_VCI</key><value
   > xsi:type="soapenc:string">35</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_GLAN</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">WL_802_1_AUTHENTICATION</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_6</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_5</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_FLOW_CONTROL_1</key><value
   > xsi:type="soapenc:string">Enabled</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_4</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_MGMT_VLAN</key><value
   > xsi:type="soapenc:string">2101</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_3</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_HPNA</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_2</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_1</key><value
   > xsi:type="soapenc:string">Enabled</value></item><item><key
   > xsi:type="soapenc:string">type</key><value
   > xsi:type="soapenc:string">Profile</value></item><item><key
   > xsi:type="soapenc:string">RG_ROUTE_GATEWAY_1</key><value
   > xsi:type="soapenc:string">10.252.0.1</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_6</key><value
   > xsi:type="soapenc:string">0</value></
   > comm_blockread returned 8192
   >
   >
   > get_chunk_size(): entered
   > 1a0d
   >
   > chunk size = 6669
   > get_chunk_size returned 6669
   > calling comm_blockread
   > item><item><key xsi:type="soapenc:string">RG_PORT_UP_RATE_6</
   > key><value xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_5</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_UP_RATE_5</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_4</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_UP_RATE_4</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_3</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SPEED_GLAN</key><value
   > xsi:type="soapenc:string">RG_AUTO</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_UP_RATE_3</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_2</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_UP_RATE_2</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_DOWN_RATE_1</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_UP_RATE_1</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_VOIP_VLAN</key><value
   > xsi:type="soapenc:string">2002</value></item><item><key
   > xsi:type="soapenc:string">WL_AUTHENTICATION</key><value
   > xsi:type="soapenc:string">WL_AUTH_OPEN</value></item><item><key
   > xsi:type="soapenc:string">RG_SUBSCRIBER_USER_LOGIN</key><value
   > xsi:type="soapenc:string">admin</value></item><item><key
   > xsi:type="soapenc:string">name</key><value
   > xsi:type="soapenc:string">Profile_RG General_A_646MOD Bridged</
   > value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_ADMIN_STATE_GLAN</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_INCLUDE_PORT_ASSIGNMENT</key><value
   > xsi:type="soapenc:string">RG_PROFILE_SETTINGS</value></
   > item><item><key xsi:type="soapenc:string">WL_802_1_REKEY_TIMEOUT</
   > key><value xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_PORT_SPEED_6</key><value
   > xsi:type="soapenc:string">RG_AUTO</value></item><item><key
   > xsi:type="soapenc:string">RG_INCLUDE_WIRELESS_PARAMS</key><value
   > xsi:type="soapenc:string">RG_PROFILE_SETTINGS</value></
   > item><item><key xsi:type="soapenc:string">RG_PORT_SPEED_5</
   > key><value xsi:type="soapenc:string">RG_AUTO</value></
   > item><item><key xsi:type="soapenc:string">RG_PORT_SPEED_4</
   > key><value xsi:type="soapenc:string">RG_AUTO</value></
   > item><item><key xsi:type="soapenc:string">RG_PORT_SPEED_3</
   > key><value xsi:type="soapenc:string">RG_AUTO</value></
   > item><item><key xsi:type="soapenc:string">RG_PORT_SPEED_2</
   > key><value xsi:type="soapenc:string">RG_AUTO</value></
   > item><item><key xsi:type="soapenc:string">RG_PORT_SPEED_1</
   > key><value xsi:type="soapenc:string">RG_AUTO</value></
   > item><item><key xsi:type="soapenc:string">webNMS</key><value
   > xsi:type="soapenc:string">NULL</value></item><item><key
   > xsi:type="soapenc:string">RG_LOOP_DETECTION</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">statusPollEnabled</key><value
   > xsi:type="soapenc:string">false</value></item><item><key
   > xsi:type="soapenc:string">childrenKeys</key><value
   > xsi:type="soapenc:string"></value></item><item><key
   > xsi:type="soapenc:string">WL_RTS_THRESHOLD</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">RG_INCLUDE_SERVICE_VLANS</key><value
   > xsi:type="soapenc:string">True</value></item><item><key
   > xsi:type="soapenc:string">WL_FRAG_THRESHOLD</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">isGroup</key><value
   > xsi:type="soapenc:string">false</value></item><item><key
   > xsi:type="soapenc:string">pollInterval</key><value
   > xsi:type="soapenc:string">1800</value></item><item><key
   > xsi:type="soapenc:string">statusUpdateTime</key><value
   > xsi:type="soapenc:string">Fri Jul 02 19:47:03 EDT 2010</value></
   > item><item><key
   > xsi:type="soapenc:string">RG_DISABLE_ON_POWER_FAILURE_1</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">statusChangeTime</key><value
   > xsi:type="soapenc:string">Mon Jan 12 13:57:19 EST 2009</value></
   > item><item><key xsi:type="soapenc:string">RG_VIDEO_VLAN</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">WL_MAX_FRAME_BURST</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">WL_WPA2_PRE_AUTH</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_DAYLIGHT_SAVING</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">RG_MGMT_FRAME_TYPE</key><value
   > xsi:type="soapenc:string">Tagged</value></item><item><key
   > xsi:type="soapenc:string">profileType</key><value
   > xsi:type="soapenc:string">RG General</value></item><item><key
   > xsi:type="soapenc:string">WL_ENCRYPTION</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">RG_GEN_PROFILE_SCOPING</key><value
   > xsi:type="soapenc:string">None</value></item><item><key
   > xsi:type="soapenc:string">WL_TRANSMIT_RATE</key><value
   > xsi:type="soapenc:string">1M</value></item><item><key
   > xsi:type="soapenc:string">RG_ROUTE_MASK_1</key><value
   > xsi:type="soapenc:string">255.255.255.255</value></item><item><key
   > xsi:type="soapenc:string">WL_802_1_KEY_TRANSMISSION</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">profileName</key><value
   > xsi:type="soapenc:string">A_646MOD Bridged</value></item><item><key
   > xsi:type="soapenc:string">RG_SYSTEM_POWER_MGMT</key><value
   > xsi:type="soapenc:string">Enabled</value></item><item><key
   > xsi:type="soapenc:string">failureThreshold</key><value
   > xsi:type="soapenc:string">1</value></item><item><key
   > xsi:type="soapenc:string">isContainer</key><value
   > xsi:type="soapenc:string">false</value></item><item><key
   > xsi:type="soapenc:string">atiText</key><value
   > xsi:type="soapenc:string"></value></item><item><key
   > xsi:type="soapenc:string">RG_INET_VPI</key><value
   > xsi:type="soapenc:string">0</value></item><item><key
   > xsi:type="soapenc:string">WL_HIDE_SSID</key><value
   > xsi:type="soapenc:string">False</value></item><item><key
   > xsi:type="soapenc:string">RG_SPLIT_MANAGEMENT</key><value
   > xsi:type="soapenc:string">Disabled</value></item><item><key
   > xsi:type="soapenc:string">WL_INTRA_BSS_RELAY</key><value
   > xsi:type="soapenc:string">Enabled</value></item></multiRef></
   > soapenv:Body></soapenv:Envelope>
   > comm_blockread returned 6669
   >
   >
   > get_chunk_size(): entered
   > 0
   >
   > chunk size = 0
   > get_chunk_size returned 0
   > http_close(): entered
   >
   > --------------------------------------------------
   > Date: Thu, 18 Aug 2011 17:37:05 +0200
   > From: Thomas Raddatz <thomas.raddatz@xxxxxxxxxxx>
   > Subject: Re: Instructions needed for WSDL2RPG logging set-up
   > To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
   > Message-ID: <4E4D31A1.7030108@xxxxxxxxxxx>
   > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
   >
   > Michael,
   >
   > Did you already turn on the standard HTTP API logging? If you did
   > not yet do that, please turn on logging by calling procedure
   > *_setHttpDebug(status:
   > ifsPathName), eg:
   >
   >    DownloadAttachment_setHttpDebug(*ON: '/home/raddatz/logFile.log')
   >
   > Usually the log file tells you each and everything you need to solve
   > the problem.
   >
   > Thomas.
   > Am 18.08.2011 16:48, schrieb Koester, Michael:
   > > I used WSDL2RPG to generate stub and caller program to get details
   > from another platform on our network via a web service provided by
   > the software on that platform.  When I run my test call, I get a "1"
   > as the number of rows returned.  The returned row is blank.  Don't
   > know if I'm sending the values to the service properly or not.  I am
   > not getting an error, but I am not getting the same result as what
   > shows in the Northbound Interface software.
   > >
   > > I know that's not enough for you help me solve the problem, but I
   > need instructions to turn on the logging I've seen referenced in
   > this list.  Can the log file be created in a lib/file on the i, or
   > does it have to go to the IFS?
   > > Once I get that, I may have follow-up questions (with details you
   > can use).  Or I may be able to determine from the log file that my
   > request to the service is incorrect, and resolve that before
   > involving you further.
   > >
   > > Thanks much.
   > >
   > > Michael Koester
   > >
   >
   ----------------------------------------------------------------------
   -
   > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > [18]http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   ----------------------------------------------------------------------
   -
   >

   --
   IMPORTANT NOTICE:
   This email is confidential, may be legally privileged, and is for the
   intended recipient only. Access, disclosure, copying, distribution, or
   reliance on any of it by anyone else is prohibited and may be a
   criminal
   offence. Please delete if obtained in error and email confirmation to
   the sender.

References

   1. http://schemas.xmlsoap.org/soap/envelope/
   2. http://xml.apache.org/xml-soap
   3. http://schemas.xmlsoap.org/soap/encoding/
   4. http://www.w3.org/2001/XMLSchema
   5. http://www.w3.org/2001/XMLSchema-instance
   6. http://schemas.xmlsoap.org/soap/e+
   7. http://schemas.xmlsoap.org/soap/envelope/
   8. http://schemas.xmlsoap.org/soap/encoding/
   9. file://localhost/tmp/www.w3.org/2001/XMLSchema
  10. http://www.w3.org/2001/
  11. http://schemas.xmlsoap.org/soap/encoding/
  12. http://schemas.xmlsoap.org/soap/envelope/
  13. file://localhost/tmp/www.w3.org/2001/XMLSchema
  14. http://www.w3.org/2001/
  15. http://schemas.xmlsoap.org/soap/encoding/
  16. http://schemas.xmlsoap.org/soap/encoding/
  17. http://schemas.xmlsoap.org/soap/encoding/
  18. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------