aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Practical JavaScript, DOM Scripting and Ajax Projects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Practical JavaScript, DOM Scripting and Ajax Projects" Watch "Practical JavaScript, DOM Scripting and Ajax Projects" New topic
Author

Practical JavaScript, DOM Scripting and Ajax Projects

Pallavi Srivastava
Ranch Hand

Joined: Dec 22, 2006
Posts: 38
Hi,

I have implemented a webservice which does conversion of tiff to pdf on a fly.
I want that as soon as a new tiff document is added the webservice is called and convert it to pdf.Is it possible to use AJAX in this scenario to call web service?Can AJAX be a client to a webservice?
Does your book cover some examples of calling webservice using AJAX?

2. Also I will be using DHTML for generating dynamic tables,clicking and highlighting of rows, event handling etc.Will this book has some examples for this?

Thanks & Regards.
Frank Zammetti
Ranch Hand

Joined: Dec 16, 2004
Posts: 136
Hi Pallavi,

Yes, AJAX can be used as a client to a web service. The only issue you'll haev to deal with is you'll have to roll all your own protocols, i.e., if you want to retrieve WSDL and use it, you can do that via AJAX, but you'll have to write the code to parse the WSDL and use it. Likewise, to make a SOAP-based request, you can again do that with AJAX, but you'll have to write the code to generate the wrapper, set headers appropriately, etc.

I do cover calling web services in my book, but it's not the "full stack" web services most people mean these days, i.e., SOAP, WSDL, etc. It's the web services offered by companies like Google and Yahoo using things like JSON and the like.

One thing you won't be able to do with AJAX however is send the TIF... there's no way to upload files with AJAX at the present time. Likewise, while you could technically retrieve a PDF via AJAX, you wouldn't be able to do anything with it because what you get back with AJAX is text (or an XML DOM), but it won't understand a PDF, and you can't pass it along to another handler or something like that.

These issues I believe are addressed by the latest HTTP spec (or is it HTML spec? I forget)... but whichever it is, we all know how slowly that moves, so it'll be 4 years before we have a standardized XMLHttpRequest object that does all this stuff anyway By that time we'll probably have moved on to something bigger and better anyway!


-- <br />Frank W. Zammetti<br />Founder and Chief Software Architect<br />Omnytex Technologies<br /><a href="http://www.omnytex.com" target="_blank" rel="nofollow">http://www.omnytex.com</a><br />AIM/Yahoo: fzammetti<br />MSN: fzammetti@hotmail.com<br />Author of "Practical Ajax Projects With Java Technology"<br /> (2006, Apress, ISBN 1-59059-695-1)<br />and "JavaScript, DOM Scripting and Ajax Projects"<br /> (2007, Apress, ISBN 1-59059-816-4)<br />Java Web Parts - <a href="http://javawebparts.sourceforge.net" target="_blank" rel="nofollow">http://javawebparts.sourceforge.net</a><br /> Supplying the wheel, so you don't have to reinvent it!
Pallavi Srivastava
Ranch Hand

Joined: Dec 22, 2006
Posts: 38
Thank you for the wonderful information!
I guess I wont use AJAX for this web service but I am on my way of implementing others. So I hope AJAX will be useful in that.

Thanks & Regards.
Reda Mokrane
Ranch Hand

Joined: Jul 25, 2001
Posts: 235
[Thread hijack removed. Please start new topics for new questions.]
[ May 02, 2007: Message edited by: Bear Bibeault ]
 
Don't get me started about those stupid light bulbs.
 
subject: Practical JavaScript, DOM Scripting and Ajax Projects
 
Similar Threads
need examples on ajax
ajax with struts 2
Reading TIFF files pagewise
How GWT makes a difference in AJAX programming
Ajax fundamentals