How to handle large complex response data structures, for Service Programs exposed as webservices with IBM Integrated Web Services for IBM i (IWS)?
Detailed Description of the Issue:
I have an exposed a procedure like GetRiskItemList() with a response data structure like "RiskItemListResponse" (See Definition Below).
The average usage of the nested array "HomeContentsList" is 10 elements, thus during normal operation 190 elements are unused. Thus significant bloat is generated into the SOAP XML result.
My requirements is to cater for up to 200 items.
For simple arrays IWS allows a variable to be designated as the COUNTER for the number or elements actually used. Which IWS uses to generate XML tags for those number of elements.
Request
Do you know of a way to "Trim" the XML, to excluded the unused elements of the nested array?
RPGLE Code Extract:
d GetRiskItemList...
d pr
d i_request likeds(RiskItemListRequest) const
d o_response likeds(RiskItemListResponse)
?*--------------------------------------------------
?* Web Service Response Data Structure
?*--------------------------------------------------
d RiskItemListResponse...
d ds qualified template
d BuildContentsList...
d likeds(BuildingContentsEntity)
d dim(200)
d BuildingList...
d likeds(BuildingEntity)
d dim(10)
d RiskHeading...
d 50a
d BenefitsHeading...
d 50a
IBM added "Detect Length Fields" option.
https://www.ibm.com/developerworks/ibmi/library/i-integrated-web-services-server/