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

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.


ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 26.06.2009 16:06:50:

> Hi Thomas,
>
>
>
> I execute the WSDL2RPG(1_7_1 of 20090624) to WSDL and to choose the
> operation what I need to convert and I get the following error:
>
>
>
>
>
>                          Visualizar Todos los Mensajes

>
>
Sistema:DESARROL
>
>  Trabajo :   QPADEV005M    Usuario  :   DNXOUT01      Número . . .
:132403
>
>

>
>  4>>WSDL2RPG URL('http://miip:myPort.coomeva.com.
> co/prod/afiliacion/php/modelo/admi
>
>      nistracion/WSServer.php?wsdl') SRCFILE(CG.AR/QRPGLESRC)
> SRCMBR(WSEPS171) DIM(512) STRLEN(512)

>
>      Miembro WSEPS171 añadido a archivo QRPGLESRC en CG.AR.

>
>      Miembro WSEPS171 archivo QRPGLESRC de CG.AR cambiado.

>
>      El puntero no hace referencia a ninguna ubicación.

>
>      Error de función. MCH3601 no supervisado por WSDL2RPG en la
> sentencia
>
>        0000167200, instrucción X'0000'.

>
>      La llamada a main ha finalizado con error (C G D F).

>
>      La llamada a main ha finalizado con error (C G D F).

>
>

>
>
Final
>
>  Pulse Intro para continuar.

>
>

>
>  F3=Salir  F5=Renovar   F12=Cancelar   F17=Inicio   F18=Final

>
>
>
> F1 y F9
>
>
>
>                          Visualizar Detalles de Mensaje

>
>

>
>  ID de mensaje  . . . . :   MCH3601       Gravedad . . . . . . . :
> 40
>
>  Fecha de envío . . . . :   26/06/09      Hora de envío  . . . . :
> 08:20:54
>
>  Tipo de mensaje  . . . :   Escape

>
>  Desde  . . . . . . . . :   DNXOUT01      CCSID  . . . . . . . . :
> 65535
>
>

>
>  Programa origen  . . . . . . . :   WSDL2RPG

>
>    Biblioteca origen  . . . . . :     WSDL2RPG

>
>    Módulo origen  . . . . . . . :     WSDL2R50

>
>    Procedimiento origen . . . . :     WSDL2R50_TypeDef_isNull

>
>    Sentencia origen . . . . . . :     167200

>
>

>
>  Programa destino . . . . . . . :   WSDL2RPG

>
>    Biblioteca destino . . . . . :     WSDL2RPG

>
>    Módulo destino . . . . . . . :     WSDL2R50

>
>    Procedimiento destino  . . . :     WSDL2R50_TypeDef_isNull

>
>    Sentencia destino  . . . . . :     167200

>
>

>
>
Más...
>
>  Pulse Intro para continuar.

>
>

>
>  F1=Ayuda   F3=Salir   F12=Cancelar

>
>

>
>
>
>                         Información Adicional de Mensaje

>
>

>
>  ID de mensaje  . . . . :   CPF9999       Gravedad . . . . . . . :
> 40
>
>  Tipo de mensaje  . . . :   Escape

>
>  Fecha envío  . . . . . :   26/06/09      Hora envío . . . . . . :
> 08:20:54
>
>

>
>  Mensaje . . . . :   Error de función. MCH3601 no supervisado por
> WSDL2RPG en
>
>    la sentencia 0000167200, instrucción X'0000'.

>
>  Causa . . . . . :   Se ha enviado un mensaje de excepción de escape
> a un
>
>    programa que no ha supervisado dicho mensaje. El nombre completo
> del
>
>    programa al que se envió el mensaje no supervisado es WSDL2RPG
> WSDL2R50
>
>    WSDL2R50_TypeDef_isNull. En el momento en que se envió el
> mensaje, el
>
>    programa estaba parado en el número de sentencia de alto nivel
> 0000167200.
>
>    Si aparece más de un número de sentencia, el programa era un
> programa
>
>    enlazado. La optimización no permite que se determine un solo
> número de
>
>    sentencia. Si aparece *N como valor, significa que no estaba
> disponible el
>
>    valor real.

>
>  Recuperación  . :   Vea los mensajes anteriores para localizar la
> causa de
>
>
Más...
>
>  Pulse Intro para continuar.

>
>

>
>  F3=Salir   F6=Imprimir   F9=Visualizar detalles de mensajes
> F12=Cancelar
>
>  F21=Seleccionar nivel ayuda

>
>

>
>
>
>                          Visualizar Detalles de Mensaje

>
>

>
>  ID de mensaje  . . . . :   CPF9999       Gravedad . . . . . . . :
> 40
>
>  Fecha de envío . . . . :   26/06/09      Hora de envío  . . . . :
> 08:20:54
>
>  Tipo de mensaje  . . . :   Escape

>
>  Desde  . . . . . . . . :   DNXOUT01      CCSID  . . . . . . . . :
> 65535
>
>

>
>  Programa origen  . . . . . . . :   QMHUNMSG

>
>

>
>  Programa destino . . . . . . . :   WSDL2RPG

>
>    Biblioteca destino . . . . . :     WSDL2RPG

>
>    Módulo destino . . . . . . . :     WSDL2R01

>
>    Procedimiento destino  . . . :     WSDL2R01

>
>    Sentencia destino  . . . . . :     146800

>
>

>
>  Hora de envío  . . . . . . . . :   08:20:54,443736

>
>

>
>

>
>

>
>
Final
>
>  Pulse Intro para continuar.

>
>

>
>  F1=Ayuda   F3=Salir   F12=Cancelar

>
>

>
>
>
> F1 -- F9
>
>
>
>                         Información Adicional de Mensaje

>
>

>
>  ID de mensaje  . . . . :   RNQ0202       Gravedad . . . . . . . :
> 99
>
>  Tipo de mensaje  . . . :   Copia del emisor

>
>  Fecha envío  . . . . . :   26/06/09      Hora envío . . . . . . :
> 08:20:54
>
>

>
>  Mensaje . . . . :   La llamada a main ha finalizado con error (C G
> D F).
>
>  Causa . . . . . :   El procedimiento RPG WSDL2R01 en el programa

>
>    WSDL2RPG/WSDL2RPG en la sentencia 146800 ha llamado al programa o

>
>    procedimiento main, que ha finalizado con error. Si el nombre es
> *N, la
>
>    llamada era una llamada enlazada de un puntero de procedimiento.

>
>  Recuperación  . :   Busque más información sobre la causa del error
> y póngase
>
>    en contacto con la persona responsable del mantenimiento de
> programas.
>
>  Respuestas posibles al mensaje  . . . . . . . . . . . . . . :

>
>    D -- Obtener un vuelco RPG formateado.

>
>    S -- Obtener un vuelco del sistema.

>
>    G -- Continuar el proceso en *GETIN.

>
>    C -- Cancelar.

>
>
Más...
>
>  Pulse Intro para continuar.

>
>

>
>  F3=Salir   F6=Imprimir   F9=Visualizar detalles de mensajes
> F12=Cancelar
>
>  F21=Seleccionar nivel ayuda

>
>  Ya está en la parte superior del área.

>
>
>
>                          Visualizar Detalles de Mensaje

>
>

>
>  ID de mensaje  . . . . :   RNQ0202       Gravedad . . . . . . . :
> 99
>
>  Fecha de envío . . . . :   26/06/09      Hora de envío  . . . . :
> 08:20:54
>
>  Tipo de mensaje  . . . :   Copia del emisor

>
>  Desde  . . . . . . . . :   DNXOUT01      CCSID  . . . . . . . . :
> 65535
>
>

>
>  Programa origen  . . . . . . . :   QRNXIE

>
>    Biblioteca origen  . . . . . :     QSYS

>
>    Módulo origen  . . . . . . . :     QRNXMSG

>
>    Procedimiento origen . . . . :     InqMsg

>
>    Sentencia origen . . . . . . :     4

>
>

>
>  Programa destino . . . . . . . :   QRNXIE

>
>    Biblioteca destino . . . . . :     QSYS

>
>    Módulo destino . . . . . . . :     QRNXMSG

>
>    Procedimiento destino  . . . :     InqMsg

>
>    Sentencia destino  . . . . . :     4

>
>

>
>
Más...
>
>  Pulse Intro para continuar.

>
>

>
>  F1=Ayuda   F3=Salir   F12=Cancelar

>
>
>
>
>
> thank you what I can help.
>
>
>
>
>
> 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
>
> -----Mensaje original-----
> De: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] En nombre de Thomas Raddatz
> Enviado el: 2009-06-22 11:24
> Para: HTTPAPI and FTPAPI Projects
> Asunto: Re: Help consume Web Service
>
>
>
> You are welcome. Thanks to your patience another bug has been eliminated.
>
>
>
> Thomas.
>
>
>
> Alvaro Orlando Salazar Martinez schrieb:
>
> > Excellent Thomas, everything works Ok. Thousand and thousand
> thanks for your help.
>
> >
>
> > 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
>
> >
>
> > -----Mensaje original-----
>
> > De: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] En nombre de thomas.raddatz@xxxxxx
>
> > Enviado el: 2009-06-22 02:06
>
> > Para: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>
> > Asunto: [!! SPAM] Re: Help consume Web Service
>
> >
>
> >
>
> >
>
> > Alvaro,
>
> >
>
> > It seems as if we had located the '#' literal in WSDL2R94 as the root
of
>
> > the problem. Please replace source member WSDL2R94 with the one
attached to
>
> > this e-mail and compile it. Then recreate service program WSDL2RPGRT or
>
> > rerun the installer of WSDL2RPG (A_INSTALL).
>
> >
>
> > I changed the following lines and hope that it will work for you:
>
> >
>
> > Added:
>
> >
>
> >     *
>
> >     * ------------------------------------
>
> >     *  Constants
>
> >     * ------------------------------------
>
> >    D cNUMBER_SIGN    C                   const(u'0023')
>
> >
>
> > Changed (MultiRef_isReference):
>
> >
>
> >    hRef = XMLSAXParser_getAttributeValueByQName(i_attrs: cATTR_HREF);
>
> >    if (%len(hRef) > 1 and %ucs2(%subst(hRef: 1: 1)) = cNUMBER_SIGN);
>
> >       return cTrue;
>
> >    else;
>
> >       return cFalse;
>
> >    endif;
>
> >
>
> > Changed ():
>
> >
>
> >    hRef = XMLSAXParser_getAttributeValueByQName(i_attrs: cATTR_HREF);
>
> >    if (%len(hRef) > 1 and %ucs2(%subst(hRef: 1: 1)) = cNUMBER_SIGN);
>
> >       hRef = %subst(hRef: 2);
>
> >    endif;
>
> >
>
> >
>
> > 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
> -----------------------------------------------------------------------


--
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.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------