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

Webservice - Inputparameter


I'm using the integrated Web Service of the IBM i to create a webservice: the WSDL-file is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://kis14tra.wsbeans.iseries/xsd";>

The part of the program, that gets started by the webservice and that should receive the input-parameter is:

     d kis14tra        PR                  ExtPgm('KIS14TRA')
     d  Resultat                  32765a
     d  xmlInput                  32765a   const

     d kis14tra        PI
     d  p0Resultat                32765a
     d  p0xmlInput                32765a     const

     d HEX15           c                   x'15'

     d msg             s             52a   varying
     d string          s          32760a   varying
     d stringWithOutHex15...
     d                 s          32760a   varying
     d stringWithOutHex15Utf8...
     d                 s          32760a   varying
     d pointer         s               *
     d buffLen         s             10u 0
     d buffer          s          32760a   based(pointer)
     d stringEnc       s          32760a
     d enclen          s             10i 0

     D from            ds                  likeds(QtqCode_T)
     D                                     inz(*LIKEDS)
     D to              ds                  likeds(QtqCode_T)
     D                                     inz(*LIKEDS)
     D table           ds                  likeds(iconv_t)

     D p_input         s               *
     D inleft          s             10U 0
     D p_output        s               *
     D outleft         s             10U 0
     D len             s             10U 0

     D errMsg          s             50A
     D input_data2     s          32760A   varying
     D output_data2    s          32760A   varying
     d cmd             s           1024a   varying
     d fehlerText      s           1000a   varying
     d firma           s              2a
     d extKdNrAlfa     s              6a
     d LTCode          s              1a
     d verkaufsStelle...
     d                 s              2a
     d werk            s              3a
     d AnzDetPos       s             10i 0
     d transportKosten...
     d                 s             15p 2


             *inlr = *on;

             cmd = 'call bshop/gisaliba';
             qcmdexc(cmd: %len(cmd));
             msg = 'Hier kommt die lib-list2';
             dsply msg;
             cmd = 'dsplibl output(*print)';
             qcmdexc(cmd: %len(cmd));

            msg = 'xmlInput01*' + %trim(p0XmlInput) + '*';
            dsply msg;

My test-program looks like:

H DFTACTGRP(*NO) actgrp(*new) bnddir('HTTPAPI')
     H copyright('(c) 2013 WEMAG Consulting AG, CH-3122 Kehrsatz')

     W*E CRTBNDRPG  kis143i  srcfile(*libl/qrpglesrc)
     W*E+       DBGVIEW(*SOURCE)
     W*E+       REPLACE(*YES)

      /copy HTTPAPI_H
     d kis143i         PR                  ExtPgm('KIS143I')
     d kis143i         PI

     d                 c                     const(2)
     d msg             s             52a   varying
     d SOAP            s           1024a     varying
     d rc              s             10i 0
     d len             s             10i 0


        SOAP=  '<soapenv:Envelope xmlns:soapenv='
             + '"http://schemas.xmlsoap.org/soap/envelope/";'
             + ' xmlns:xsd="http://kis14tra.wsbeans.iseries/xsd";>'
             + '   <soapenv:Header/>'
             + '   <soapenv:Body>'
             + '      <xsd:kis14tra>'
             + '         <xsd:args0>'
             + '            <xsd:p0XMLINPUT>' + 'inputXXMMLL4 '
             + ' </xsd:p0XMLINPUT>'
             + '         </xsd:args0>'
             + '      </xsd:kis14tra>'
             + '   </soapenv:Body>'
             + '</soapenv:Envelope>';

           len = %len(SOAP);
           msg = 'len *' + %char(len) + '*';
           dsply msg;

       //  http_setCCSIDs(1208 : 0);       **************
           http_debug(*ON: '/jgvtmp/kis14Debug.txt');

           rc = http_post('http://chwemag1:10010/web/services/KIS14TRA'
                            : %addr(SOAP) + VARYINGDATAOFFSET
                            : %len(SOAP)
                            : '/jgvtmp/kis14encUtf40.xml'
                            : HTTP_TIMEOUT
                            : HTTP_USERAGENT
                            : 'text/xml; charset=UTF-8'
                            : 'urn.kis14tra');

           if (rc <> 1);

           *inlr = *on;


My problem is, that the program, that is startet by the webservice, don't receive the input-parameter. The dsply results in "xmlInput01**" . The input parameter should be inputXXMMLL4, but is empty. I cannot find the reason for that. What am I doing wrong?

I'm on 6.1 and using HTTPAPI 1.24.

Best regards


This is the FTPAPI mailing list.  To unsubscribe, please go to: