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

Help consume Web Service



Good evening, I am new to this and need help from WS, I've created using the  WSDL2RPG program and I need to create the program from RPG where I can consume this service, you can guide me please, thank you very much.

Saludos, 
 
Alvaro Orlando Salazar Martínez  
Ingeniero Sistemas de Información
Unidad de Tecnología Informática COOMEVA
Certificados ISO 9001 - Valorados CMMI Nivel 3
www.coomeva.com.co 
Teléfono: (57) 2- 333 0000 Ext. 1293
Dirección: Calle 13 No. 57 - 50 
Cali - Valle 
Colombia 

Unidad de Tecnología Informática Coomeva
**************************************************
Comprometidos con el mejoramiento de la productividad, con soluciones informáticas fiables, prácticas e innovadoras.

Favor piense en el medioambiente, antes de imprimir este mensaje

      /IF NOT DEFINED(PROTOTYPE_WSMP1_7NP )
À     *==========================================================================
À     *  WSDL2RPG V1.7
À     *==========================================================================
À     * >>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) +
À     *              BNDDIR(QC2LE) +
À     *              BNDSRVPGM(*LIBL/WSDL2RPGRT +
À     *                        *LIBL/BASICS1) +
À     *              TEXT('+
À     *              Web Service: consultarAfiliado()+
À     *              ') +
À     *              DETAIL(*BASIC);
À     * >>END-PRE-COMPILER<<
À     *==========================================================================
     H NOMAIN
     H BNDDIR('HTTPAPI')
      /ENDIF
À     *
À     * Operation: impl:consultarAfiliado
À     * Returns  : impl_consultarAfiliadoRpc
     D afiliadosSaludMP_consultarAfiliado...
     D                 PR                  likeds(impl_consultarAfiliadoRpc_t)
     D                                     extproc('afiliadosSaludMP_consultarA+
     D                                     filiado')
     D  i_impl_tipoDoc...
     D                                     like(impl_tipoDoc_t)
     D                                     const
     D  i_impl_id                          like(impl_id_t)
     D                                     const
     D  o_msg                       128A   varying
À     *
À     *   Array dimensions:
À     *
À     *   Types:
      *
     D impl_consultarAfiliadoReturnMvd_t...
     D                 DS                  based(pDummy)
     D                                     qualified
     D  ciudadCorrespondencia...
     D                               20I 0
     D  ciudadResidencia...
     D                               20I 0
     D  codRetorno                   20I 0
     D  correoElectronico...
     D                              128A   varying
     D  descRetorno                 128A   varying
     D  dirCorrespondencia1...
     D                              128A   varying
     D  dirCorrespondencia2...
     D                              128A   varying
     D  dirResidencia1...
     D                              128A   varying
     D  dirResidencia2...
     D                              128A   varying
     D  nombreCompleto...
     D                              128A   varying
     D  numDocumento                 20I 0
     D  primerApellido...
     D                              128A   varying
     D  primerNombre                128A   varying
     D  segundoApellido...
     D                              128A   varying
     D  segundoNombre               128A   varying
     D  telfCorrespondencia...
     D                              128A   varying
     D  telfResidencia...
     D                              128A   varying
     D  tipoDocumento               128A   varying
      *
      *
     D impl_consultarAfiliadoRpc_t...
     D                 DS                  based(pDummy)
     D                                     qualified
     D  consultarAfiliadoReturn...
     D                                     likeds(impl_consultarAfiliadoRetur...
     D                                     nMvd_t)
      *
     D impl_id_t       S            128A   varying
     D                                     based(pDummy)
     D impl_tipoDoc_t  S            128A   varying
     D                                     based(pDummy)
À     *
À     *   Web service: Enables/disables the debug log of HTTP API
     D afiliadosSaludMP_setHttpDebug...
     D                 PR
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     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 afiliadosSaludMP_setProxy...
     D                 PR
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _setProxy+
     D                                     ')
     D  i_server                    256A   const
     D  i_port                       10I 0 const
À     *
À     *   Web service: Returns the endpoint of the Web service
     D afiliadosSaludMP_getEndpoint...
     D                 PR         32767A          varying
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _getEndpoint+
     D                                     ')
À     *
À     *   Web service: Sets the endpoint of the Web service
     D afiliadosSaludMP_setEndpoint...
     D                 PR
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _setEndpoint+
     D                                     ')
     D  i_url                     32767A   const varying  options(*varsize)
À     *
À     *   Web service: Returns the host name of the Web Service endpoint
     D afiliadosSaludMP_getHost...
     D                 PR         32767A          varying
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _getHost+
     D                                     ')
À     *
À     *   Web service: Sets the host name of the Web service endpoint
     D afiliadosSaludMP_setHost...
     D                 PR
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _setHost+
     D                                     ')
     D  i_url                     32767A   const varying  options(*varsize)
À     *
À     *   Web service: Returns the port of the Web Service endpoint
     D afiliadosSaludMP_getPort...
     D                 PR            10I 0
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _getPort+
     D                                     ')
À     *
À     *   Web service: Sets the port of the Web service endpoint
     D afiliadosSaludMP_setPort...
     D                 PR
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     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 afiliadosSaludMP_registerLoginCallback...
     D                 PR
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _registerLoginCallback+
     D                                     ')
     D  i_pLoginProc                   *   value  procptr
À     *
À     *   Http: Returns the last HTTP error (code) that occurred.
     D afiliadosSaludMP_HttpError_getCode...
     D                 PR                  like(wsdl_http_ErrorNo_t  )
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _HttpError_getCode+
     D                                     ')
À     *
À     *   Http: Returns the last HTTP error (text) that occurred.
     D afiliadosSaludMP_HttpError_getText...
     D                 PR                  like(wsdl_http_ErrorText_t)
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _HttpError_getText+
     D                                     ')
À     *
À     *   Soap: Returns the last SOAP error (code) that occurred.
     D afiliadosSaludMP_SoapError_getCode...
     D                 PR                  like(wsdl_soap_faultcode_t  )
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _SoapError_getCode+
     D                                     ')
À     *
À     *   Soap: Returns the last SOAP error (text) that occurred.
     D afiliadosSaludMP_SoapError_getText...
     D                 PR                  like(wsdl_soap_faultstring_t)
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     D                                     _SoapError_getText+
     D                                     ')
À     *
À     *   Enables/disables a workaround for Web services that are driven
À     *   by Axis and that are affected by the AXIS-2095 bug.
     D afiliadosSaludMP_enableAxis2095...
     D                 PR
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     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 afiliadosSaludMP_supplyLoginData...
     D                 PR            10I 0
     D                                     extproc('+
     D                                     afiliadosSaludMP+
     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
À     *
      /IF NOT DEFINED(WSDL2RPG_WS_STUB_COMMON_TYPES)
      /DEFINE WSDL2RPG_WS_STUB_COMMON_TYPES
À     *
À     *   SOAP types:
     D wsdl_http_ErrorNo_t...
     D                 S             10I 0                         based(pDummy)
À     *
     D wsdl_http_ErrorText_t...
     D                 S            128A   varying                 based(pDummy)
À     *
     D wsdl_soap_faultCode_t...
     D                 S            256A   varying                 based(pDummy)
À     *
     D wsdl_soap_faultstring_t...
     D                 S            256A   varying                 based(pDummy)
À     *
À     *   Constants:
     D WSDL_HTTP_SUCCESS...
     D                 C                   1
     D WSDL_HTTP_ERROR_UNEXPECTED...
     D                 C                   -1
À     *
     D WSDL_SUCCESS...
     D                 C                   1
     D WSDL_ERROR...
     D                 C                   0
À     *
     D WSDL_AUTH_TYPE_HTTP...
     D                 C                   '*HTTP'
     D WSDL_AUTH_TYPE_PROXY...
     D                 C                   '*PROXY'
À     *
      /ENDIF
À     *
      /IF DEFINED(PROTOTYPE_WSMP1_7NP )
      /EOF
      /ENDIF
À     * ---------------------------------------------------------------------
À     *
À     *   HTTP header:
     D cHTTP_HEADER_CONTENT_TYPE...
     D                 C                   'Content-Type'
     D cHTTP_HEADER_SOAP_ACTION...
     D                 C                   'SOAPAction'
À     *
     D headers_t...
     D                 DS                  qualified               based(pDummy)
     D  contentType                        like(wsdl_contentType_t)
     D  soapAction                         like(wsdl_soapAction_t )
À     *
À     *   SOAP types:
     D wsdl_soap_Fault_t...
     D                 DS                  qualified               based(pDummy)
     D  httpError                          likeds(wsdl_httpError_t  )
     D  faultcode                          like(wsdl_soap_faultcode_t    )
     D  faultstring                        like(wsdl_soap_faultstring_t  )
     D  detail                             likeds(wsdl_soap_FaultDetail_t)
À     *
     D wsdl_soap_FaultDetail_t...
     D                 DS                  qualified               based(pDummy)
     D  hostname                    256A   varying
À     *
     D wsdl_httpError_t...
     D                 DS                  qualified               based(pDummy)
     D  no                                 like(wsdl_http_ErrorNo_t   )
     D  text                               like(wsdl_http_ErrorText_t )
À     *
CPY  /COPY QBASICS1,PBASICS1                    Ä Tools/400 Runtime Library
CPY  /COPY QRPGLESRC,EXPAT_H                    Ä RPG defs for calling eXpat
CPY  /COPY QRPGLESRC,HTTPAPI_H                  Ä HTTP-API Service Program
CPY  /COPY QWSDL2RPG,PWSDL2R94                  Ä WSDL2RPG: MultiRef
CPY  /COPY QWSDL2RPG,PWSDL2R98                  Ä WSDL2RPG: UnMarshaller/Marshaller
CPY  /COPY QWSDL2RPG,PWSDL2R42                  Ä WSDL2RPG: User name and password
À     *
À     * ------------------------------------
À     *  Internal prototypes
À     * ------------------------------------
À     *
À     *   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_consultarAfiliadoRpcStart...
     D                 PR
     D                                     extproc('impl_consultarAfiliadoRpcSt+
     D                                     art')
     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_consultarAfiliadoRpcEnd...
     D                 PR
     D                                     extproc('impl_consultarAfiliadoRpcEn+
     D                                     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 impl_consultarAfiliadoReturnStart...
     D                 PR
     D                                     extproc('impl_consultarAfiliadoRetur+
     D                                     nStart')
     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_consultarAfiliadoReturnEnd...
     D                 PR
     D                                     extproc('impl_consultarAfiliadoRetur+
     D                                     nEnd')
     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: 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_NULLStart...
     D                 PR                  extproc('+
     D                                     SOAPMessage_NULL+
     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_NULLEnd...
     D                 PR                  extproc('+
     D                                     SOAPMessage_NULLEnd+
     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)
À     *
À     * ------------------------------------
À     *  Global fields & constants
À     * ------------------------------------
À     *
À     *   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
À     *
À     *   Web service endpoint
     D g_url           S          32767A   varying inz(cURL)
À     *
À     *   Switch for AXIS bug AXIS-2095
     D g_isAXIS_2095   S               N   inz(cFalse)
À     *
À     *   SOAP error information
     D g_soapFault     DS                  likeds(wsdl_soap_Fault_t) inz
À     *
À     *   User callback to supply login information
À     *   Returns WSDL_SUCCESS if successful, WSDL_ERROR upon error.
     D g_getLoginData  S               *   procptr inz
À     *
´   R *getLoginData...
´   R *                PR            10I 0
´   R *                                    extproc(g_getLoginData)
´   R * i_authType                   14A          const  varying
´   R * i_realm                     126A          const  varying
´   R * i_numAttempts                10I 0        const
´   R * o_user                       50A                 varying
´   R * o_password                   50A                 varying
À     *
À     *   Web service endpoint as specified in the WSDL file.
     D cURL            C                   'http://192.1.2.9:8080/WsSaludMP/ser+
     D                                     vices/afiliadosSaludMP'
À     *
À     * =====================================================================
À     * Operation: impl:consultarAfiliado
À     * Returns  : impl_consultarAfiliadoRpc
À     * =====================================================================
     P afiliadosSaludMP_consultarAfiliado...
     P                 B                   export
     D afiliadosSaludMP_consultarAfiliado...
     D                 PI                  likeds(impl_consultarAfiliadoRpc_t)
     D  i_impl_tipoDoc...
     D                                     like(impl_tipoDoc_t)
     D                                     const
     D  i_impl_id                          like(impl_id_t)
     D                                     const
     D  o_msg                       128A   varying
À     *
À     *  Return value
     D rtnValue        DS                  likeds(impl_consultarAfiliadoRpc_t)
     D                                     inz
À     *
À     *  Local fields
     D isUnexpectedError...
     D                 S               N   inz(cFalse)
     D request         S          32767A   varying 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
À     *
À     *  Login helper fields
     D rc2             S             10I 0 inz
     D err             S             10I 0 inz
     D lastErr         S             10I 0 inz
     D authType        S             14A   inz varying
     D basic           S               N   inz
     D digest          S               N   inz
     D realm           S            124A   inz
     D numAttempts     S             10I 0 inz
     D userid          S             50A   inz varying
     D password        S             50A   inz varying
À     *
À     *  Array iterator fields
À     *
     D userData        DS                  likeds(impl_consultarAfiliadoRpc_t)
     D                                     inz
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         o_msg = '';

         //ÀInitialize map to manage <multiRef> elements
         MultiRef_new();

         //À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(1208: HTTP_EBCDIC);   //À1208 is the CCSID of UTF-8

         request =
            '<?xml version="1.0" encoding="UTF-8"?>'                     +
            '<soapenv:Envelope'                                          +
            ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";' +
            ' xmlns:impl="http://192.1.2.9:8080/WsSaludMP/services/afilia+
            dosSaludMP"' +
            ' xmlns:xsd="http://www.w3.org/2001/XMLSchema";' +
            ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";' +
            '>'                                                          +
            '<soapenv:Body>'                                             +
            '<consultarAfiliado' +
               ' soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/e+
               ncoding/"' +
            '>' +
            '<tipoDoc' +
               ' xsi:type="xsd:string"' +
            '>' +
         Marshaller_toString(
            i_impl_tipoDoc) +
            '</tipoDoc>' +
            '<id' +
               ' xsi:type="xsd:string"' +
            '>' +
         Marshaller_toString(
            i_impl_id) +
            '</id>' +
            '</consultarAfiliado>' +
            '</soapenv:Body>'                                            +
            '</soapenv:Envelope>';

         //ÀClear SOAP error code
         clear g_soapFault;

         //ÀeXpat: Enables namespaces
         http_xmlns(*ON);

         //ÀHTTPAPI: Enables additional headers
         http_xproc(HTTP_POINT_ADDL_HEADER
                    : %paddr('HTTP_setContentTypeAndSOAPAction')
                    : %addr(headers));

         headers.contentType = 'text/xml';
         headers.soapAction  = ' ';

         //ÀeXpat: Post request and parse response
         monitor;
 B01        dou (err <> HTTP_NDAUTH and err <> HTTP_PXNDAUTH);
 B02           if (err <> lastErr);
                  numAttempts = 1;
                  lastErr = err;
 E02           endif;
               rc = http_post_xml(g_url
                                  : %addr(request) + 2
                                  : %len(%trimR(request))
                                  : %paddr('SOAPMessage_Envelope')
                                  : *NULL
                                  : %addr(userData)
                                  : HTTP_TIMEOUT
                                  : HTTP_USERAGENT
                                  : '');

               //À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_getLoginData = *NULL);
                        leave;
 E04                 endif;

                     numAttempts = numAttempts + 1;

 B04                 if (err = HTTP_NDAUTH);
                        http_getauth(basic: digest: realm);
                        authType = WSDL_AUTH_TYPE_HTTP;
 X04                 else;
                        http_proxy_getauth(basic: realm);
                        authType = WSDL_AUTH_TYPE_PROXY;
 E04                 endif;

                     rc2 = getLoginData(authType: realm
                                        : numAttempts: userid: password);
 B04                 if (rc2 <> 1);
                        userid = '';
                        password = '';
                        leave;
 E04                 endif;

 B04                 if (err = HTTP_NDAUTH);
 B05                    if (digest);
                           http_setAuth(HTTP_AUTH_MD5_DIGEST
                                        : userid: password);
 X05                    else;
                           http_setAuth(HTTP_AUTH_BASIC
                                        : userid: password);
 E05                    endif;
 X04                 else;
 B05                    if (digest);
                           http_proxy_setAuth(HTTP_AUTH_MD5_DIGEST
                                              : userid: password);
 X05                    else;
                           http_proxy_setAuth(HTTP_AUTH_BASIC
                                              : userid: password);
 E05                    endif;
 E04                 endif;

                     userid = '';
                     password = '';
 E03              endif;
 X02           else;
                  err = 0;
 E02           endif;
 E01        enddo;
         on-error;
            userid = '';
            password = '';
            isUnexpectedError = cTrue;
            rcvm0200 = f_rcvPgmMsg(cMsg_Any: *: cMsg_Act_Same: 0
                                   : cMsg_Same: cMsg_ToMyself);
            msg = f_cvtRcvMsgToMsg(rcvm0200);
            g_soapFault.httpError.no   = WSDL_HTTP_ERROR_UNEXPECTED;
            g_soapFault.httpError.text = f_rtvMsgText(msg);
            rc    = g_soapFault.httpError.no;
            o_msg = g_soapFault.httpError.text;
         endmon;

 B01     if (not isUnexpectedError);
            g_soapFault.httpError.no = rc;
 B02        if (g_soapFault.httpError.no <> 1);
               g_soapFault.httpError.text = http_error();
 B03           if (g_soapFault.httpError.text <> '');
                  o_msg = g_soapFault.httpError.text;
 X03           else;
                  o_msg = afiliadosSaludMP_SoapError_getText();
 E03           endif;
               clear rtnValue;
 X02        else;
               o_msg = '';
               rtnValue = userData;
 E02        endif;
 E02     endif;

 B02     if (not MultiRef_isNull());
            MultiRef_delete();
 E02     endif;

         return rtnValue;

      /end-free
À     *
     P afiliadosSaludMP_consultarAfiliado...
     P                 E
À     *
      *
      * ==================================================================
      * Return value: impl:consultarAfiliadoRpc
      * ==================================================================
     P impl_consultarAfiliadoRpcStart...
     P                 B
     D impl_consultarAfiliadoRpcStart...
     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 impl_consultarAfiliadoRpc...
     D                 DS                  likeds(impl_consultarAfiliadoRpc_t)
     D                                     based(userdata)
      * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         if (depth = 1 and
              name = 'consultarAfiliadoRpc'
              );
            if (MultiRef_isReference(attrs));
               MultiRef_put(
                  attrs
                  : http_parser_get_userdata()
                  : depth
                  : namespace
                  : name
                  : path
                  : http_parser_get_start_cb()
                  : http_parser_get_end_cb());
               return;
            endif;
         endif;

         select;
         when (depth = 2
                and
                name = 'consultarAfiliadoReturn'
                and
                namespace = '');
            http_parser_switch_cb(
               %addr(impl_consultarAfiliadoRpc.consultarAfiliadoReturn)
               : %paddr('impl_consultarAfiliadoReturnStart')
               : %paddr('impl_consultarAfiliadoReturnEnd'));
            return;

         endsl;

         return;

      /end-free
      *
     P impl_consultarAfiliadoRpcStart...
     P                 E
      *
      * ==================================================================
      * Return value: impl:consultarAfiliadoRpc
      * ==================================================================
     P impl_consultarAfiliadoRpcEnd...
     P                 B
     D impl_consultarAfiliadoRpcEnd...
     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 impl_consultarAfiliadoRpc...
     D                 DS                  likeds(impl_consultarAfiliadoRpc_t)
     D                                     based(userdata)
      * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free


         select;
         endsl;

         return;

      /end-free
      *
     P impl_consultarAfiliadoRpcEnd...
     P                 E
      *
      * ==================================================================
      * Return value: impl:consultarAfiliadoReturn
      * ==================================================================
     P impl_consultarAfiliadoReturnStart...
     P                 B
     D impl_consultarAfiliadoReturnStart...
     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 impl_consultarAfiliadoReturn...
     D                 DS                  likeds(impl_consultarAfiliadoRetur...
     D                                     nMvd_t)
     D                                     based(userdata)
      * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         if (depth = 1 and
              name = 'consultarAfiliadoReturn'
              );
            if (MultiRef_isReference(attrs));
               MultiRef_put(
                  attrs
                  : http_parser_get_userdata()
                  : depth
                  : namespace
                  : name
                  : path
                  : http_parser_get_start_cb()
                  : http_parser_get_end_cb());
               return;
            endif;
         endif;

         select;
         when (depth = 2
                and
                name = 'ciudadCorrespondencia');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'ciudadResidencia');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'codRetorno');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'correoElectronico');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'descRetorno');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'dirCorrespondencia1');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'dirCorrespondencia2');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'dirResidencia1');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'dirResidencia2');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'nombreCompleto');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'numDocumento');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'primerApellido');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'primerNombre');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'segundoApellido');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'segundoNombre');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'telfCorrespondencia');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'telfResidencia');
            // Processed in corresponding END procedure
            return;

         when (depth = 2
                and
                name = 'tipoDocumento');
            // Processed in corresponding END procedure
            return;

         endsl;

         return;

      /end-free
      *
     P impl_consultarAfiliadoReturnStart...
     P                 E
      *
      * ==================================================================
      * Return value: impl:consultarAfiliadoReturn
      * ==================================================================
     P impl_consultarAfiliadoReturnEnd...
     P                 B
     D impl_consultarAfiliadoReturnEnd...
     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 impl_consultarAfiliadoReturn...
     D                 DS                  likeds(impl_consultarAfiliadoRetur...
     D                                     nMvd_t)
     D                                     based(userdata)
      * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free


         select;
         when (name = 'ciudadCorrespondencia');
            impl_consultarAfiliadoReturn.ciudadCorrespondencia =
               UnMarshaller_toLong(value);

         when (name = 'ciudadResidencia');
            impl_consultarAfiliadoReturn.ciudadResidencia =
               UnMarshaller_toLong(value);

         when (name = 'codRetorno');
            impl_consultarAfiliadoReturn.codRetorno =
               UnMarshaller_toLong(value);

         when (name = 'correoElectronico');
            impl_consultarAfiliadoReturn.correoElectronico =
               UnMarshaller_toString(value);

         when (name = 'descRetorno');
            impl_consultarAfiliadoReturn.descRetorno =
               UnMarshaller_toString(value);

         when (name = 'dirCorrespondencia1');
            impl_consultarAfiliadoReturn.dirCorrespondencia1 =
               UnMarshaller_toString(value);

         when (name = 'dirCorrespondencia2');
            impl_consultarAfiliadoReturn.dirCorrespondencia2 =
               UnMarshaller_toString(value);

         when (name = 'dirResidencia1');
            impl_consultarAfiliadoReturn.dirResidencia1 =
               UnMarshaller_toString(value);

         when (name = 'dirResidencia2');
            impl_consultarAfiliadoReturn.dirResidencia2 =
               UnMarshaller_toString(value);

         when (name = 'nombreCompleto');
            impl_consultarAfiliadoReturn.nombreCompleto =
               UnMarshaller_toString(value);

         when (name = 'numDocumento');
            impl_consultarAfiliadoReturn.numDocumento =
               UnMarshaller_toLong(value);

         when (name = 'primerApellido');
            impl_consultarAfiliadoReturn.primerApellido =
               UnMarshaller_toString(value);

         when (name = 'primerNombre');
            impl_consultarAfiliadoReturn.primerNombre =
               UnMarshaller_toString(value);

         when (name = 'segundoApellido');
            impl_consultarAfiliadoReturn.segundoApellido =
               UnMarshaller_toString(value);

         when (name = 'segundoNombre');
            impl_consultarAfiliadoReturn.segundoNombre =
               UnMarshaller_toString(value);

         when (name = 'telfCorrespondencia');
            impl_consultarAfiliadoReturn.telfCorrespondencia =
               UnMarshaller_toString(value);

         when (name = 'telfResidencia');
            impl_consultarAfiliadoReturn.telfResidencia =
               UnMarshaller_toString(value);

         when (name = 'tipoDocumento');
            impl_consultarAfiliadoReturn.tipoDocumento =
               UnMarshaller_toString(value);

         endsl;

         return;

      /end-free
      *
     P impl_consultarAfiliadoReturnEnd...
     P                 E
