From: Atif Aziz <Atif.A...@skybow.com>
Date: Mon, 11 Jun 2007 15:41:18 +0200
Local: Mon, Jun 11 2007 9:41 am
Subject: RE: [Jayrock] Service access problem
> But I am running into this "Access is I think you missed this one which is related to your issue: > denied" problem with regard to Cross domain restrictions. > I read all the past related postings in this group. http://groups.google.com/group/jayrock/browse_frm/thread/9799b560abda... Problem is that you're trying to use the proxy to communicate with the service residing in another domain than the hosting page. XmlHttpRequest objects or the browsers generally won't allow this. Grabbing the proxy script over a dynamically added script tag (as I see from your code) is not going to help because it uses the XmlHttpRequest under the hood. For cross-domain communication, you need to make each request back to the service via a dynamic script tag. There are several options for doing this but if want to stick with the dynamic script tag approach then Jayrock can help in two ways. First, you need to make sure your methods are accessible over HTTP GET by marking them as Idempotent (this is a property of the JsonRpcMethod attribute that you decorate your service methods with) because the browser script tag results in an HTTP GET request. Make sure the method behavior is indeed idempotent. Second, you need call the service methods over JSONP[1] for browser compatibility purposes. For this, you'll need to grab the latest developer build available at ftp://ftp.berlios.de/pub/jayrock as this bit of functionality is not currently available in any of the released packages. With these two in place, you can start the scripting magic. Usually, this requires a bit of infrastructure so for quick demonstration purposes, here's how you would call the "now" method of the demo service using the ScriptSrcTransport from dojo... function getTime() } Hope this helps. - Atif [1] http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/ -----Original Message-----
From: jayrock@googlegroups.com [mailto:jayrock@googlegroups.com] On Behalf Of Tim Sent: Sunday, June 10, 2007 8:23 PM To: Jayrock Subject: [Jayrock] Service access problem I am new to Jayrock. I think it is really a cool tool. I am trying to Is there any other settings I need to adjust in order to make this <%@ WebHandler Class="JayrockWeb.HelloWorld" %> namespace JayrockWeb public class HelloWorld : JsonRpcHandler On client side: window.onload = function() function AddTag() { function showPop() Any help would be much appreciated ! Tim You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||