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

Re: Post vs Post_raw



here you go, thanks:
 C* convert the data we just received to EBCDIC                         
   c                   if        retlen > 1                               
   c                   callp     Translate(retlen: retdata: 'QTCPEBC')    
   c                   endif                                              
   c                   eval      *inlr = *on                              
   P Incoming        B                                                    
   D Incoming        PI   &nb! sp;  ;       10I 0                                  
   D  Descriptor                   10I 0                                  
   D  Data                       8192    Options(*VarSize)                
   D  DataLen                      10I 0 Value                            
                                                                          
   C* Make sure we don't overflow the string:                             
   c                &n! bsp;&nbs p; eval      retlen = (nextpos + datalen) - 1         
   c                   if        retlen > %size(retdata)                  
   c                   eval      datalen=datalen-(retlen-%size(retdata))  
   c                   endif                                              
                                                                          
   C* If there is nothing to write, return THAT...                        
   c                   if        datalen < 1                       &n! bsp;&nbs p;     
   c                   return    0                                        
   c                   endif                                              
                                                                          
   C* Here we add any data sent to the end of our 'retdata' string:       
   c                   eval      %subst(retdata: nextpos) =               
   c                                %subst(data:1:datalen)                
   c &nb! sp;  ;                eval      nextpos = nextpos + datalen              
                                                                          
   c* We always return the amount of data that we wrote.   Note           
   C*  that if http-api sees that we didn't write as much data as         
   C*  it sent us, it'll abort the process with an error message.         
   c                   return    datalen                                  
P Incoming        E                        
 
-------------- Original message --------------

> Sender: Scott Klement
>
>
> > and then reran with the same results:
> > DSPLY recvdoc: saveproc: Not all data was written!
>
> Can you post the code for your INCOMING subprocedure?
>
>
> > ....5...10...15...20...25...30...35...40...45...50...55...60
> > 1 'msg=iSeriesTest&host=10.254.20.213&channel=DEVAI01&queue=INB'
> > 61 'OUND&manager= '
> >
> > It appears that the HTTP API is sending the same url-encoded string to
> > the servlet that the GUI does, do you agree? If so, do you have any
> > other suggestions as to what we can try next?
>
> That looks correct to me. Is the servlet still crashing/locking up?
>
> The next thing I'd look at is your INCOMING subprocedure. (The one you're
> telling HTTPAPI to call for each piece of new data that's received.)
>
> It's possible that this subprocedure is telling HTTPAPI that it can't save
> all of the data that the server is sending (which would explain the
> error -- but wouldn't explain why the servlet is locking up...)
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubsribe from the list send mail
> to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
> -----------------------------------------------------------------------