Hi Avi,
I have a question on how to do "xml message as an HTTP request to a
servlet". How do I do that? I've been trying to come up with a way to do
this, but can't figure it out. Thank you very much.
howard
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Avi Kivity
Sent: Thursday, July 27, 2000 9:03 AM
To: [EMAIL PROTECTED]
Subject: Re: Which architecture is better?
> From: Albert Chow [mailto:[EMAIL PROTECTED]]
>
> Hi,
>
> How can I do it with XML messages??
>
When the applet wishes to perform some operation (for example, obtain a list
of records to display), it generates an xml message:
<message>
<query>
<category>health food</category>
<max-record-count>20</max-record-count>
</query>
</message>
The applet sends the xml message as an HTTP request to a servlet, which sits
on some URL in your web server.
The servlet decodes the XML message, calls (say) a stateless session bean
(which returns a Collection), formats the result in xml:
<message>
<result>
<record>hamburgers</record>
<record>french fries</record>
<record>hot dogs</record>
</result>
</message>
and sends it as the HTTP response.
The applet receives the message, decodes it, and reconstructs the Collection
which it then displays to the user.
- Avi
--
s/\be(\w+)/e-\1/g;
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".