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

RE: Help consume Web Service



Thanks Thomas, I appreciated your comments. I will let you know how it goes.

Alvaro Orlando Salazar Martinez  
-----Mensaje original-----
De: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] En nombre de Thomas Raddatz
Enviado el: Lunes, 27 de Julio de 2009 10:28 a.m.
Para: HTTPAPI and FTPAPI Projects
Asunto: Re: Help consume Web Service

Alvaro,

I had overseen a necessary change to WSDL2R92. I remember that I got beyond that point using the 
debugger but obviously forgot to change the code.

Please download the latest version (v1.7.2) of WSDL2RPG from my Freeware page and replace WSDL2R50 and 
WSDL2R92 with the ones attached here. Then run the installer and let me know if it works.

Thomas.

Thomas Raddatz schrieb:
> Alvaro,
> 
> Perhaps I have overseen something. I will add the necessary changes to the WSDL2RPG utility and send 
> the code to you. But please keep in mind that I do not intend to bring these changes into the standard 
> release of WSDL2RPG because I still believe that it is your WSDL file that needs to be changed.
> 
> Please give me a few days to do the necessary changes. First of all I have to see what is going on in 
> the office on Monday.
> 
> Thomas.
> 
> 
> Alvaro Orlando Salazar Martinez schrieb:
>>    Hi Thomas,
>>
>>
>>    I Made all the changes that you suggested to the WSDL2RPG program and
>>    it was run it displayed the following message:
>>
>>
>>          4>> WSDL2RPG
>>    URL('http://cooeps.coomeva.com.co/prod/afiliacion/php/modelo/admi
>>
>>              nistracion/WSServer.php?wsdl') SRCFILE(CG.AR/QRPGLESRC)
>>      SRCMBR(WSEPS1 *YES  ) PREFIX(*NO) DIM(256)
>>    STRLEN(256)
>>
>>              Miembro WSEPS1 archivo QRPGLESRC de CG.AR
>>    borrado.
>>
>>              Miembro WSEPS1 archivo QRPGLESRC de CG.AR
>>    cambiado.
>>
>>    F1        Unknown XML data type 'String'. Unable to get the
>>    corresponding       RPG data
>>
>>
>>    type.
>>
>>              Unknown XML data type 'String'. Unable to get the
>>    corresponding       RPG data
>>
>>                type.
>>
>>              Warning: Type 'tns:return' is not
>>    defined.
>>
>>              Warning: Type 'tns:return' is not
>>    defined.
>>
>>              Request canceled due to error. See job log or debug
>>    log.
>>
>>              Unknown XML data type 'String'. Unable to get the
>>    corresponding       RPG data
>>
>>          type.
>>
>>        Unknown XML data type 'String'. Unable to get the corresponding
>>    RPG data
>>
>>          type.
>>
>>        Warning: Type 'tns:return' is not
>>    defined.
>>
>>        Warning: Type 'tns:return' is not
>>    defined.
>>
>>        Request canceled due to error. See job log or debug
>>    log.
>>
>>
>>
>>    F1:
>>
>>
>>                            Información Adicional de
>>    Mensaje
>>
>>
>>
>>     ID de mensaje  . . . . :   USR5002       Gravedad . . . . . . . :
>>    00
>>
>>     Tipo de mensaje  . . . :   Diagnóstico
>>
>>     Fecha envío  . . . . . :   06/07/09      Hora envío . . . . . . :
>>    15:03:55
>>
>>
>>
>>     Mensaje . . . . :   Unknown XML data type 'String'. Unable to get
>>    the
>>
>>       corresponding RPG data
>>    type.
>>
>>
>>
>>     Information . . :   Please report the missing XML data type
>>    to
>>
>>       'thomas.raddatz§tools400.de' or follow the instructions provided
>>    in
>>
>>       'A_README' to add the missing data type by yourself. Please do not
>>    forget to
>>
>>       contribute your enhancements to the project.
>>
>>
>>
>>
>>
>>     F3=Salir   F6=Imprimir   F9=Visualizar detalles de mensajes
>>    F12=Cancelar
>>
>>     F21=Seleccionar nivel
>>    ayuda
>>
>>
>>
>>
>>    F9:
>>
>>
>>                             Visualizar Detalles de
>>    Mensaje
>>
>>
>>
>>     ID de mensaje  . . . . :   USR5002       Gravedad . . . . . . . :
>>    00
>>
>>     Fecha de envío . . . . :   06/07/09      Hora de envío  . . . . :
>>    15:03:55
>>
>>     Tipo de mensaje  . . . :
>>    Diagnóstico
>>
>>     Desde  . . . . . . . . :   DNXOUT01      CCSID  . . . . . . . . :
>>    65535
>>
>>
>>
>>     Programa origen  . . . . . . . :
>>    BASICS1
>>
>>       Biblioteca origen  . . . . . :     WSDL2RPG
>>
>>       Módulo origen  . . . . . . . :
>>    BASICS1R1
>>
>>       Procedimiento origen . . . . :
>>    BASICS1R1_f_sndPgmMsg
>>
>>       Sentencia origen . . . . . . :     54900
>>
>>
>>
>>     Programa destino . . . . . . . :
>>    QUOCMD
>>
>>       Biblioteca destino . . . . . :
>>    QSYS
>>
>>       Instrucción  . . . . . . . . :
>>    01EA
>>
>>
>>
>>     Hora de envío  . . . . . . . . :
>>    15:03:55,525760
>>
>>
>>
>>
>>        Final
>>
>>     Pulse Intro para
>>    continuar.
>>
>>
>>
>>     F1=Ayuda   F3=Salir
>>    F12=Cancelar
>>
>>
>>
>>
>>                            Información Adicional de
>>    Mensaje
>>
>>
>>
>>     ID de mensaje  . . . . :   USR0028       Gravedad . . . . . . . :
>>    00
>>
>>     Tipo de mensaje  . . . :
>>    Informativo
>>
>>     Fecha envío  . . . . . :   06/07/09      Hora envío . . . . . . :
>>    15:03:55
>>
>>
>>
>>     Mensaje . . . . :   Warning: Type 'tns:return' is not
>>    defined.
>>
>>
>>
>>     Information . . :   WSDL2RPG could not generate any code for type
>>    'tns:return'
>>
>>       because type 'tns:return' has not been defined. This message was
>>    send by
>>
>>       procedure:
>>    generateOperationStartCallback
>>
>>
>>
>>
>>    Pulse Intro para continuar.
>>
>>
>>
>>     F3=Salir   F6=Imprimir   F9=Visualizar detalles de mensajes
>>    F12=Cancelar
>>
>>     F21=Seleccionar nivel
>>    ayuda
>>
>>
>>
>>
>>                            Información Adicional de
>>    Mensaje
>>
>>
>>
>>     ID de mensaje  . . . . :   USR0028       Gravedad . . . . . . . :
>>    00
>>
>>     Tipo de mensaje  . . . :
>>    Informativo
>>
>>     Fecha envío  . . . . . :   06/07/09      Hora envío . . . . . . :
>>    15:03:55
>>
>>
>>
>>     Mensaje . . . . :   Warning: Type 'tns:return' is not
>>    defined.
>>
>>
>>
>>     Information . . :   WSDL2RPG could not generate any code for type
>>    'tns:return'
>>
>>       because type 'tns:return' has not been defined. This message was
>>    send by
>>
>>       procedure:
>>    generateOperationEndCallback
>>
>>
>>
>>
>>     Pulse Intro para continuar.
>>
>>
>>
>>     F3=Salir   F6=Imprimir   F9=Visualizar detalles de mensajes
>>    F12=Cancelar
>>
>>     F21=Seleccionar nivel ayuda
>>
>>
>>                            Información Adicional de Mensaje
>>
>>
>>
>>     ID de mensaje  . . . . :   USR5002       Gravedad . . . . . . . :
>>    00
>>
>>     Tipo de mensaje  . . . :
>>    Informativo
>>
>>     Fecha envío  . . . . . :   06/07/09      Hora envío . . . . . . :
>>    15:03:55
>>
>>
>>
>>     Mensaje . . . . :   Unknown XML data type 'String'. Unable to get
>>    the
>>
>>       corresponding RPG data
>>    type.
>>
>>
>>
>>     Information . . :   Please report the missing XML data type
>>    to
>>
>>       'thomas.raddatz§tools400.de' or follow the instructions provided
>>    in
>>
>>       'A_README' to add the missing data type by yourself. Please do not
>>    forget to
>>
>>       contribute your enhancements to the
>>    project.
>>
>>
>>
>>    Pulse Intro para
>>    continuar.
>>
>>
>>
>>     F3=Salir   F6=Imprimir   F9=Visualizar detalles de mensajes
>>    F12=Cancelar
>>
>>     F21=Seleccionar nivel ayuda
>>
>>
>>
>>
>>
>>    Thanks for your help.
>>
>>
>>    Best regards.
>>
>>
>>    Alvaro Orlando Salazar Martínez
>>
>>
>>
>>
>>
>>    -----Mensaje original-----
>>    De: thomas.raddatz@xxxxxx [mailto:thomas.raddatz@xxxxxx]
>>    Enviado el: Lunes, 29 de Junio de 2009 03:04 a.m.
>>    Para: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>>    CC: Alvaro Orlando Salazar Martinez
>>    Asunto: Antwort: RE: Help consume Web Service
>>
>>
>>
>>
>>    Alvaro,
>>
>>
>>    I received your WSDL file and verified it. The problem is that the
>>    WSDL
>>
>>    file uses "xsd:String" to define the message parts. As far as I
>>    understand
>>
>>    XML Schema that is wrong because there is no "String" type in XML
>>    Schema.
>>
>>    Instead you have to use "schema" (all letters in lower case!) to
>>    define a
>>
>>    message part of type "string".
>>
>>
>>    I do not understand why Altova XMLSpy does not complain about that
>>    problem.
>>
>>    However soapUI generates a request message for "validaEmpresaAtentos"
>>    but
>>
>>    without any elements;
>>
>>
>>    <soapenv:Envelope
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>
>>                      xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>
>>
>>    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
>>
>>                      xmlns:urn="urn:WSServer">
>>
>>       <soapenv:Header/>
>>
>>       <soapenv:Body>
>>
>>          <urn:validaEmpresaAtentos
>>
>>    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>
>>       </soapenv:Body>
>>
>>    </soapenv:Envelope>
>>
>>
>>    Also the Eclipse WSDL editor complains massively about "xsd:String".
>>    When I
>>
>>    change "xsd:String" to "xsd:string" soapUI generates the expected
>>    request
>>
>>    message:
>>
>>
>>    <soapenv:Envelope
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>
>>                      xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>
>>
>>    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
>>
>>                      xmlns:urn="urn:WSServer">
>>
>>       <soapenv:Header/>
>>
>>       <soapenv:Body>
>>
>>          <urn:validaEmpresaAtentos
>>
>>    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>>
>>             <tipoId xsi:type="xsd:string">?</tipoId>
>>
>>             <nroId xsi:type="xsd:string">?</nroId>
>>
>>          </urn:validaEmpresaAtentos>
>>
>>       </soapenv:Body>
>>
>>    </soapenv:Envelope>
>>
>>
>>    So what to do? Of course I could change WSDL2RPG to convert a given
>>    data
>>
>>    type to lower case before checking it against the list of supported
>>    XML
>>
>>    Schema types but actually I do not want to do that. Where did you get
>>    that
>>
>>    invalid (as far as I understand it) WSDL file from? Is it possible to
>>
>>    change the WSDL file to match the rules?
>>
>>
>>    If you cannot change the WSDL file, you may change
>>
>>    WSDL2R50.TypeDef_isPrimitive() as shown below:
>>
>>
>>        if (Namespaces_isSchemaNS(QName_getNSValue(i_type.qType)) or
>>
>>            Namespaces_isSOAPEncodingNS(QName_getNSValue(i_type.qType)));
>>
>>           lName = f_lcase(QName_getLName(i_type.qType));
>>
>>           if (lName = f_lcase('ENTITIES') or                 // XSD
>>    String
>>
>>    Data Types
>>
>>               lName = f_lcase('ENTITY') or
>>
>>               lName = f_lcase('ID') or
>>
>>               lName = f_lcase('IDREF') or
>>
>>               lName = f_lcase('IDREFS') or
>>
>>               lname = f_lcase('language') or
>>
>>               lname = f_lcase('Name') or
>>
>>               lname = f_lcase('NCName') or
>>
>>               lname = f_lcase('NMTOKEN') or
>>
>>               lname = f_lcase('NMTOKENS') or
>>
>>                ...
>>
>>
>>    Because of that TypeDef_isPrimitive() does not return TRUE for
>>    "xsd:String"
>>
>>    WSDL2RPG assumes that "xsd:String" is a user defined type and tries to
>>    get
>>
>>    it from the "types" section of the WSDL file which does not work. The
>>
>>    result is the "Pointer not set error ..." as reported by you.
>>
>>
>>    Thomas.
> 
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> 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
-----------------------------------------------------------------------