× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Shannon,

This question has been coming up a lot lately when I talk with customers, 
so I wrote up a technical note on it.  It describes how to do this such 
that you don't end up return a bunch of empty records in the response SOAP 
message from the Web service and also discusses a couple design 
alternatives. 

I'll send you a copy off-list.  If anyone else is interested please email 
me directly. 

Thanks.

Don Yantzi
Technical Lead
WebSphere Development Studio Client for iSeries
IBM Toronto Lab





"Shannon O'Donnell" <shannon.odonnell@xxxxxxxxxxxxxx> 
Sent by: wdsci-l-bounces@xxxxxxxxxxxx
02/02/2007 12:21 PM
Please respond to
Websphere Development Studio Client for iSeries <wdsci-l@xxxxxxxxxxxx>


To
"Websphere Development Studio Client for iSeries" <wdsci-l@xxxxxxxxxxxx>
cc

Subject
[WDSCI-L] Returning Multiple Records from Web Service






What is the best practice for returning multiple records through a web
service that uses a java program call bean to talk to an RPG program?

 

Let's say I have a file with 2000 records in it and my user wants to do
a lookup which would retrieve 387 of those records and then display them
in their web page.

 

When I return the records to the web service from my RPG program, would
it be best for me to manually build the XML for each record and field

 

<record>

<field>field1</field>

  <desc>desc 1</desc>

</record>

 

<record>

<field>field2</field>

  <desc>desc 2</desc>

</record>

 

<record>

<field>field3</field>

  <desc>desc 3</desc>

</record>

 

And then in my interface I'd describe a multiple occurrence data
structure that gets returned...

 

Or would it be best to group them all like, 

 

"field1,field1-Desc;file2,field2-Desc;field3,field3-Desc; 

 

And again, use a multiple occurrence data structure...

 

I'm just not sure how to describe this in my java program call bean for
multiple records.

 

How does everyone else do it?

 

Thanks!

 

Shannon O'Donnell

 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.