À     *
À     * =====================================================================
À     *   Sets the content type and the SOAP action of the POST message.
À     * =====================================================================
Î    P HTTP_setContentTypeAndSOAPAction...
´ERR 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
À     *
À     * =====================================================================
À     *   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 (path <> '/Envelope/Body');
            return;
         endif;

         select;
         when (name = 'Fault');
            http_parser_switch_cb(
               %addr(g_soapFault)
               : %paddr('SOAPMessage_FaultStart')
               : %paddr('SOAPMessage_FaultEnd'));
           return;

         when (name = 'multiRef' and MultiRef_isData(attrs));
            http_parser_switch_cb(
               *NULL
               : MultiRef_getStartCallback()
               : MultiRef_getEndCallback());
            return;

         other;
            http_parser_switch_cb(
               userdata
               : %paddr('impl_consultarAfiliadoRpcStart')
               : %paddr('impl_consultarAfiliadoRpcEnd'));
           return;
         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_soap_Fault_t)
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         select;
         when (name = 'detail');
           http_parser_switch_cb(%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_soap_Fault_t)
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         select;
         when (name = 'faultcode');
            Fault.faultcode = value;
         when (name = 'faultstring');
            Fault.faultstring = 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

         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

         select;
         when (name = 'hostname');
            detail.hostname = value;
         endsl;

      /end-free
