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

Working with multiple records



OK. Well hopefully, someone else has asked this question before,
although I couldn't really find a lot about it in the archives.  

I'm calling a web service that returns either one record or multiple
records. Wsdl2Rpg has generated the stubs ok for both methods and now I
am trying to figure out how to deal with what is being returned.  The
calling program for the individual record method receives a ds back that
is based on this ds in the stub:

D tns_Product_t   DS                  based(pDummy)  
D                                     qualified      
D  CategoryID                   10I 0                
D  Discontinued                   N                  
D  ProductID                    10I 0                
D  ProductName                 128A   varying        
D  QuantityPerUnit...                                
D                              128A   varying        
D  ReorderLevel                  5I 0                
D  SupplierID                   10I 0                
D  UnitsInStock                  5I 0                
D  UnitsOnOrder                  5I 0                
D  UnitPrice                    31S15                

That is easy enough to deal with just using the qualified ds fields.

However, the calling program that receives multiple records back, just
receives a pointer to this ds consisting of a data and a schema
structure:

D tns_GetProductsDatasetResultMvd_t...                   
D                 DS                  based(pDummy)      
D                                     qualified          
D  any                       16384A   varying            
D  schema                     4096A   varying   

Looking at the contents of these structures, everything needed seems to
be there, but I am not sure of the easiest way to use it.  Are there
additional procedures that would parse out the data, based on what is in
the schema part or do I have to do all that by hand? 

My primary objective here would be to just create a table and insert the
records as directly as possible from my calling program and I would hope
that there are some tools available to do that.   

Thanks for all your help.     


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas
Raddatz
Sent: Saturday, June 13, 2009 6:59 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: WSDL2RPG Proxy Server parameter

Sorry, there are no more FAQs at the moment. However, for the future I
plan to write FAQs for each 
question that is asked more than once.

Thomas.

************************************************************************************************************************************************************************************************************
This message originates from Lincare Holdings Inc. It contains information which may be confidential or privileged and is intended only for the individual or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or use the contents of this message. 
All personal messages express views solely of the sender, which are not to be attributed to Lincare Holdings Inc., and may not be copied or distributed without this disclaimer. 
If you received this message in error, please notify us immediately at MailAdmin@xxxxxxxxxxx or (800) 284-2006.
************************************************************************************************************************************************************************************************************

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------