Thanks for the post.
I meant exposing Criteria as a transfer object, so the
client could instantiate one and fill it in as
necessary. Not exposing its methods as web services.
I agree that it may be too fine grained - hence my
query as to whether anyone else has created a "skinny"
Criteria class (or some such thing).
Gary
--- Brian McCallister
<[EMAIL PROTECTED]> wrote:
> Hmm, I would think that exposing a Criteria to as a
> WebService is a bit
> too fine grained.
>
> A better solution, to me, is to expose something
> that takes a query
> language type query and gives you back a result, for
> instance:
>
>
> /**
> *
>
@whatever-the-tag-is-to-tell-xdoclet-to-generate-stub-and-wsdl-for-axis
> */
> public Object[] query(String query)
> {
> DList results QueryService.execute(query);
> return results.toArray();
> }
>
> Encapsulating a whole query in one request
> (invocation) cuts down
> drastically on the chatter of lots of calls to a
> remote Criteria, and
> allows you to make the web service stateless (much
> preferred).
>
> Criteria just seem far too fine-grained and API
> specific to be good web
> service candidates =/
>
> This doesn't really answer your question, I know,
> but I think the
> answer is that using Criteria as a remote object via
> a web service
> isn't a hot idea.
>
> -Brian
>
> On Dec 11, 2003, at 12:35 PM, Gary wrote:
>
> > I'd like to expose the Criteria class via a web
> > service, so clients can easily create rich
> queries.
> > However, the class uses a number of other classes
> > (different types of Collections, for example) that
> > don't "flatten out" well into SOAP.
> >
> > Has anyone tackled this before? Any code or ideas
> out
> > there?
> >
> > Thanks, Gary
> >
> > __________________________________
> > Do you Yahoo!?
> > New Yahoo! Photos - easier uploading and sharing.
> > http://photos.yahoo.com/
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]