À     *
Î    P SOAPMessage_FaultDetailEnd...
Î    P                 E
À     *
À     * =====================================================================
À     *   SOAP message: NULL callback procedure
À     * =====================================================================
Î    P SOAPMessage_NULLStart...
´    P                 B
À     *
     D SOAPMessage_NULLStart...
     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

         p_assert(cFalse: 'Did never expect to get here');

         return;

      /end-free
À     *
Î    P SOAPMessage_NULLStart...
Î    P                 E
À     *
À     * =====================================================================
À     *   SOAP message: NULL callback procedure
À     * =====================================================================
Î    P SOAPMessage_NULLEnd...
´    P                 B
À     *
     D SOAPMessage_NULLEnd...
     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

         p_assert(cFalse: 'Did never expect to get here');

         return;

      /end-free
À     *
Î    P SOAPMessage_NULLEnd...
Î    P                 E
À     *
À     * =====================================================================
À     *   Registers an user callback procedure, that is called whenever
À     *   a web service requires user authentification.
À     * =====================================================================
Î    P afiliadosSaludMP_registerLoginCallback...
´    P                 B                   export
À     *
     D afiliadosSaludMP_registerLoginCallback...
     D                 PI
  D  D  i_pLoginProc                   *   value  procptr
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         g_getLoginData = i_pLoginProc;

         return;

      /end-free
