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.
I am consuming a Web Service from the iSeries. I have created a mock up to verify I could do it, and it works. A few problems but not with the iSeries or Isockets. What I need to do now is build XML that contains multiple records. It will contain parts and cut lengths and other fields. I wanted to use CGIDEV2 to accomplish this. I am not sure how to marry the two together. How to build the XML and then send it to the Web Service. I have read many papers on how to do one or the other but not both.
Has anyone ever done this? Am I approaching it incorrectly?
P.S. I am an OLD green screen programmer, but am excited about learning something new. I KNOW my iSeries can do anything.
Chris I have read the article you directed me to.
Bob, I would prefer to use just one piece ie: iSockets. I hoped it would be able to do it all but don't know how. I look forward to more information from you on Monday.
Thanks
Tad
I assume the part of iSockets that does this is the sendURLData. I don't know how the data is created and the help only shows the sendURLText not the sendURLData. Do I use the CGIDEV2 to create the data? Is there a way in iSockets?
iSockets has a couple "HTTP" procedures:
initHttpVar
getHttpVar
It does not have the scan/replace engine that's in RPG xTools or CGIDEV2, however.
Meaning you can read from a web page but you don't have the scan/replace ability to generate the HTML or XML.
if you already generated it, then you can read that file into a variable and simply send it using the sendURLData or another iSocket "send" procedure.
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
I believe RPG does not support beyond 64k on that release. They upped it to 1MB in v7r1 (but check to make sure it wasn't in v6r1).
If you have the line number, I can look at the source code.
Also, try to start a new thread when posting new questions. thanks.