Midrange News for the IBM i Community

Posted by: jay vaughn
httppostclob passing XML request
has no ratings.
Published: 07 Nov 2016
Revised: 17 Nov 2016 - 2657 days ago
Last viewed on: 22 Feb 2024 (3715 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.

httppostclob passing XML request Published by: jay vaughn on 07 Nov 2016 view comments(2)

so after my research i have concluded that httppostlcob must be utilized by passing request parms via the URL - ideally we would like to build an xml request string and pass that instead - are there any systools that will allow for this?

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


(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Comment on: httppostclob passing XML request
Posted: 7 years 3 months 16 days 22 hours 34 minutes ago

You are correct, the httpPostClob and httpGetClob are the two "services" you should be looking at.

To build the XML request there are the XMLTABLE services that IBM provides, but I don't think that's what you asking form. Those tend to be used to parse received XML not generate it. IBM isn't great and XML or JSON generation. Reading and parseing XML and JSON they are great at doing, but not so much generating it.

In my iQuery product, when OUTPUT(*XML) is selected, we embed the XMLELEMENT and XMLSERIALIZE keywords around the individual column (field) names. So you may want to read up on those two pieces.

But from my experience using httpPostClob, you tend to build your XML template and then populate it with the data, then send it using httpPostClob.


Posted by: jayvaughn74
Comment on: httppostclob passing XML request
Posted: 7 years 3 months 10 days 2 hours 44 minutes ago

Thank you Bob.

After I posted this, i was unable to get back on your site (seems the server was down a few days), anyhow since then i was able to do the following in my SQLRPGLE (our shop is primarily rpg and i'm bringing some sql to the table, so i set out to do the following)

1.) create a varchar xml string (using a single sql statment)

2.) pass that to the httppostclob, and get my response in a varchar xml string

3.) pass that string to a procedure to parse it with a single sql statement

pure sweetness!

thanks alot for the reply