À     *
Î    P afiliadosSaludMP_registerLoginCallback...
Î    P                 E
À     *
À     * =====================================================================
À     *   Http: Returns the last HTTP error (code) that occurred.
À     * =====================================================================
Î    P afiliadosSaludMP_HttpError_getCode...
´    P                 B                   export
À     *
     D afiliadosSaludMP_HttpError_getCode...
     D                 PI                  like(wsdl_http_ErrorNo_t  )
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         return g_soapFault.httpError.no;

      /end-free
À     *
Î    P afiliadosSaludMP_HttpError_getCode...
Î    P                 E
À     *
À     * =====================================================================
À     *   Http: Returns the last HTTP error (text) that occurred.
À     * =====================================================================
Î    P afiliadosSaludMP_HttpError_getText...
´    P                 B                   export
À     *
     D afiliadosSaludMP_HttpError_getText...
     D                 PI                  like(wsdl_http_ErrorText_t)
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         return g_soapFault.httpError.text;

      /end-free
À     *
Î    P afiliadosSaludMP_HttpError_getText...
Î    P                 E
À     *
À     * =====================================================================
À     *   Soap: Returns the last SOAP error (code) that occurred.
À     * =====================================================================
Î    P afiliadosSaludMP_SoapError_getCode...
´    P                 B                   export
À     *
     D afiliadosSaludMP_SoapError_getCode...
     D                 PI                  like(wsdl_soap_faultcode_t  )
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         return g_soapFault.faultcode;

      /end-free
