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

RE: http_debug_file and http_XmlStripCRLF not working?



   Sorry guy's.


   Question 1 is resolved.


   I used: http_debug(*ON);


   Correct statement = http_debug(*ON:http_debug_file);



   grtz


   Patrick Goovaerts

   Systems & Development



   From: Patrick Goovaerts [mailto:patrick@xxxxxxxxxxxxx]
   Sent: donderdag 13 december 2012 16:36
   To: 'ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
   Subject: http_debug_file and http_XmlStripCRLF not working?


   Hi,


   I'll try to remap the debugfile to an existing folder on the IFS so I
   include the following statement in my code

          http_debug_file = '/home/PGO/debugpat.txt';

   The debugfile is generated in it's default place with it's default
   name.



   Furthermore, I want to include `CRLF' in my XML-resultfile after
   executing a webservice, so I include the following statement

          http_XmlStripCRLF(*OFF);

   The resultfile is created in correct (and same) folder but has no
   CRLF's included.



   neither of above command seems to be working.




   any ideas?




   Code:


         *  This is an example of calling a SOAP Web service w/HTTPAPI.

         *

         *  To Compile (requires V5R1):

         *     CRTBNDRPG PGM(CODASOAPFL) SRCFILE(PGOOVAERTS/QRPGLESRC)

         *

         *  To Run:

         *     CALL CODASOAP

         *

         *

        H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')


        D CODASOAPFL      PR                  ExtPgm('CODASOAPFL')

        D CODASOAPFL      PI


         /copy httpapi_h


        D SOAP            s          32767A   varying

        D rc              s             10I 0

        D Result          s             12P 2


         /free

          http_debug_file = '/home/PGO/debugpat.txt';

          http_debug(*ON);

          http_XmlStripCRLF(*OFF);


          SOAP = '<?xml version="1.0" encoding="utf-8"?>'

          +'<soapenv:Envelope xmlns:soapenv='

          +   '"[1]http://schemas.xmlsoap.org/soap/envelope/"; '

          +'xmlns:web="http://www.coda.com/efinance/schemas/'

          +   'elementmaster/elementmaster-12.0/webservice" '

          +'xmlns:com="[2]http://www.coda.com/efinance/schemas/common"; '


   +'xmlns:elem="[3]http://www.coda.com/efinance/schemas/elementmaster";>'

          +'<soapenv:Header>'

          +'   <web:Options company="Q" user="INSTALL" />'

          +'</soapenv:Header>'

          +'<soapenv:Body>'

          +'   <web:GetRequest>'

          +'      <web:Key>'

          +'         <elem:CmpCode>Q</elem:CmpCode>'

          +'         <elem:Level>3</elem:Level>'

          +'         <elem:Code>000049</elem:Code>'

          +'      </web:Key>'

          +'   </web:GetRequest>'

          +'</soapenv:Body>'

          +'</soapenv:Envelope>';

            http_setAuth(HTTP_AUTH_BASIC:'USERID':'PASSWORD');


            rc = http_url_post(


   'http://Coda/coda/services/finance/elementmaster/elementmaster-12.0'

                            : %addr(SOAP) + 2

                            : %len(SOAP)

                            : '/home/PGO/test.xml'

                            : HTTP_TIMEOUT

                            : HTTP_USERAGENT

                            : 'text/xml'

                   :
   'uri-coda-webservice/12.000.0729/finance/ElementMaster/Get');


          if (rc <> 1);

             http_crash();

          else;

          // dsply 'OK';

          endif;


          *inlr = *on;

         /end-free




   Patrick Goovaerts

   Systems & Development


   [4]vCard


   emailsignature_c

References

   1. http://schemas.xmlsoap.org/soap/envelope/
   2. http://www.coda.com/efinance/schemas/common
   3. http://www.coda.com/efinance/schemas/elementmaster
   4. http://www.conti7.be/VCards/PGO.vcf

JPEG image

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