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

URL Encoding using WEBFORM_postData()



   Good Morning,
   I am trying to url-encode using WEBFORM_postData() function. My source
   data may be upto 2000 characters, but WEBFORM_postData() seems to be
   chopping it to 256 bytes - am I missing something? I am using the
   following code (adapted from Example10) -
         * url encoding using HTTPAPI
        H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('HTTPAPI')
         /define WEBFORMS
         /include httpapi_h
        D data            S           2000A
        D form            s                   like(WEBFORM)
        D rc              s             10I 0
        D postData        s               *
        D postDataSize    s             10I 0
         /free
          data = '<?xml version="1.0" encoding="UTF-8" ?>' +
                 '<INDATA>' +
                 '<COMPANY_NAME>Office Center</COMPANY_NAME>' +
                 '<COMPANY_ROLE>S</COMPANY_ROLE>' +
                 '<INVOICE>' +
                 '<LOCATION_SET>OFC Main</LOCATION_SET>' +
                 '<SHIP_TO>' +
                 '<COUNTRY>USA</COUNTRY>' +
                 '<STATE>WA</STATE>' +
                 '<COUNTY>KING</COUNTY>' +
                 '<CITY>SEATTLE</CITY>' +
                 '<POSTCODE>98122</POSTCODE>' +
                 '</SHIP_TO>' +
                 '<TRANSACTION_TYPE>GS</TRANSACTION_TYPE>' +
                 '<INVOICE_DATE>20060115</INVOICE_DATE>' +
                 '<CUSTOMER_NAME>ANDREW GROVE</CUSTOMER_NAME>' +
                 '<INVOICE_NUMBER>123456</INVOICE_NUMBER>' +
                 '<CURRENCY_CODE>USD</CURRENCY_CODE>' +
                 '<LINE ID="1">' +
                 '<GROSS_AMOUNT>149.95</GROSS_AMOUNT>' +
                 '<QUANTITIES>' +
                 '<QUANTITY>' +
                 '<AMOUNT>1</AMOUNT>' +
                 '<UOM>each</UOM>' +
                 '</QUANTITY>' +
                 '</QUANTITIES>' +
                 '<DESCRIPTION>Chair</DESCRIPTION>' +
                 '<LINE_NUMBER>1</LINE_NUMBER>' +
                 '</LINE>' +
                 '<LINE ID="2">' +
                 '<GROSS_AMOUNT>349.95</GROSS_AMOUNT>' +
                 '<QUANTITIES>' +
                 '<QUANTITY>' +
                 '<AMOUNT>3</AMOUNT>' +
                 '<UOM>each</UOM>' +
                 '</QUANTITY>' +
                 '</QUANTITIES>' +
                 '<DESCRIPTION>Desk</DESCRIPTION>' +
                 '<LINE_NUMBER>2</LINE_NUMBER>' +
                 '</LINE>' +
                 '<LINE ID="3">' +
                 '<GROSS_AMOUNT>499.95</GROSS_AMOUNT>' +
                 '<QUANTITIES>' +
                 '<QUANTITY>' +
                 '<AMOUNT>1</AMOUNT>' +
                 '<UOM>each</UOM>' +
                 '</QUANTITY>' +
                 '</QUANTITIES>' +
                 '<DESCRIPTION>Cube Wall</DESCRIPTION>' +
                 '<LINE_NUMBER>3</LINE_NUMBER>' +
                 '</LINE>' +
                 '</INVOICE>' +
                 '</INDATA>';
            form = WEBFORM_open();
            WEBFORM_setVar(form: 'instring': data );
            WEBFORM_postData(form: postData: postDataSize );
            *inlr = *on;
         /end-free

   The variable peValue in http_url_encoder_addvar_s() is only 256 bytes
   - and that seems to be chopping my data. Should I be using another
   function?
The information contained in this electronic communication and any accompanying
 document is confidential, may be
attorney-client privileged, and is intended only for the use of the addressee. 
It is the property of Ryder System,
Inc. Unauthorized use, disclosure or copying of this communication, or any part
 of it, is strictly prohibited and
may be unlawful.  If you have received this communication in error, please noti
fy the sender immediately by return
email, and destroy this communication andall copies of it, including all attach
ments. Electronic communication 
may be susceptible to data corruption, interception and unauthorized tampering 
and Ryder disclaims all liability
of any kind for such actions or any consequences that may arise directly or ind
irectly therefrom.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------