À     *
Î    P afiliadosSaludMP_SoapError_getCode...
Î    P                 E
À     *
À     * =====================================================================
À     *   Soap: Returns the last SOAP error (text) that occurred.
À     * =====================================================================
Î    P afiliadosSaludMP_SoapError_getText...
´    P                 B                   export
À     *
     D afiliadosSaludMP_SoapError_getText...
     D                 PI                  like(wsdl_soap_faultstring_t)
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         return g_soapFault.faultstring;

      /end-free
À     *
Î    P afiliadosSaludMP_SoapError_getText...
Î    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 afiliadosSaludMP_enableAxis2095...
´    P                 B
À     *
     D afiliadosSaludMP_enableAxis2095...
     D                 PI
     D  i_isEnabled                    N   const
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         g_isAXIS_2095 = i_isEnabled;

         return;

      /end-free
À     *
Î    P afiliadosSaludMP_enableAxis2095...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Enables/disables the debug log of HTTP API
À     * =====================================================================
Î    P afiliadosSaludMP_setHttpDebug...
´    P                 B                   export
À     *
     D afiliadosSaludMP_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 = '';
         endif;

         return;

      /end-free
À     *
Î    P afiliadosSaludMP_setHttpDebug...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Sets the proxy server to use for the connection
À     * =====================================================================
Î    P afiliadosSaludMP_setProxy...
´    P                 B                   export
À     *
     D afiliadosSaludMP_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 afiliadosSaludMP_setProxy...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Returns the endpoint of the Web service
