Hi All,
I found the solution myself.Here is a summary of what I have done:-
I have a tomcat and Jboss installed on two different machines.I am
making a call from a web application deployed on tomcat to a web
service deployed on JBoss App Server.
This is not possible through AJAX because XMLHttp doesnt allow you to
make ajax calls between different domains.
There is a little known javascript trick called script tag monkeying
where you insert javascript from one domain to another domain.Through
this technique we can make javascript calls between different domains.
Below mentioned link is a very good link to understand this concept.
http://www.javaworld.com/javaworld/jw-11-2006/jw-1115-json.html?page=2
The implementation provided on javaworld is based on JSON but this
implementation is possible without JSON as well.
Let me know should you need any more help.
Thanks
--- In AJAX_2-0@yahoogroups.com, Jeff Woodman <sanctumvoid@...> wrote:
>
> My understanding is that most browsers won't allow cross-domain
ajax requests as a security precaution - some may allow you to
disable that, I dunno.
>
> One thing I've done in the past is develop a server-side proxy that
would exist (i.e.) on abc.com and act as a go-between between abc's
AJAX scripts and xyz's xml response.
> -Jeff
>
> http://www.sanctumvoid.net
>
>
>
> ----- Original Message ----
> From: krishnakumar_08 <krishnakumar_08@...>
> To: AJAX_2-0@yahoogroups.com
> Sent: Monday, August 13, 2007 11:21:43 AM
> Subject: [AJAX_2-0] How to make AJAX request between different
domains??
>
> Hi,
> I am working on an application where I am reuired to make AJAX
calls
> between different domains.Below is the summary of my problem:
>
> Say there is a domain
> abc.com
> there is another domain called
> xyz.com
>
> I want to make AJAX calls from abc.com to
> xyz.com
> ============ ========= ========= ========= ========= =======
> Sample code would be:
> (this will be contained in any page of abc.com)
> var url = "xyz.com?strCriteri a=testcriteria" ;
> if (window.XMLHttpRequ est) {
> req = new XMLHttpRequest( );
> } else if (window.ActiveXObje ct) {
> req = new ActiveXObject( "Microsoft. XMLHTTP") ;
> }
> req.open("GET" , url, true);
> req.onreadystatecha nge = callback;
> req.send(null) ;
> ============ ========= ========= ========= ========= ======
>
> When I do this it gives me "Access is denied".
> How do I do that?
> Please suggest any AJAX or non AJAX solution.
>
>
>
>
>
>
>
______________________________________________________________________
______________
> Moody friends. Drama queens. Your life? Nope! - their life, your
story. Play Sims Stories at Yahoo! Games.
> http://sims.yahoo.com/
>