Lookup java.net.URLConnection and java.net.HttpURLConnection. There are
methods there to set the content type (text/xml) and write arbitrary data
(your XML text) to the connection.
- Avi
--
s/\be(\w+)/e-\1/g;
> -----Original Message-----
> From: Howard Lee [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 29, 2000 06:10
> To: [EMAIL PROTECTED]
> Subject: Re: Which architecture is better?
>
>
> 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".
>
===========================================================================
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".