Midrange News for the IBM i Community


Posted by: Larry Taylor
Issue with parseHTTPR
has no ratings.
Published: 20 Dec 2011
Revised: 23 Jan 2013 - 4110 days ago
Last viewed on: 25 Apr 2024 (5295 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Issue with parseHTTPR Published by: Larry Taylor on 20 Dec 2011 view comments(4)

Thanks for your quick response. I verified the V6r1 field size is 16m (16,773,104)

Debug shows the stmt number for the " Length or start position is out of range for the string operation",  is 286400.  The CPF4102 is from QDMSIGNL.

 

Thanks again for looking into this.

Larry

                                                               

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: LarryTaylor
Premium member *
Comment on: Issue with parseHTTPR
Posted: 12 years 4 months 7 days 5 hours 41 minutes ago

ORIGINAL ISSUE.

 

We have been using iSockets for sometime, without issues. Today we started getting

"Message . . . . :   Length or start position is out of range for the string
  operation.                                                               
                                                                           
Cause . . . . . :   One of the following has occurred in RPG procedure     
  parseHTTPR in program ISOCKETS/ISOCKETS: "   AND,                             

 "File QISOCKETS in library ISOCKETS with member ISOCKETS not found".

We are at V6.1 latest ptf's.  In debug on the nRtnLen = postUrlData(url : service : reqData : %addr(rtnXML) : %size(rtnXML): 0 : 819 ); line the nRtnLen is 143662.

nRtnLen is 10i.

We are consuming a inhouse created web service that returns A/P invoices. The issue seems to be with the date range request returning a large number of invoices.

Thank you in advance for your hlep/suggestions on resolving this issue

Larry Taylor

Hobby Lobby Stores

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Issue with parseHTTPR
Posted: 12 years 4 months 7 days 3 hours 44 minutes ago
Edited: Tue, 20 Dec, 2011 at 16:53:16 (4510 days ago)

The code doesn't look like it is within the parseHTTP routine.

It is actually in the parseURL routine. Could be a version/source difference...

But is the domain name (url) goofy in some way? Can you post it perhaps without the real URL but perhaps with something like: xxx.xxxxx.xxx:8086

Here's what its doing at that point in the iSockets code:

NOTE: Full iSockets source code is available for a small fee.

 

2850.00     for i = (%Len(szURL)-1) DownTo 1;                               
2851.00       if %subst(szURL:i:1) = COLON;                                 
2852.00          // If a colon is detected, get the following digits        
2853.00          nPos = %check(DIGITS:%subst(szURL:i+1));                   
2854.00          // If there are digits, capture them, else it's not a port.
2855.00         if nPos = 0;                                                
2856.00           port = %subst(szURL:i+1);                                 
2857.00         elseif nPos > 0;                                            
2858.00           port = %subst(szURL:i+1:nPos-1);                          
2859.00         else;                                                       
2860.00           port = ' ';                                               
2861.00         endif;                                                      
2862.00         if port <> *blanks;                                         
2863.00            nPort = %int(%trimR(port));                              
2864.00            szDomain = %subst(szURL:1: i - 1);                       
2865.00         else;                                                       
2866.00            szDomain = szURL;                                        
2867.00         endif;                                                      
2868.00         leave;                                                      
2869.00       endif; 
2870.00    endfor; 

  

 

Posted by: LarryTaylor
Premium member *
Comment on: Issue with parseHTTPR
Posted: 12 years 4 months 6 days 11 hours 38 minutes ago

url is like this: http://DEVxxxxxxxxx03.xxxxxxxxxx.xxxx:8001 

 

We've been using this url for several weeks in development for this project. We started having issues when the request was for a large number of invoices. Request for a single invoice works just fine. And this date range request worked on a invoice returning 79 items.

As far as source code - boss says that would be a good thing. What is the procedure for purchase?

Posted by: LarryTaylor
Premium member *
Comment on: Issue with parseHTTPR
Posted: 12 years 3 months 20 days 12 hours 43 minutes ago

Just an update for this issue. I thought we had the latest iSockets library, but maybe not.

We purchased the source and re-created the service program. All is well.

Thanks for looking into this Bob, but it looks like the issue was on our end -not having the latest version.