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

HTTPAPI 1.11 pre-release - truncationg data on a POST



I'm using a very slightly modified version of Example 2  (1.11)
I'm running into an issue where it appears my "POST" data is being truncating.
see the enclosed code.
 
D Enc              s                      like(HTTP_URL_ENCODER)   
D ApiInp           s           1000A   varying                  
D myPointer      s               *                            
D dataSize        s             10I 0                          
D Message2      s          1000A   based(myPointer)         
 
c                   eval      ApiInp = 'input'
 
    /free
                                                                 
  ApiInp =                                                                                                  
         '<?xml version="1.0">' + CRLF +                        
         '<DATASET>' + CRLF +                                   
         '<SITE_ID>123</SITE_ID>' + CRLF +                      
         '<MLID>555</MLID>' +  CRLF +                           
         '<DATA type="email">eric.jones@xxxxxxxxxx</DATA>' + CRL
         '<DATA type="demographic" id="1">Eric</DATA>' + CRLF + 
         '<DATA type="demographic" id="2">Jones</DATA>' + CRLF +
         '<DATA type="demographic" id="25908">1849959</DATA>' + 
         '<DATA type="demographic" id="58112">CV</DATA>' + CRLF 
         '<DATA type="extra" id="trigger">yes</DATA>' + CRLF +  
         '</DATASET>' + CRLF;                                   
/end-free                                                       
 
c                   callp     http_url_encoder_addvar_s( Enc    
c                                                      : 'input'
c                                                      : ApiInp )
 
after the above statements have run the contents of input are...
 
 
  1   'input=%3C%3Fxml+version%3D%221.0%22%3E%0D%0A%3CDATASET%3E%0D'
 61   '%0A%3CSITE_ID%3E123%3C%2FSITE_ID%3E%0D%0A%3CMLID%3E555%3C%2F'
121   'MLID%3E%3CDATA+type%3D%22email%22%3Eeric.jones%40robson.com%'
181   '3C%2FDATA%3E%0D%0A%3CDATA+type%3D%22demographic%22+id%3D%221'
241   '%22%3EEric%3C%2FDATA%3E%0D%0A%3CDATA+type%3D%22demographic%2'
301   '2+id%3D%222%22%3EJones%3C%2FDATA%3E%0D%0A%3CDATA+type%3D%22d'
361   'emographic%22+id%3D%2225908%22%3E1849959                    '
 
Datasize = 400
 
I am missing the following from the end of input
         </DATA>' + 
         '<DATA type="demographic" id="58112">CV</DATA>' + CRLF 
         '<DATA type="extra" id="trigger">yes</DATA>' + CRLF +  
         '</DATASET>' + CRLF;