Link to home
Start Free TrialLog in
Avatar of azsat
azsat

asked on

How to receive http/xml data file in J2EE Application Server

Hi,


I'm using Websphere App Server 5.1 (WAS) and am required to accept a http/xml file containing prices for stock which I am to process and store in a database.


Could an expert recommend the best approach for the requirement.

Basically I'm after guide-lines regarding the technologies to use for intercepting this file in a WAS environment.

Examples on how a simple file could be processed would be great.  Ideally the data should be received in the form of messages from MQ for the app server to process.

Regards,

azsat.

Avatar of girionis
girionis
Flag of Greece image

It depends on what the client is using to send the data, but a Web Service would be a good approach here. Here is a good tutorial to get you started:

 http://java.sun.com/webservices/docs/1.0/tutorial/doc/JavaWSTutorialTOC.html
Avatar of sudhakar_koundinya
sudhakar_koundinya

Listening
Avatar of azsat

ASKER

Hi

Thanks for the pointer  girionis.  Please clarify this:

Doesn't  http/xml imply Web Sevices ?  

ie XML plus HTTP. HTTP is a ubiquitous protocol, running practically everywhere on the Internet. So XML provides a metalanguage ?  So if my client system (which could be any platform)  wants to send data to WAS it uses http
as the protocol and XML the metalanguage describing the data?

Last but not least,  would my WAS server be functioning as a webserver reading in the XML?

OK if you say yes to the above then when would WAS know that an XML file is ready for delivery, basically how would this scheduling be achieved in the web services scenario?

My hungry mind awaits....

> Doesn't  http/xml imply Web Sevices ?  

Not necessarily. It is the commonest way nowadays but it does not force you to use web services. XML is a metalanguage indeed (which, very briefly, means that it is a language of a "meta" (higher) state, i.e. a language to describe other languages) but it is merely text (you can also send binary objects but this is another story), which means that it can be transmitted by any means that can transmit text, be it using a web service, a plain POST or a plain GET request, an FTP, a TCP/IP connection and so on. The only thing you have to do is to construct the XML string, send it and have a parser at the other end to parse it and extract the data you want. The way you will send this XML string does not matter at all.

> so if my client system (which could be any platform)  wants to send data to WAS it uses http
> as the protocol and XML the metalanguage describing the data?

Exactly.

> Last but not least,  would my WAS server be functioning as a webserver reading in the XML?

Yes it will.

>OK if you say yes to the above then when would WAS know that an XML file is ready for delivery,
>basically how would this scheduling be achieved in the web services scenario?

A web server (or an evolved state of a web server - an application server) basically awaits for requests. When a request arrives it triggers an action and this action does what it is supposed to do (in your case it will be to serve the web service). So WAS will be running waiting for request. Your web service will be deployed waiting also for requests. When a web service request will arrive, WAS will forward it to the web serivce, the web service will process the request and will return the result back to the user who initiated the call.
Avatar of azsat

ASKER

Thanks  girionis,

Very helpful indeed, I'm a little unlcear on "basically awaits for requests. When a request arrives it triggers an action and this action does what it is supposed to do"

I'm using WAS 5.1 and as far as I'm aware there is no scheduling facility available in this version , how does WAS behaving as a web server in this cause actually await the XML request?

Regards

azsat.
Avatar of azsat

ASKER

cause=case :-)
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of azsat

ASKER

Good man,thank you.
Thank you for accepting, glad I was of help :)