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

Re: URL Encoding using WEBFORM_postData()



   Never mind - I replaced the call to WEBFORM_setVar() with
   WEBFORM_setPtr() as shown below and it works -
            //WEBFORM_setVar(form: 'instring': data );
            WEBFORM_setPtr(form: 'instring': %addr(data) :
   %len(%trimr(data)) );
   BTW, can anyone tell me how to make the mailing list filter out the
   disclaimer that my mail server puts out on all the outgoing email...
   Thanks and Regds
   _____________________________________________________________________
   Sarvapriya M Tripathi  |  Billing/Invoice/Tax Team  |  Ryder IT
   Department
   11690 NW 105 Street   Miami, FL  33178-1103
   Ofc: 305-500-3930 | Fax: 305-500-8034 | Email: stripathi@xxxxxxxxx
   From:        Sarvapriya_Tripathi@xxxxxxxxx
   To:        HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
   Date:        07/07/2010 12:05 PM
   Subject:        URL Encoding using WEBFORM_postData()
   Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     _________________________________________________________________

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

References

   1. 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
-----------------------------------------------------------------------