× 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.




There are many ways to do it. Personally I feel that returning 2000 records
through a webservice is not the most efficient way to do
it. The services that I build have a fixed array size. These are declared as
data structures with a dim statement:

  myDS    DS            Qualified dim(387)
    Recfound            liked(somefield)
    Field1              like(somefield)
    field2                      like(somefield)

The *entry list would have myDS as a parameter. The RPG app would fill the
structure. I create the PCML from the RPG application and then use websphere
to create the webservice from the PCML. The application that consumes this
service would recurse through the array and select only rows that
have the recfound field set to a 'Y'.

I do not build the xml in RPG; that work is done by the webservice wizard
which also creates the WSDL.

Regards
Faizulla Khan
Senior Programmer/Analyst
Grand Circle Travels


-----Original Message-----
From: Shannon O'Donnell [mailto:shannon.odonnell@xxxxxxxxxxxxxx]
Sent: Friday, February 02, 2007 12:21 PM
To: Websphere Development Studio Client for iSeries
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



--
This is the Websphere Development Studio Client for iSeries  (WDSCI-L)
mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.



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.