À     * =====================================================================
Î    P afiliadosSaludMP_getEndpoint...
´    P                 B                   export
À     *
     D afiliadosSaludMP_getEndpoint...
     D                 PI         32767A          varying
À     * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      /free

         return g_url;

      /end-free
À     *
Î    P afiliadosSaludMP_getEndpoint...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Sets the endpoint of the Web service
À     * =====================================================================
Î    P afiliadosSaludMP_setEndpoint...
´    P                 B                   export
À     *
     D afiliadosSaludMP_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 afiliadosSaludMP_setEndpoint...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Returns the host name of the Web Service endpoint
À     * =====================================================================
Î    P afiliadosSaludMP_getHost...
´    P                 B                   export
À     *
     D afiliadosSaludMP_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 afiliadosSaludMP_getHost...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Sets the host name of the Web service endpoint
À     * =====================================================================
Î    P afiliadosSaludMP_setHost...
´    P                 B                   export
À     *
     D afiliadosSaludMP_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 afiliadosSaludMP_setHost...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Returns the port of the Web Service endpoint
À     * =====================================================================
Î    P afiliadosSaludMP_getPort...
´    P                 B                   export
À     *
     D afiliadosSaludMP_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 afiliadosSaludMP_getPort...
Î    P                 E
À     *
À     * =====================================================================
À     *   Web service: Sets the port of the Web service endpoint
À     * =====================================================================
Î    P afiliadosSaludMP_setPort...
´    P                 B                   export
À     *
     D afiliadosSaludMP_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 afiliadosSaludMP_setPort...
Î    P                 E
À     *

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------