<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>shindig-dev@incubator.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/"/>
<id>http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/</id>
<updated>2009-12-08T15:28:22Z</updated>
<entry>
<title>Re: Locked Domain</title>
<author><name>Jesse &lt;jss9920@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3ca2c628990912071348k1e7e7633x21da7e998745452e@mail.gmail.com%3e"/>
<id>urn:uuid:%3ca2c628990912071348k1e7e7633x21da7e998745452e@mail-gmail-com%3e</id>
<updated>2009-12-07T21:48:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm thinking the answer WRT the security token is to use a short lived token
on the gagdet URL and swap that out for a longer lived token on the Shindig
side -- but it still seems that there would be at least some small window on
page load where the short lived token could still be sniffed/used by another
gadget on the page for evil.

As for the RPC token -- is that used for anything sensitive?  Do I need to
be concerned about it being sniffed by other gadgets on the page?

And finally -- I'm still trying to understand what I need to do on the
Shindig side WRT locked domain support.  I see options in the shindig config
file to enable locked domain, but it seems like most of the work would be on
the container side in generating the iframe url's on unique domains...

Please see the rest of this thread for more details.

Any feedback at all on this would be appreciated...

Thanks!

--Jesse

On Fri, Dec 4, 2009 at 10:46 AM, Jesse &lt;jss9920@gmail.com&gt; wrote:

&gt; I've experimented a bit more with locked domain by just setting up my
&gt; container to prepend a counter to the iframe url for each gadget -- so I end
&gt; up with iframe urls which look something like:
&gt;
&gt; 1.gadgets.mydomain.com/gadgets/ifr?url=...&amp;st=...&amp;rpctoken=...&amp;...
&gt; 2.gadgets.mydomain.com/gadgets/ifr?url=...&amp;st=...&amp;rpctoken=...&amp;...
&gt; 3.gadgets.mydomain.com/gadgets/ifr?url=...&amp;st=...&amp;rpctoken=...&amp;...
&gt; ...
&gt;
&gt; (I realize that the urls should stay consistent across page renders for the
&gt; same gadget, but for testing purposes I just wanted to get the gadgets on
&gt; unique domains)
&gt;
&gt; Everything seems to work just fine with this setup, and I do indeed see
&gt; additional sandboxing happening in the browser.  I tested this by doing some
&gt; experimentation in FireFox using FireBug -- before implementing the locked
&gt; domain changes all of these statements in FireBug execute successfully:
&gt;
&gt; cd($("remote_iframe_0").contentWindow);   //change FireBug's context to the
&gt; window of one of the gadgets
&gt; console.log(document.location);   //make sure the context is now what I
&gt; think it should be
&gt; var otherWindow = window.parent.frames["remote_iframe_1"];   //grab a
&gt; reference to the window of another gadget
&gt; console.log(otherWindow.location);   //log its location to be sure I have a
&gt; hold of the iframe I think I do
&gt; console.log(otherWindow.document.getElementById('someElement').textContent);
&gt; //log out the content of an element in the other gadget
&gt;
&gt; and as soon as I implement locked domain as described above, the last
&gt; statement fails with a security exception (as expected).
&gt;
&gt; But I'm still left with a few questions...
&gt;
&gt; 1) Even with the gadgets rendering on their own domains, I can still get to
&gt; the location property of other gadgets on the page, which means I can parse
&gt; out things like the security tokens and rpc tokens -- doesn’t that mean one
&gt; gadget can still spoof another?  How do other containers handle this?
&gt;
&gt; 2) I'm still trying to understand what all the locked domain code in
&gt; Shindig is for...  I can see how some of it would be useful in my container
&gt; (like the logic in HashLockedDomainService that generates the iframe url
&gt; based on a hash of the gadget url) -- so is that why it’s there?  To be use
&gt; on the container side?  But then I also see methods in the
&gt; LockedDomainService interface that definitely seem Shindig specific like
&gt; isSafeForOpenProxy and gadgetCanRender, so I'm sure there must be more to it
&gt; that I'm not understanding...  I've spent a bunch of time digging in the
&gt; Shindig codebase and searching through the mailing list looking for tidbits
&gt; but haven’t made much progress so far...
&gt;
&gt; Any help or pointers would be greatly appreciated!
&gt; On Thu, Dec 3, 2009 at 9:55 AM, jss9920 &lt;jss9920@gmail.com&gt; wrote:
&gt;
&gt;&gt; I would like to start rendering my gadgets on unique locked domains but am
&gt;&gt; getting a bit confused about where to start...
&gt;&gt;
&gt;&gt; Since the container generates the gadget iframe urls, it would seem that
&gt;&gt; implementing locked domain would be a container side affair, but I see
&gt;&gt; configuration options for locked domain support in the shindig container.js
&gt;&gt; file and I also see associated Java classes that do a lot of locked domain
&gt;&gt; work in the Shindig codebase (Java Shindig 1.0 release)...
&gt;&gt;
&gt;&gt; So is there actually work that needs to be done on both the container side
&gt;&gt; and the Shindig side to enable locked domain gadgets?
&gt;&gt;
&gt;&gt; Any pointers on how to get started (even high level) would be helpful and
&gt;&gt; much appreciated.
&gt;&gt;
&gt;&gt; Thanks!
&gt;&gt;
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: svn commit: r888082 - in /incubator/shindig/trunk/java:	common/conf/shindig.properties gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java</title>
<author><name>Paul Lindner &lt;lindner@inuus.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cb71cdca90912071134k1e5931c9m41d9503d03e34009@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb71cdca90912071134k1e5931c9m41d9503d03e34009@mail-gmail-com%3e</id>
<updated>2009-12-07T19:34:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Is there a use-case where you want to force javascript to be inlined?
 Obviously this CL has a global on/off switch for that behavior, so you're
safe there plus libs always take precedence.

The way I see it, requiring the front-end to compute the libs parameter
requires that it have much more information about the gadget metadata that
it doesn't necessarily need.


On Mon, Dec 7, 2009 at 11:29 AM, John Hjelmstad &lt;fargo@google.com&gt; wrote:

&gt; FWIW:
&gt;
&gt; While I'm fine w/ this CL as implemented, I'll note that we've dealt with
&gt; this at the URL generation side rather than gadget rendering side, as it
&gt; affords more flexibility on a render-by-render basis.
&gt;
&gt; 2c,
&gt; John
&gt;
&gt; On Mon, Dec 7, 2009 at 6:58 PM, &lt;lindner@apache.org&gt; wrote:
&gt;
&gt; &gt; Author: lindner
&gt; &gt; Date: Mon Dec  7 18:58:24 2009
&gt; &gt; New Revision: 888082
&gt; &gt;
&gt; &gt; URL: http://svn.apache.org/viewvc?rev=888082&amp;view=rev
&gt; &gt; Log:
&gt; &gt; SHINDIG-1227 | Patch from chirag shah | Allow JavaScript features
&gt; required
&gt; &gt; by a gadget to be externalized on demand
&gt; &gt;
&gt; &gt; Modified:
&gt; &gt;    incubator/shindig/trunk/java/common/conf/shindig.properties
&gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt; &gt;
&gt; &gt; Modified: incubator/shindig/trunk/java/common/conf/shindig.properties
&gt; &gt; URL:
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/conf/shindig.properties?rev=888082&amp;r1=888081&amp;r2=888082&amp;view=diff
&gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; --- incubator/shindig/trunk/java/common/conf/shindig.properties
&gt; (original)
&gt; &gt; +++ incubator/shindig/trunk/java/common/conf/shindig.properties Mon Dec
&gt;  7
&gt; &gt; 18:58:24 2009
&gt; &gt; @@ -63,6 +63,10 @@
&gt; &gt;  #shindig.gadget-rewrite.default-forced-libs=core:core.io
&gt; &gt;  shindig.gadget-rewrite.default-forced-libs=
&gt; &gt;
&gt; &gt; +#
&gt; &gt; +# Allow supported JavaScript features required by a gadget to be
&gt; &gt; externalized on demand
&gt; &gt; +shindig.gadget-rewrite.externalize-feature-libs=false
&gt; &gt; +
&gt; &gt;  # Configuration for image rewriter
&gt; &gt;  shindig.image-rewrite.max-inmem-bytes = 1048576
&gt; &gt;  shindig.image-rewrite.max-palette-size = 256
&gt; &gt;
&gt; &gt; Modified:
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt; &gt; URL:
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java?rev=888082&amp;r1=888081&amp;r2=888082&amp;view=diff
&gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; ---
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt; &gt; (original)
&gt; &gt; +++
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt; &gt; Mon Dec  7 18:58:24 2009
&gt; &gt; @@ -41,6 +41,7 @@
&gt; &gt;  import org.apache.shindig.gadgets.spec.ModulePrefs;
&gt; &gt;  import org.apache.shindig.gadgets.spec.UserPref;
&gt; &gt;  import org.apache.shindig.gadgets.spec.View;
&gt; &gt; +import org.apache.commons.lang.StringUtils;
&gt; &gt;  import org.w3c.dom.Document;
&gt; &gt;  import org.w3c.dom.Element;
&gt; &gt;  import org.w3c.dom.Node;
&gt; &gt; @@ -99,6 +100,8 @@
&gt; &gt;   protected final RpcServiceLookup rpcServiceLookup;
&gt; &gt;   protected Set&lt;String&gt; defaultExternLibs = ImmutableSet.of();
&gt; &gt;
&gt; &gt; +  protected Boolean externalizeFeatures = false;
&gt; &gt; +
&gt; &gt;   /**
&gt; &gt;    * @param messageBundleFactory Used for injecting message bundles into
&gt; &gt; gadget output.
&gt; &gt;    */
&gt; &gt; @@ -117,11 +120,16 @@
&gt; &gt;
&gt; &gt;   @Inject
&gt; &gt;   public void
&gt; &gt;
&gt; setDefaultForcedLibs(@Named("shindig.gadget-rewrite.default-forced-libs")String
&gt; &gt; forcedLibs) {
&gt; &gt; -    if (forcedLibs != null &amp;&amp; forcedLibs.length() &gt; 0) {
&gt; &gt; +    if (StringUtils.isNotBlank(forcedLibs)) {
&gt; &gt;       defaultExternLibs =
&gt; &gt; ImmutableSortedSet.copyOf(Arrays.asList(forcedLibs.split(":")));
&gt; &gt;     }
&gt; &gt;   }
&gt; &gt;
&gt; &gt; +  @Inject(optional = true)
&gt; &gt; +  public void
&gt; &gt;
&gt; setExternalizeFeatureLibs(@Named("shindig.gadget-rewrite.externalize-feature-libs")Boolean
&gt; &gt; externalizeFeatures) {
&gt; &gt; +    this.externalizeFeatures = externalizeFeatures;
&gt; &gt; +  }
&gt; &gt; +
&gt; &gt;   public void rewrite(Gadget gadget, MutableContent mutableContent)
&gt; throws
&gt; &gt; RewritingException {
&gt; &gt;     // Don't touch sanitized gadgets.
&gt; &gt;     if (gadget.sanitizeOutput()) {
&gt; &gt; @@ -215,40 +223,37 @@
&gt; &gt;     // TODO: If there isn't any js in the document, we can skip this.
&gt; &gt; Unfortunately, that means
&gt; &gt;     // both script tags (easy to detect) and event handlers (much more
&gt; &gt; complex).
&gt; &gt;     GadgetContext context = gadget.getContext();
&gt; &gt; -    String externParam = context.getParameter("libs");
&gt; &gt;
&gt; &gt; -    // List of extern libraries we need
&gt; &gt; -    Set&lt;String&gt; extern;
&gt; &gt; +    // Set of extern libraries requested by the container
&gt; &gt; +    Set&lt;String&gt; externForcedLibs = defaultExternLibs;
&gt; &gt;
&gt; &gt;     // gather the libraries we'll need to generate the extern libs
&gt; &gt; -    if (externParam == null || externParam.length() == 0) {
&gt; &gt; -      // Don't bother making a mutable copy if the list is empty
&gt; &gt; -      extern = (defaultExternLibs.isEmpty()) ? defaultExternLibs :
&gt; &gt; -          Sets.newTreeSet(defaultExternLibs);
&gt; &gt; -    } else {
&gt; &gt; -      extern = Sets.newTreeSet(Arrays.asList(externParam.split(":")));
&gt; &gt; +    String externParam = context.getParameter("libs");
&gt; &gt; +    if (StringUtils.isNotBlank(externParam)) {
&gt; &gt; +      externForcedLibs =
&gt; &gt; Sets.newTreeSet(Arrays.asList(externParam.split(":")));
&gt; &gt;     }
&gt; &gt; -
&gt; &gt; -    if (!extern.isEmpty()) {
&gt; &gt; -      String jsUrl = urlGenerator.getBundledJsUrl(extern, context);
&gt; &gt; +
&gt; &gt; +    if (!externForcedLibs.isEmpty()) {
&gt; &gt; +      String jsUrl = urlGenerator.getBundledJsUrl(externForcedLibs,
&gt; &gt; context);
&gt; &gt;       Element libsTag =
&gt; headTag.getOwnerDocument().createElement("script");
&gt; &gt;       libsTag.setAttribute("src", jsUrl);
&gt; &gt;       headTag.appendChild(libsTag);
&gt; &gt;     }
&gt; &gt; -
&gt; &gt; +
&gt; &gt;     List&lt;String&gt; unsupported = Lists.newLinkedList();
&gt; &gt; -    List&lt;FeatureResource&gt; externResources =
&gt; &gt; -        featureRegistry.getFeatureResources(gadget.getContext(), extern,
&gt; &gt; unsupported);
&gt; &gt; +
&gt; &gt; +    List&lt;FeatureResource&gt; externForcedResources =
&gt; &gt; +        featureRegistry.getFeatureResources(context, externForcedLibs,
&gt; &gt; unsupported);
&gt; &gt;     if (!unsupported.isEmpty()) {
&gt; &gt;       LOG.info("Unknown feature(s) in extern &amp;libs=: " +
&gt; &gt; unsupported.toString());
&gt; &gt;       unsupported.clear();
&gt; &gt;     }
&gt; &gt; -
&gt; &gt; +
&gt; &gt;     // Get all resources requested by the gadget's requires/optional
&gt; &gt; features.
&gt; &gt;     Map&lt;String, Feature&gt; featureMap =
&gt; &gt; gadget.getSpec().getModulePrefs().getFeatures();
&gt; &gt;     List&lt;String&gt; gadgetFeatureKeys =
&gt; &gt; Lists.newArrayList(gadget.getDirectFeatureDeps());
&gt; &gt;     List&lt;FeatureResource&gt; gadgetResources =
&gt; &gt; -        featureRegistry.getFeatureResources(gadget.getContext(),
&gt; &gt; gadgetFeatureKeys, unsupported);
&gt; &gt; +        featureRegistry.getFeatureResources(context, gadgetFeatureKeys,
&gt; &gt; unsupported);
&gt; &gt;     if (!unsupported.isEmpty()) {
&gt; &gt;       List&lt;String&gt; requiredUnsupported = Lists.newLinkedList();
&gt; &gt;       for (String notThere : unsupported) {
&gt; &gt; @@ -260,13 +265,33 @@
&gt; &gt;       if (!requiredUnsupported.isEmpty()) {
&gt; &gt;         throw new
&gt; &gt; UnsupportedFeatureException(requiredUnsupported.toString());
&gt; &gt;       }
&gt; &gt; +    }
&gt; &gt; +
&gt; &gt; +    // Inline or externalize the gadgetFeatureKeys
&gt; &gt; +    List&lt;FeatureResource&gt; inlineResources = Lists.newArrayList();
&gt; &gt; +    List&lt;String&gt; allRequested = Lists.newArrayList(gadgetFeatureKeys);
&gt; &gt; +
&gt; &gt; +    if (externalizeFeatures) {
&gt; &gt; +      Set&lt;String&gt; externGadgetLibs =
&gt; &gt; Sets.newTreeSet(featureRegistry.getFeatures(gadgetFeatureKeys));
&gt; &gt; +      externGadgetLibs.removeAll(externForcedLibs);
&gt; &gt; +
&gt; &gt; +      if (!externGadgetLibs.isEmpty()) {
&gt; &gt; +        String jsUrl = urlGenerator.getBundledJsUrl(externGadgetLibs,
&gt; &gt; context);
&gt; &gt; +        Element libsTag =
&gt; &gt; headTag.getOwnerDocument().createElement("script");
&gt; &gt; +        libsTag.setAttribute("src", jsUrl);
&gt; &gt; +        headTag.appendChild(libsTag);
&gt; &gt; +      }
&gt; &gt; +    } else {
&gt; &gt; +      inlineResources.addAll(gadgetResources);
&gt; &gt;     }
&gt; &gt; -
&gt; &gt; +
&gt; &gt;     // Calculate inlineResources as all resources that are needed by the
&gt; &gt; gadget to
&gt; &gt;     // render, minus all those included through externResources.
&gt; &gt;     // TODO: profile and if needed, optimize this a bit.
&gt; &gt; -    List&lt;FeatureResource&gt; inlineResources =
&gt; &gt; Lists.newArrayList(gadgetResources);
&gt; &gt; -    inlineResources.removeAll(externResources);
&gt; &gt; +    if (!externForcedLibs.isEmpty()) {
&gt; &gt; +      allRequested.addAll(externForcedLibs);
&gt; &gt; +      inlineResources.removeAll(externForcedResources);
&gt; &gt; +    }
&gt; &gt;
&gt; &gt;     // Precalculate the maximum length in order to avoid excessive
&gt; garbage
&gt; &gt; generation.
&gt; &gt;     int size = 0;
&gt; &gt; @@ -280,8 +305,6 @@
&gt; &gt;       }
&gt; &gt;     }
&gt; &gt;
&gt; &gt; -    List&lt;String&gt; allRequested = Lists.newArrayList(gadgetFeatureKeys);
&gt; &gt; -    allRequested.addAll(extern);
&gt; &gt;     String libraryConfig =
&gt; &gt;         getLibraryConfig(gadget,
&gt; &gt; featureRegistry.getFeatures(allRequested));
&gt; &gt;
&gt; &gt; @@ -348,8 +371,7 @@
&gt; &gt;     }
&gt; &gt;
&gt; &gt;     addHasFeatureConfig(gadget, config);
&gt; &gt; -    addOsapiSystemListMethodsConfig(gadget.getContext().getContainer(),
&gt; &gt; config,
&gt; &gt; -      gadget.getContext().getHost());
&gt; &gt; +    addOsapiSystemListMethodsConfig(context.getContainer(), config,
&gt; &gt; context.getHost());
&gt; &gt;     addSecurityTokenConfig(context, config);
&gt; &gt;     return "gadgets.config.init(" + JsonSerializer.serialize(config) +
&gt; &gt; ");\n";
&gt; &gt;   }
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: svn commit: r888082 - in /incubator/shindig/trunk/java:	common/conf/shindig.properties gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java</title>
<author><name>John Hjelmstad &lt;fargo@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cab5e78ed0912071129n610ba07dr9c2ce13ed95015db@mail.gmail.com%3e"/>
<id>urn:uuid:%3cab5e78ed0912071129n610ba07dr9c2ce13ed95015db@mail-gmail-com%3e</id>
<updated>2009-12-07T19:29:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
FWIW:

While I'm fine w/ this CL as implemented, I'll note that we've dealt with
this at the URL generation side rather than gadget rendering side, as it
affords more flexibility on a render-by-render basis.

2c,
John

On Mon, Dec 7, 2009 at 6:58 PM, &lt;lindner@apache.org&gt; wrote:

&gt; Author: lindner
&gt; Date: Mon Dec  7 18:58:24 2009
&gt; New Revision: 888082
&gt;
&gt; URL: http://svn.apache.org/viewvc?rev=888082&amp;view=rev
&gt; Log:
&gt; SHINDIG-1227 | Patch from chirag shah | Allow JavaScript features required
&gt; by a gadget to be externalized on demand
&gt;
&gt; Modified:
&gt;    incubator/shindig/trunk/java/common/conf/shindig.properties
&gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt;
&gt; Modified: incubator/shindig/trunk/java/common/conf/shindig.properties
&gt; URL:
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/conf/shindig.properties?rev=888082&amp;r1=888081&amp;r2=888082&amp;view=diff
&gt;
&gt; ==============================================================================
&gt; --- incubator/shindig/trunk/java/common/conf/shindig.properties (original)
&gt; +++ incubator/shindig/trunk/java/common/conf/shindig.properties Mon Dec  7
&gt; 18:58:24 2009
&gt; @@ -63,6 +63,10 @@
&gt;  #shindig.gadget-rewrite.default-forced-libs=core:core.io
&gt;  shindig.gadget-rewrite.default-forced-libs=
&gt;
&gt; +#
&gt; +# Allow supported JavaScript features required by a gadget to be
&gt; externalized on demand
&gt; +shindig.gadget-rewrite.externalize-feature-libs=false
&gt; +
&gt;  # Configuration for image rewriter
&gt;  shindig.image-rewrite.max-inmem-bytes = 1048576
&gt;  shindig.image-rewrite.max-palette-size = 256
&gt;
&gt; Modified:
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt; URL:
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java?rev=888082&amp;r1=888081&amp;r2=888082&amp;view=diff
&gt;
&gt; ==============================================================================
&gt; ---
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt; (original)
&gt; +++
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
&gt; Mon Dec  7 18:58:24 2009
&gt; @@ -41,6 +41,7 @@
&gt;  import org.apache.shindig.gadgets.spec.ModulePrefs;
&gt;  import org.apache.shindig.gadgets.spec.UserPref;
&gt;  import org.apache.shindig.gadgets.spec.View;
&gt; +import org.apache.commons.lang.StringUtils;
&gt;  import org.w3c.dom.Document;
&gt;  import org.w3c.dom.Element;
&gt;  import org.w3c.dom.Node;
&gt; @@ -99,6 +100,8 @@
&gt;   protected final RpcServiceLookup rpcServiceLookup;
&gt;   protected Set&lt;String&gt; defaultExternLibs = ImmutableSet.of();
&gt;
&gt; +  protected Boolean externalizeFeatures = false;
&gt; +
&gt;   /**
&gt;    * @param messageBundleFactory Used for injecting message bundles into
&gt; gadget output.
&gt;    */
&gt; @@ -117,11 +120,16 @@
&gt;
&gt;   @Inject
&gt;   public void
&gt; setDefaultForcedLibs(@Named("shindig.gadget-rewrite.default-forced-libs")String
&gt; forcedLibs) {
&gt; -    if (forcedLibs != null &amp;&amp; forcedLibs.length() &gt; 0) {
&gt; +    if (StringUtils.isNotBlank(forcedLibs)) {
&gt;       defaultExternLibs =
&gt; ImmutableSortedSet.copyOf(Arrays.asList(forcedLibs.split(":")));
&gt;     }
&gt;   }
&gt;
&gt; +  @Inject(optional = true)
&gt; +  public void
&gt; setExternalizeFeatureLibs(@Named("shindig.gadget-rewrite.externalize-feature-libs")Boolean
&gt; externalizeFeatures) {
&gt; +    this.externalizeFeatures = externalizeFeatures;
&gt; +  }
&gt; +
&gt;   public void rewrite(Gadget gadget, MutableContent mutableContent) throws
&gt; RewritingException {
&gt;     // Don't touch sanitized gadgets.
&gt;     if (gadget.sanitizeOutput()) {
&gt; @@ -215,40 +223,37 @@
&gt;     // TODO: If there isn't any js in the document, we can skip this.
&gt; Unfortunately, that means
&gt;     // both script tags (easy to detect) and event handlers (much more
&gt; complex).
&gt;     GadgetContext context = gadget.getContext();
&gt; -    String externParam = context.getParameter("libs");
&gt;
&gt; -    // List of extern libraries we need
&gt; -    Set&lt;String&gt; extern;
&gt; +    // Set of extern libraries requested by the container
&gt; +    Set&lt;String&gt; externForcedLibs = defaultExternLibs;
&gt;
&gt;     // gather the libraries we'll need to generate the extern libs
&gt; -    if (externParam == null || externParam.length() == 0) {
&gt; -      // Don't bother making a mutable copy if the list is empty
&gt; -      extern = (defaultExternLibs.isEmpty()) ? defaultExternLibs :
&gt; -          Sets.newTreeSet(defaultExternLibs);
&gt; -    } else {
&gt; -      extern = Sets.newTreeSet(Arrays.asList(externParam.split(":")));
&gt; +    String externParam = context.getParameter("libs");
&gt; +    if (StringUtils.isNotBlank(externParam)) {
&gt; +      externForcedLibs =
&gt; Sets.newTreeSet(Arrays.asList(externParam.split(":")));
&gt;     }
&gt; -
&gt; -    if (!extern.isEmpty()) {
&gt; -      String jsUrl = urlGenerator.getBundledJsUrl(extern, context);
&gt; +
&gt; +    if (!externForcedLibs.isEmpty()) {
&gt; +      String jsUrl = urlGenerator.getBundledJsUrl(externForcedLibs,
&gt; context);
&gt;       Element libsTag = headTag.getOwnerDocument().createElement("script");
&gt;       libsTag.setAttribute("src", jsUrl);
&gt;       headTag.appendChild(libsTag);
&gt;     }
&gt; -
&gt; +
&gt;     List&lt;String&gt; unsupported = Lists.newLinkedList();
&gt; -    List&lt;FeatureResource&gt; externResources =
&gt; -        featureRegistry.getFeatureResources(gadget.getContext(), extern,
&gt; unsupported);
&gt; +
&gt; +    List&lt;FeatureResource&gt; externForcedResources =
&gt; +        featureRegistry.getFeatureResources(context, externForcedLibs,
&gt; unsupported);
&gt;     if (!unsupported.isEmpty()) {
&gt;       LOG.info("Unknown feature(s) in extern &amp;libs=: " +
&gt; unsupported.toString());
&gt;       unsupported.clear();
&gt;     }
&gt; -
&gt; +
&gt;     // Get all resources requested by the gadget's requires/optional
&gt; features.
&gt;     Map&lt;String, Feature&gt; featureMap =
&gt; gadget.getSpec().getModulePrefs().getFeatures();
&gt;     List&lt;String&gt; gadgetFeatureKeys =
&gt; Lists.newArrayList(gadget.getDirectFeatureDeps());
&gt;     List&lt;FeatureResource&gt; gadgetResources =
&gt; -        featureRegistry.getFeatureResources(gadget.getContext(),
&gt; gadgetFeatureKeys, unsupported);
&gt; +        featureRegistry.getFeatureResources(context, gadgetFeatureKeys,
&gt; unsupported);
&gt;     if (!unsupported.isEmpty()) {
&gt;       List&lt;String&gt; requiredUnsupported = Lists.newLinkedList();
&gt;       for (String notThere : unsupported) {
&gt; @@ -260,13 +265,33 @@
&gt;       if (!requiredUnsupported.isEmpty()) {
&gt;         throw new
&gt; UnsupportedFeatureException(requiredUnsupported.toString());
&gt;       }
&gt; +    }
&gt; +
&gt; +    // Inline or externalize the gadgetFeatureKeys
&gt; +    List&lt;FeatureResource&gt; inlineResources = Lists.newArrayList();
&gt; +    List&lt;String&gt; allRequested = Lists.newArrayList(gadgetFeatureKeys);
&gt; +
&gt; +    if (externalizeFeatures) {
&gt; +      Set&lt;String&gt; externGadgetLibs =
&gt; Sets.newTreeSet(featureRegistry.getFeatures(gadgetFeatureKeys));
&gt; +      externGadgetLibs.removeAll(externForcedLibs);
&gt; +
&gt; +      if (!externGadgetLibs.isEmpty()) {
&gt; +        String jsUrl = urlGenerator.getBundledJsUrl(externGadgetLibs,
&gt; context);
&gt; +        Element libsTag =
&gt; headTag.getOwnerDocument().createElement("script");
&gt; +        libsTag.setAttribute("src", jsUrl);
&gt; +        headTag.appendChild(libsTag);
&gt; +      }
&gt; +    } else {
&gt; +      inlineResources.addAll(gadgetResources);
&gt;     }
&gt; -
&gt; +
&gt;     // Calculate inlineResources as all resources that are needed by the
&gt; gadget to
&gt;     // render, minus all those included through externResources.
&gt;     // TODO: profile and if needed, optimize this a bit.
&gt; -    List&lt;FeatureResource&gt; inlineResources =
&gt; Lists.newArrayList(gadgetResources);
&gt; -    inlineResources.removeAll(externResources);
&gt; +    if (!externForcedLibs.isEmpty()) {
&gt; +      allRequested.addAll(externForcedLibs);
&gt; +      inlineResources.removeAll(externForcedResources);
&gt; +    }
&gt;
&gt;     // Precalculate the maximum length in order to avoid excessive garbage
&gt; generation.
&gt;     int size = 0;
&gt; @@ -280,8 +305,6 @@
&gt;       }
&gt;     }
&gt;
&gt; -    List&lt;String&gt; allRequested = Lists.newArrayList(gadgetFeatureKeys);
&gt; -    allRequested.addAll(extern);
&gt;     String libraryConfig =
&gt;         getLibraryConfig(gadget,
&gt; featureRegistry.getFeatures(allRequested));
&gt;
&gt; @@ -348,8 +371,7 @@
&gt;     }
&gt;
&gt;     addHasFeatureConfig(gadget, config);
&gt; -    addOsapiSystemListMethodsConfig(gadget.getContext().getContainer(),
&gt; config,
&gt; -      gadget.getContext().getHost());
&gt; +    addOsapiSystemListMethodsConfig(context.getContainer(), config,
&gt; context.getHost());
&gt;     addSecurityTokenConfig(context, config);
&gt;     return "gadgets.config.init(" + JsonSerializer.serialize(config) +
&gt; ");\n";
&gt;   }
&gt;
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Shindig should allow RPC requests to pass in GET data, not just	POST</title>
<author><name>Chris Chabot &lt;chabotc@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c818767740912070444w5b9d046ew1444aabcfee547c3@mail.gmail.com%3e"/>
<id>urn:uuid:%3c818767740912070444w5b9d046ew1444aabcfee547c3@mail-gmail-com%3e</id>
<updated>2009-12-07T12:44:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hey Artem,

You're quite right, this is indeed part of the spec and currently not
supported in PHP Shindig.

So far every developer who's worked with OpenSocial who's wanted to do GET's
has used the RESTful interface and not the RPC one, so this completely
dropped of my radar since no one complained about it.

For example this:

http://api.example.org/rpc?method=people.get&amp;id=myself&amp;userId=@me&amp;groupI
d=@self&lt;http://api.example.org/rpc?method=people.get&amp;id=myself&amp;userId=@me&amp;groupId=@self&gt;

can be simplified to
http://api.example.org/rest/people/@me/@self

Or if you want to specify a user id:
http://api.example.org/rest/people/User123/@self

Internally RPC and REST requests are represented in the same format and use
the same code path so as far as implementation and testing goes there's no
difference between the RPC and REST call.

In general we prefer the REST interface unless gains can be made through
batching, and RPC+GET removes that benefit since you can only specify a
single call, so it's not very high on my priority list either.

But, patches are welcome so if you have a strong case for why you require
this functionality we'd be happy to accept a patch to fix it up

   -- Chris

On Sat, Dec 5, 2009 at 12:53 AM, Artem Russakovskii &lt;artem@plaxo.com&gt; wrote:

&gt; Hi everyone,
&gt;
&gt;
&gt;
&gt; I believe this to be a Shindig bug but need some feedback validating my
&gt; thoughts.
&gt;
&gt;
&gt;
&gt; According to the opensocial RPC spec
&gt; http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-p
&gt; rotocol, the following POST and GET RPC requests should be equivalent
&gt; and allowed:
&gt;
&gt;
&gt;
&gt; POST:
&gt;
&gt; POST /rpc HTTP/1.1
&gt; Host: api.example.org
&gt; Authorization: &lt;Auth token&gt;
&gt; Content-Type: application/json
&gt; {
&gt;  "method" : "people.get",
&gt;
&gt;  "id" : "myself"
&gt;  "params" : {
&gt;
&gt;    "userId" : "@me",
&gt;    "groupId" : "@self"
&gt;
&gt;  }
&gt; }
&gt;
&gt;
&gt;
&gt; and
&gt;
&gt;
&gt;
&gt; GET:
&gt;
&gt; http://api.example.org/rpc?method=people.get&amp;id=myself&amp;userId=@me&amp;groupI
&gt; d=@self&lt;http://api.example.org/rpc?method=people.get&amp;id=myself&amp;userId=@me&amp;groupI%0Ad=@self&gt;
&gt;
&gt;
&gt;
&gt; However, I believe Shindig's behavior (at least in PHP) is incorrect
&gt; here.
&gt;
&gt;
&gt;
&gt; When a doGet() function gets called in JsonRpcServlet, it calls
&gt; dispatch($request, $token), which expects parameters to be in
&gt; $request-&gt;params.
&gt;
&gt;
&gt;
&gt; The problem is, if you compare the RPC spec url above with the JSON
&gt; "equivalent", it looks like the url doesn't include a &amp;params GET
&gt; variable - instead params like groupId, userId, etc are given as
&gt; individual GET params. The shindig PHP code doesn't account for that and
&gt; skips them altogether.
&gt;
&gt;
&gt;
&gt; Supporting the GET version of the spec would make debugging easier as
&gt; it's a lot easier to send a GET request than a POST request (in addition
&gt; to actually adhering to the spec, of course)
&gt;
&gt;
&gt;
&gt; Does anyone have any comments confirming this as a bug or otherwise?
&gt;
&gt;
&gt;
&gt; Thanks,
&gt;
&gt;
&gt;
&gt; Artem Russakovskii
&gt;
&gt; Plaxo Engineer
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>lindner@inuus.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c0016361e7c2844a144047a1f328f@google.com%3e"/>
<id>urn:uuid:%3c0016361e7c2844a144047a1f328f@google-com%3e</id>
<updated>2009-12-07T08:25:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Didn't have time to deeply look at this.  Only obvious thing I noted is
that the diff lib should be test scope.



http://codereview.appspot.com/157161/diff/3092/2084
File java/gadgets/pom.xml (right):

http://codereview.appspot.com/157161/diff/3092/2084#newcode133
java/gadgets/pom.xml:133: &lt;artifactId&gt;diff_match_patch&lt;/artifactId&gt;
This should be &lt;scope&gt;test&lt;/scope&gt; so we don't include this in the
deployed artifacts.

http://codereview.appspot.com/157161


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>Dan Shepherd &lt;dan.x.shepherd@googlemail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c919d19210912041717j4c428ea5mb7f0a96ac39e871@mail.gmail.com%3e"/>
<id>urn:uuid:%3c919d19210912041717j4c428ea5mb7f0a96ac39e871@mail-gmail-com%3e</id>
<updated>2009-12-05T01:17:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ha ha - good point! I thought about going out but its raining, so was
dancing around on my own with mobile phone headpones on when phone pinged
with notification of your little shindig.  How is it progressing anyway?
Have not looked at it in six months or more.

On 5 Dec 2009 01:08, "John Hjelmstad" &lt;fargo@google.com&gt; wrote:

I'm confused. Gate crashing typically means the party's worth going to! :)

So as to prevent this topic from veering too off course, I proffer the
following overview of the CL for anyone interested to review. I understand
Paul and Louis are on board. All comments welcome.

The changes are arrayed as follows:
1. Refactoring. Previously a large amount of generic (ie. should apply to
any) HTML parser testing was stuck in the nekohtml-package tests. To the
maximum extent possible, this has been pulled into parse-package classes:
 - AbstractParsingTestBase includes helper methods for any parsing- or
serialization-based test. Pulled from AbstractParserAndSerializerTest
 - AbstractParserAndSerializer test contains several "common"
parse/serialize tests no matter the concrete impl.
 - AbstractSocialMarkupHtmlParserTest pulls the social-markup test from
Neko into a base class.
 - "Actual" tests are trivial subclasses of the abstract tests, providing a
GadgetHtmlParser instance.
 - Tests converted to jUnit 4 as a side note.
Subtleties:
 - Neko-based tests override a few base parse/serialize tests due to Neko
oddities. All test files have been moved to base or nekohtml subdir to
follow suit.

2. GadgetHtmlParser normalization implemented.
 - GadgetHtmlParser.normalizeFragment() removed - logic now inlined into
parseDom().
   + Rationale: IMO (open to discussion) the abstract parseDomImpl() API is
unnecessary/does too much. Pretty much all gadget HTML is treated as tag
soup and cleaned up. Having a base method whose contract is to give back
unmodified tag soup thus seems right to me, with a single implementation of
the normalization logic.
 - GadgetHtmlParser.parseDom() implements a large chunk of document
normalization logic. It takes tag soup as input and returns a valid HTML
document with a single top-level HTML element, in turn with two children:
head and body.
   + Multiple &lt;head&gt; nodes consolidated together. Likewise body.
   + Elements above first &lt;head&gt; -&gt; end up in head.
   + Elements above first &lt;body&gt; -&gt; end up in body.
   + Elements after &lt;body&gt; -&gt; end up in body unless inside a &lt;head&gt; node.
   + &lt;style&gt; nodes pulled to &lt;head&gt; in relative order - only HTML-compliant
place for them, and no possibility that there will be conflicts (no
displayable elements in &lt;head&gt;).
 - OpenSocial template parsing MAY be done as a post-processing pass on
&lt;script&gt; nodes. Text found therein is treated as OS (X|HT)ML.
Subtleties:
 - Lots. @see parseDom() impl especially.
 - NekoSimplifiedHtmlParser still impl's separate logic for parseDomImpl
and parseFragmentImpl. I didn't dive into the difference and whether we
could actually get rid of parseDomImpl in this round.

3. CajaHtmlParser implementation.
 - Depends on Caja r3889 (pom.xml updated to reflect this).
 - Unfortunately, parseDomImpl() does top-level &lt;html&gt; node synthesis to
ensure document.getDocumentElement() returns it. This is for
NekoSimplified/Caja dual compatibility w/ GadgetHtmlParser base logic. As
noted, I'd prefer to move this synthesis code into
GadgetHtmlParser.parseDom() if possible.
 - Pretty straightforward past that. Defers to Caja's parser for fragment
processing. That's about it.

Misc: setValijaMode(true) removed from CajaContentRewriter, since it's now
default in the relevant Caja version.

-j-

On Fri, Dec 4, 2009 at 4:41 PM, Dan Shepherd

&lt;dan.x.shepherd@googlemail.com&gt;wrote: &gt; Indeed :) sorry for gate crashing! &gt;
&gt; On 5 Dec 2009 00:35,...


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>John Hjelmstad &lt;fargo@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cab5e78ed0912041708j3476dde6m42c89f3fb9043376@mail.gmail.com%3e"/>
<id>urn:uuid:%3cab5e78ed0912041708j3476dde6m42c89f3fb9043376@mail-gmail-com%3e</id>
<updated>2009-12-05T01:08:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm confused. Gate crashing typically means the party's worth going to! :)

So as to prevent this topic from veering too off course, I proffer the
following overview of the CL for anyone interested to review. I understand
Paul and Louis are on board. All comments welcome.

The changes are arrayed as follows:
1. Refactoring. Previously a large amount of generic (ie. should apply to
any) HTML parser testing was stuck in the nekohtml-package tests. To the
maximum extent possible, this has been pulled into parse-package classes:
  - AbstractParsingTestBase includes helper methods for any parsing- or
serialization-based test. Pulled from AbstractParserAndSerializerTest
  - AbstractParserAndSerializer test contains several "common"
parse/serialize tests no matter the concrete impl.
  - AbstractSocialMarkupHtmlParserTest pulls the social-markup test from
Neko into a base class.
  - "Actual" tests are trivial subclasses of the abstract tests, providing a
GadgetHtmlParser instance.
  - Tests converted to jUnit 4 as a side note.
Subtleties:
  - Neko-based tests override a few base parse/serialize tests due to Neko
oddities. All test files have been moved to base or nekohtml subdir to
follow suit.

2. GadgetHtmlParser normalization implemented.
  - GadgetHtmlParser.normalizeFragment() removed - logic now inlined into
parseDom().
    + Rationale: IMO (open to discussion) the abstract parseDomImpl() API is
unnecessary/does too much. Pretty much all gadget HTML is treated as tag
soup and cleaned up. Having a base method whose contract is to give back
unmodified tag soup thus seems right to me, with a single implementation of
the normalization logic.
  - GadgetHtmlParser.parseDom() implements a large chunk of document
normalization logic. It takes tag soup as input and returns a valid HTML
document with a single top-level HTML element, in turn with two children:
head and body.
    + Multiple &lt;head&gt; nodes consolidated together. Likewise body.
    + Elements above first &lt;head&gt; -&gt; end up in head.
    + Elements above first &lt;body&gt; -&gt; end up in body.
    + Elements after &lt;body&gt; -&gt; end up in body unless inside a &lt;head&gt; node.
    + &lt;style&gt; nodes pulled to &lt;head&gt; in relative order - only HTML-compliant
place for them, and no possibility that there will be conflicts (no
displayable elements in &lt;head&gt;).
  - OpenSocial template parsing MAY be done as a post-processing pass on
&lt;script&gt; nodes. Text found therein is treated as OS (X|HT)ML.
Subtleties:
  - Lots. @see parseDom() impl especially.
  - NekoSimplifiedHtmlParser still impl's separate logic for parseDomImpl
and parseFragmentImpl. I didn't dive into the difference and whether we
could actually get rid of parseDomImpl in this round.

3. CajaHtmlParser implementation.
  - Depends on Caja r3889 (pom.xml updated to reflect this).
  - Unfortunately, parseDomImpl() does top-level &lt;html&gt; node synthesis to
ensure document.getDocumentElement() returns it. This is for
NekoSimplified/Caja dual compatibility w/ GadgetHtmlParser base logic. As
noted, I'd prefer to move this synthesis code into
GadgetHtmlParser.parseDom() if possible.
  - Pretty straightforward past that. Defers to Caja's parser for fragment
processing. That's about it.

Misc: setValijaMode(true) removed from CajaContentRewriter, since it's now
default in the relevant Caja version.

-j-

On Fri, Dec 4, 2009 at 4:41 PM, Dan Shepherd
&lt;dan.x.shepherd@googlemail.com&gt;wrote:

&gt; Indeed :) sorry for gate crashing!
&gt;
&gt; On 5 Dec 2009 00:35, "John Hjelmstad" &lt;fargo@google.com&gt; wrote:
&gt;
&gt; At all the best Shindigs, people show up fashionably late.
&gt;
&gt; On Fri, Dec 4, 2009 at 4:32 PM, Dan Shepherd
&gt; &lt;dan.x.shepherd@googlemail.com&gt;wrote:
&gt;
&gt; &gt; Call this a shining? shouldn't you folks be out partying ;) &gt; &gt; On 5 Dec
&gt; 2009 00:28, "Kevin Brown...
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Shindig not picking up GET params in RPC requests</title>
<author><name>Archon810 &lt;archon810@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c98aab2f30912041644q160b6d57w4a7a744ea6af5a73@mail.gmail.com%3e"/>
<id>urn:uuid:%3c98aab2f30912041644q160b6d57w4a7a744ea6af5a73@mail-gmail-com%3e</id>
<updated>2009-12-05T00:44:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi everyone,



I believe this to be a Shindig bug but need some feedback validating my
thoughts.



According to the opensocial RPC spec
http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-protocol,
the following POST and GET RPC requests should be equivalent and allowed:



POST:

POST /rpc HTTP/1.1
Host: api.example.org
Authorization: &lt;Auth token&gt;
Content-Type: application/json
{
  "method" : "people.get",

  "id" : "myself"
  "params" : {

    "userId" : "@me",
    "groupId" : "@self"

  }
}



and



*GET:***

*
http://api.example.org/rpc?method=people.get&amp;id=myself&amp;userId=@me&amp;groupId=@self
*

* *

However, I believe Shindig’s behavior (at least in PHP) is incorrect here.



When a doGet() function gets called in JsonRpcServlet, it calls
dispatch($request, $token), which expects parameters to be in
$request-&gt;params.



The problem is, if you compare the RPC spec url above with the JSON
“equivalent”, it looks like the url doesn’t include a &amp;params GET variable –
instead params like groupId, userId, etc are given as individual GET params.
The shindig PHP code doesn’t account for that and skips them altogether.



Supporting the GET version of the spec would make debugging easier as it’s a
lot easier to send a GET request than a POST request (in addition to
actually adhering to the spec, of course)



Does anyone have any comments confirming this as a bug or otherwise?



Thanks,



Artem Russakovskii

Plaxo Engineer

http://beerpla.net
http://twitter.com/ArtemR


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>Dan Shepherd &lt;dan.x.shepherd@googlemail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c919d19210912041641h40a52e52oe353308f84c784c4@mail.gmail.com%3e"/>
<id>urn:uuid:%3c919d19210912041641h40a52e52oe353308f84c784c4@mail-gmail-com%3e</id>
<updated>2009-12-05T00:41:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Indeed :) sorry for gate crashing!

On 5 Dec 2009 00:35, "John Hjelmstad" &lt;fargo@google.com&gt; wrote:

At all the best Shindigs, people show up fashionably late.

On Fri, Dec 4, 2009 at 4:32 PM, Dan Shepherd
&lt;dan.x.shepherd@googlemail.com&gt;wrote:

&gt; Call this a shining? shouldn't you folks be out partying ;) &gt; &gt; On 5 Dec
2009 00:28, "Kevin Brown...


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>John Hjelmstad &lt;fargo@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cab5e78ed0912041635ncd31dfv55ae92ea20eb405@mail.gmail.com%3e"/>
<id>urn:uuid:%3cab5e78ed0912041635ncd31dfv55ae92ea20eb405@mail-gmail-com%3e</id>
<updated>2009-12-05T00:35:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
At all the best Shindigs, people show up fashionably late.

On Fri, Dec 4, 2009 at 4:32 PM, Dan Shepherd
&lt;dan.x.shepherd@googlemail.com&gt;wrote:

&gt; Call this a shining? shouldn't you folks be out partying ;)
&gt;
&gt; On 5 Dec 2009 00:28, "Kevin Brown" &lt;etnu@google.com&gt; wrote:
&gt;
&gt; I thought for sure someone else would have looked at it by now. I can look
&gt; at it over the weekend if you don't mind waiting until monday.
&gt;
&gt; On Fri, Dec 4, 2009 at 3:05 PM, &lt;johnfargo@gmail.com&gt; wrote: &gt; Does anyone
&gt; have thoughts on this C...
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>Dan Shepherd &lt;dan.x.shepherd@googlemail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c919d19210912041632l65553810y5b2a3d26014788ae@mail.gmail.com%3e"/>
<id>urn:uuid:%3c919d19210912041632l65553810y5b2a3d26014788ae@mail-gmail-com%3e</id>
<updated>2009-12-05T00:32:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Call this a shining? shouldn't you folks be out partying ;)

On 5 Dec 2009 00:28, "Kevin Brown" &lt;etnu@google.com&gt; wrote:

I thought for sure someone else would have looked at it by now. I can look
at it over the weekend if you don't mind waiting until monday.

On Fri, Dec 4, 2009 at 3:05 PM, &lt;johnfargo@gmail.com&gt; wrote: &gt; Does anyone
have thoughts on this C...


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>Kevin Brown &lt;etnu@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3caa285c160912041622r23abb976l5e60595accc5fcc3@mail.gmail.com%3e"/>
<id>urn:uuid:%3caa285c160912041622r23abb976l5e60595accc5fcc3@mail-gmail-com%3e</id>
<updated>2009-12-05T00:22:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I thought for sure someone else would have looked at it by now. I can look
at it over the weekend if you don't mind waiting until monday.

On Fri, Dec 4, 2009 at 3:05 PM, &lt;johnfargo@gmail.com&gt; wrote:

&gt; Does anyone have thoughts on this CL? It's been sitting for a week and a
&gt; half without comment, but is quite substantial and central to Shindig's
&gt; operation. All tests are retained, as is the default parser impl, but
&gt; changes nevertheless remain  notable.
&gt;
&gt;
&gt; http://codereview.appspot.com/157161
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Shindig should allow RPC requests to pass in GET data, not just POST</title>
<author><name>&quot;Artem Russakovskii&quot; &lt;artem@plaxo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cE0A5FDD42D4FC946ABC834539BA11A3B07211E44@corpex2k3.plaxo.com%3e"/>
<id>urn:uuid:%3cE0A5FDD42D4FC946ABC834539BA11A3B07211E44@corpex2k3-plaxo-com%3e</id>
<updated>2009-12-04T23:53:51Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi everyone,

 

I believe this to be a Shindig bug but need some feedback validating my
thoughts.

 

According to the opensocial RPC spec
http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-p
rotocol, the following POST and GET RPC requests should be equivalent
and allowed:

 

POST:

POST /rpc HTTP/1.1
Host: api.example.org
Authorization: &lt;Auth token&gt;
Content-Type: application/json
{
  "method" : "people.get",

  "id" : "myself"
  "params" : {

    "userId" : "@me",
    "groupId" : "@self"

  }
}

 

and

 

GET:

http://api.example.org/rpc?method=people.get&amp;id=myself&amp;userId=@me&amp;groupI
d=@self

 

However, I believe Shindig's behavior (at least in PHP) is incorrect
here.

 

When a doGet() function gets called in JsonRpcServlet, it calls
dispatch($request, $token), which expects parameters to be in
$request-&gt;params.

 

The problem is, if you compare the RPC spec url above with the JSON
"equivalent", it looks like the url doesn't include a &amp;params GET
variable - instead params like groupId, userId, etc are given as
individual GET params. The shindig PHP code doesn't account for that and
skips them altogether.

 

Supporting the GET version of the spec would make debugging easier as
it's a lot easier to send a GET request than a POST request (in addition
to actually adhering to the spec, of course)

 

Does anyone have any comments confirming this as a bug or otherwise?

 

Thanks,

 

Artem Russakovskii

Plaxo Engineer



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c001485f9a7ecace7bc0479ef231b@google.com%3e"/>
<id>urn:uuid:%3c001485f9a7ecace7bc0479ef231b@google-com%3e</id>
<updated>2009-12-04T23:05:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Does anyone have thoughts on this CL? It's been sitting for a week and a
half without comment, but is quite substantial and central to Shindig's
operation. All tests are retained, as is the default parser impl, but
changes nevertheless remain  notable.

http://codereview.appspot.com/157161


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c001636ed71ef9f59c10479eed6e3@google.com%3e"/>
<id>urn:uuid:%3c001636ed71ef9f59c10479eed6e3@google-com%3e</id>
<updated>2009-12-04T22:43:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Final patch set. Syncs and compiles cleanly against build@head.

http://codereview.appspot.com/157161


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Locked Domain</title>
<author><name>Jesse &lt;jss9920@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3ca2c628990912040746j78cb1d3flff0711042fbf1974@mail.gmail.com%3e"/>
<id>urn:uuid:%3ca2c628990912040746j78cb1d3flff0711042fbf1974@mail-gmail-com%3e</id>
<updated>2009-12-04T15:46:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I've experimented a bit more with locked domain by just setting up my
container to prepend a counter to the iframe url for each gadget -- so I end
up with iframe urls which look something like:

1.gadgets.mydomain.com/gadgets/ifr?url=...&amp;st=...&amp;rpctoken=...&amp;...
2.gadgets.mydomain.com/gadgets/ifr?url=...&amp;st=...&amp;rpctoken=...&amp;...
3.gadgets.mydomain.com/gadgets/ifr?url=...&amp;st=...&amp;rpctoken=...&amp;...
...

(I realize that the urls should stay consistent across page renders for the
same gadget, but for testing purposes I just wanted to get the gadgets on
unique domains)

Everything seems to work just fine with this setup, and I do indeed see
additional sandboxing happening in the browser.  I tested this by doing some
experimentation in FireFox using FireBug -- before implementing the locked
domain changes all of these statements in FireBug execute successfully:

cd($("remote_iframe_0").contentWindow);   //change FireBug's context to the
window of one of the gadgets
console.log(document.location);   //make sure the context is now what I
think it should be
var otherWindow = window.parent.frames["remote_iframe_1"];   //grab a
reference to the window of another gadget
console.log(otherWindow.location);   //log its location to be sure I have a
hold of the iframe I think I do
console.log(otherWindow.document.getElementById('someElement').textContent);
//log out the content of an element in the other gadget

and as soon as I implement locked domain as described above, the last
statement fails with a security exception (as expected).

But I'm still left with a few questions...

1) Even with the gadgets rendering on their own domains, I can still get to
the location property of other gadgets on the page, which means I can parse
out things like the security tokens and rpc tokens -- doesn’t that mean one
gadget can still spoof another?  How do other containers handle this?

2) I'm still trying to understand what all the locked domain code in Shindig
is for...  I can see how some of it would be useful in my container (like
the logic in HashLockedDomainService that generates the iframe url based on
a hash of the gadget url) -- so is that why it’s there?  To be use on the
container side?  But then I also see methods in the LockedDomainService
interface that definitely seem Shindig specific like isSafeForOpenProxy and
gadgetCanRender, so I'm sure there must be more to it that I'm not
understanding...  I've spent a bunch of time digging in the Shindig codebase
and searching through the mailing list looking for tidbits but haven’t made
much progress so far...

Any help or pointers would be greatly appreciated!
On Thu, Dec 3, 2009 at 9:55 AM, jss9920 &lt;jss9920@gmail.com&gt; wrote:

&gt; I would like to start rendering my gadgets on unique locked domains but am
&gt; getting a bit confused about where to start...
&gt;
&gt; Since the container generates the gadget iframe urls, it would seem that
&gt; implementing locked domain would be a container side affair, but I see
&gt; configuration options for locked domain support in the shindig container.js
&gt; file and I also see associated Java classes that do a lot of locked domain
&gt; work in the Shindig codebase (Java Shindig 1.0 release)...
&gt;
&gt; So is there actually work that needs to be done on both the container side
&gt; and the Shindig side to enable locked domain gadgets?
&gt;
&gt; Any pointers on how to get started (even high level) would be helpful and
&gt; much appreciated.
&gt;
&gt; Thanks!
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Implementing requestSendMessage for Partuza problem</title>
<author><name>Mel Morrow &lt;mel.morow@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c5c7564cf0912040346u575dda21kc55a9adcb92ac8ad@mail.gmail.com%3e"/>
<id>urn:uuid:%3c5c7564cf0912040346u575dda21kc55a9adcb92ac8ad@mail-gmail-com%3e</id>
<updated>2009-12-04T11:46:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hey there.

I'm trying to implement requestSendMessage for partzua.
In the gadget I have this

&lt;script type="text/javascript"&gt;
                function sendNotification() {
                        var params = [];
                        params[opensocial.Message.Field.TITLE] = "title";
                        params[opensocial.Message.Field.TYPE] =
opensocial.Message.Type.NOTIFICATION;

                        var message = opensocial.newMessage("body",
params);
                        var recipient = opensocial.IdSpec.PersonId.OWNER;

                        opensocial.requestSendMessage(recipient, message,
callback);

                };

                function callback(data) {

                  if (data.hadError()) {
                    alert("There was a problem:" + data.getErrorCode());
                  } else {
                    alert("Ok");
                  }
                };
&lt;/script&gt;

and in my container.js I've added

init: function() {
                ...
                gadgets.rpc.register('requestSendMessage',
this.requestSendMessage);
        },

and now I need a little help to understand what should I do next, in
my method

requestSendMessage: function() {

}

and now I need a little help to understand what should I do next, in
my method

requestSendMessage: function() {

}

I'm debugging the entire code to have a notion of shindig -
partuza interaction flow,

and that is what I found..

gadgets.json.stringify function (..rps/wpm.transport.js) changes the
entire rpc object structure... I mean that some fields of that object
(i.e the array containing
title, body and message type) are getting changed ...hence in my
container.js (partuza's) in requestSendMessage function(that I should
implement) I can get only the recipient, but no message to proceed.

something is wrong with my code:( or I'm doing so..


Any help is appreciated.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Caja-based HtmlParser and Parser Overhaul (issue157161)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c001636c5bda37e799e0479e13bec@google.com%3e"/>
<id>urn:uuid:%3c001636c5bda37e799e0479e13bec@google-com%3e</id>
<updated>2009-12-04T06:29:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Updated: Caja piece is committed, pom.xml update reflects same. JDK 6-&gt;5
tweaks needed still.

http://codereview.appspot.com/157161


</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ordering of child-to-container gadgets.rpc setup (issue165052)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c0016e640d40ec5c1720479dd4b76@google.com%3e"/>
<id>urn:uuid:%3c0016e640d40ec5c1720479dd4b76@google-com%3e</id>
<updated>2009-12-04T01:47:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Reviewers: shindig.remailer_gmail.com,

Description:
setupReceiver('..') initializes gadget-to-container communication, but
should be called in init() after gadgets.rpc as an object is set up.

Please review this at http://codereview.appspot.com/165052

Affected files:
   features/src/main/javascript/features/rpc/rpc.js


Index: features/src/main/javascript/features/rpc/rpc.js
===================================================================
--- features/src/main/javascript/features/rpc/rpc.js	(revision 887018)
+++ features/src/main/javascript/features/rpc/rpc.js	(working copy)
@@ -530,11 +530,6 @@
      }
    }

-  // gadgets.config might not be available, such as when serving container  
js.
-  if (isChild) {
-    setupReceiver('..');
-  }
-
    return /** @scope gadgets.rpc */ {
      /**
       * Registers an RPC service.
@@ -817,6 +812,9 @@
        if (transport.init(process, transportReady) === false) {
          transport = fallbackTransport;
        }
+      if (isChild) {
+        setupReceiver('..');
+      }
      },

      /** Returns the window keyed by the ID. null/".." for parent, else  
child */




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Make rpc.js window.frames code more robust (issue166046)</title>
<author><name>lindner@inuus.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c0016e68f9e9255eb250479dc56c2@google.com%3e"/>
<id>urn:uuid:%3c0016e68f9e9255eb250479dc56c2@google-com%3e</id>
<updated>2009-12-04T00:39:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 2009/12/04 00:36:09, johnfargo wrote:
&gt; @Paul, sgtm. Style update.

great, ship it!


http://codereview.appspot.com/166046


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: svn commit: r886897 - in /incubator/shindig/trunk/java/gadgets/src:	main/java/org/apache/shindig/gadgets/parse/nekohtml/ test/java/org/apache/shindig/gadgets/parse/	test/resources/org/apache/shindig/gadgets/parse/nekohtml/</title>
<author><name>John Hjelmstad &lt;fargo@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cab5e78ed0912031638n6242f722j4975a6005c280184@mail.gmail.com%3e"/>
<id>urn:uuid:%3cab5e78ed0912031638n6242f722j4975a6005c280184@mail-gmail-com%3e</id>
<updated>2009-12-04T00:38:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Good find, thanks -- updated w/ comment and put a watch on it.

On Thu, Dec 3, 2009 at 4:35 PM, Paul Lindner &lt;lindner@inuus.com&gt; wrote:

&gt; https://issues.apache.org/jira/browse/SHINDIG-1234 ?
&gt;
&gt;
&gt; On Thu, Dec 3, 2009 at 12:12 PM, John Hjelmstad &lt;fargo@google.com&gt; wrote:
&gt;
&gt; &gt; Possible, though on a search I don't see any obvious candidates offhand?
&gt; &gt;
&gt; &gt; On Thu, Dec 3, 2009 at 12:09 PM, Paul Lindner &lt;lindner@inuus.com&gt; wrote:
&gt; &gt;
&gt; &gt; &gt; Isn't this related to a JIRA issue recently filed?
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; On Thu, Dec 3, 2009 at 11:50 AM, &lt;johnh@apache.org&gt; wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; Author: johnh
&gt; &gt; &gt; &gt; Date: Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; &gt; New Revision: 886897
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; URL: http://svn.apache.org/viewvc?rev=886897&amp;view=rev
&gt; &gt; &gt; &gt; Log:
&gt; &gt; &gt; &gt; Don't invert the order of script blocks added to body.
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Modified:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Modified:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt; &gt; URL:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; &gt; ---
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt; &gt; (original)
&gt; &gt; &gt; &gt; +++
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; &gt; @@ -210,6 +210,7 @@
&gt; &gt; &gt; &gt;       Node headScript = headScripts.pop();
&gt; &gt; &gt; &gt;       head.removeChild(headScript);
&gt; &gt; &gt; &gt;       body.insertBefore(headScript, bodyFirst);
&gt; &gt; &gt; &gt; +      bodyFirst = headScript;
&gt; &gt; &gt; &gt;     }
&gt; &gt; &gt; &gt;   }
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Modified:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt; &gt; URL:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; &gt; ---
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt; &gt; (original)
&gt; &gt; &gt; &gt; +++
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; &gt; @@ -44,6 +44,6 @@
&gt; &gt; &gt; &gt;       throws Exception {
&gt; &gt; &gt; &gt;     Document document = parser.parseDom(content);
&gt; &gt; &gt; &gt;     expected = StringUtils.replace(expected, EOL, "\n");
&gt; &gt; &gt; &gt; -    assertEquals(expected, HtmlSerialization.serialize(document));
&gt; &gt; &gt; &gt; +    assertEquals(expected.trim(),
&gt; &gt; &gt; &gt; HtmlSerialization.serialize(document).trim());
&gt; &gt; &gt; &gt;   }
&gt; &gt; &gt; &gt;  }
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Modified:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt; &gt; URL:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; &gt; ---
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt; &gt; (original)
&gt; &gt; &gt; &gt; +++
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; &gt; @@ -3,4 +3,5 @@
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;  &lt;link rel="linkrel"&gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; -&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;div
&gt; &gt; &gt; &gt; id="mydiv"&gt;mycontent&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
&gt; &gt; &gt; &gt; \ No newline at end of file
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; +&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;div
&gt; &gt; &gt; &gt; id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; &gt; &gt; +&lt;/body&gt;&lt;/html&gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Modified:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt; &gt; URL:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; &gt; ---
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt; &gt; (original)
&gt; &gt; &gt; &gt; +++
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; &gt; @@ -3,4 +3,4 @@
&gt; &gt; &gt; &gt;  &lt;script&gt;foo2();&lt;/script&gt;
&gt; &gt; &gt; &gt;  &lt;link rel="linkrel"/&gt;
&gt; &gt; &gt; &gt;  &lt;script&gt;foo3();&lt;/script&gt;
&gt; &gt; &gt; &gt; -&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; &gt; &gt; \ No newline at end of file
&gt; &gt; &gt; &gt; +&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Make rpc.js window.frames code more robust (issue166046)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c001485f9124a4bbd480479dc4bba@google.com%3e"/>
<id>urn:uuid:%3c001485f9124a4bbd480479dc4bba@google-com%3e</id>
<updated>2009-12-04T00:36:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
@Paul, sgtm. Style update.

http://codereview.appspot.com/166046


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: svn commit: r886897 - in /incubator/shindig/trunk/java/gadgets/src:	main/java/org/apache/shindig/gadgets/parse/nekohtml/ test/java/org/apache/shindig/gadgets/parse/	test/resources/org/apache/shindig/gadgets/parse/nekohtml/</title>
<author><name>Paul Lindner &lt;lindner@inuus.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cb71cdca90912031635o59b56e67m2b5924cd71d1afdd@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb71cdca90912031635o59b56e67m2b5924cd71d1afdd@mail-gmail-com%3e</id>
<updated>2009-12-04T00:35:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/jira/browse/SHINDIG-1234 ?


On Thu, Dec 3, 2009 at 12:12 PM, John Hjelmstad &lt;fargo@google.com&gt; wrote:

&gt; Possible, though on a search I don't see any obvious candidates offhand?
&gt;
&gt; On Thu, Dec 3, 2009 at 12:09 PM, Paul Lindner &lt;lindner@inuus.com&gt; wrote:
&gt;
&gt; &gt; Isn't this related to a JIRA issue recently filed?
&gt; &gt;
&gt; &gt;
&gt; &gt; On Thu, Dec 3, 2009 at 11:50 AM, &lt;johnh@apache.org&gt; wrote:
&gt; &gt;
&gt; &gt; &gt; Author: johnh
&gt; &gt; &gt; Date: Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; New Revision: 886897
&gt; &gt; &gt;
&gt; &gt; &gt; URL: http://svn.apache.org/viewvc?rev=886897&amp;view=rev
&gt; &gt; &gt; Log:
&gt; &gt; &gt; Don't invert the order of script blocks added to body.
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; Modified:
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt;
&gt; &gt; &gt; Modified:
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt; URL:
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; ---
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt; (original)
&gt; &gt; &gt; +++
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; @@ -210,6 +210,7 @@
&gt; &gt; &gt;       Node headScript = headScripts.pop();
&gt; &gt; &gt;       head.removeChild(headScript);
&gt; &gt; &gt;       body.insertBefore(headScript, bodyFirst);
&gt; &gt; &gt; +      bodyFirst = headScript;
&gt; &gt; &gt;     }
&gt; &gt; &gt;   }
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; Modified:
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt; URL:
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; ---
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt; (original)
&gt; &gt; &gt; +++
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; @@ -44,6 +44,6 @@
&gt; &gt; &gt;       throws Exception {
&gt; &gt; &gt;     Document document = parser.parseDom(content);
&gt; &gt; &gt;     expected = StringUtils.replace(expected, EOL, "\n");
&gt; &gt; &gt; -    assertEquals(expected, HtmlSerialization.serialize(document));
&gt; &gt; &gt; +    assertEquals(expected.trim(),
&gt; &gt; &gt; HtmlSerialization.serialize(document).trim());
&gt; &gt; &gt;   }
&gt; &gt; &gt;  }
&gt; &gt; &gt;
&gt; &gt; &gt; Modified:
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt; URL:
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; ---
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt; (original)
&gt; &gt; &gt; +++
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; @@ -3,4 +3,5 @@
&gt; &gt; &gt;
&gt; &gt; &gt;  &lt;link rel="linkrel"&gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; -&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;div
&gt; &gt; &gt; id="mydiv"&gt;mycontent&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
&gt; &gt; &gt; \ No newline at end of file
&gt; &gt; &gt;
&gt; &gt;
&gt; +&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;div
&gt; &gt; &gt; id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; &gt; +&lt;/body&gt;&lt;/html&gt;
&gt; &gt; &gt;
&gt; &gt; &gt; Modified:
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt; URL:
&gt; &gt; &gt;
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; &gt; ---
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt; (original)
&gt; &gt; &gt; +++
&gt; &gt; &gt;
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; &gt; @@ -3,4 +3,4 @@
&gt; &gt; &gt;  &lt;script&gt;foo2();&lt;/script&gt;
&gt; &gt; &gt;  &lt;link rel="linkrel"/&gt;
&gt; &gt; &gt;  &lt;script&gt;foo3();&lt;/script&gt;
&gt; &gt; &gt; -&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; &gt; \ No newline at end of file
&gt; &gt; &gt; +&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Make rpc.js window.frames code more robust (issue166046)</title>
<author><name>lindner@inuus.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c001636ed71ef8cb47e0479dbb824@google.com%3e"/>
<id>urn:uuid:%3c001636ed71ef8cb47e0479dbb824@google-com%3e</id>
<updated>2009-12-03T23:55:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
lgtm other than the style issue.


http://codereview.appspot.com/166046/diff/7/1007
File features/src/main/javascript/features/rpc/rpc.js (left):

http://codereview.appspot.com/166046/diff/7/1007#oldcode297
features/src/main/javascript/features/rpc/rpc.js:297:
Since this is an internal routine we might want to make this
_getTargetWin

http://codereview.appspot.com/166046


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Make rpc.js window.frames code more robust (issue166046)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c0016368e2ebfc66ec30479db04ac@google.com%3e"/>
<id>urn:uuid:%3c0016368e2ebfc66ec30479db04ac@google-com%3e</id>
<updated>2009-12-03T23:04:51Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Old patch accidentally uploaded. Fixed (correctly this time).

http://codereview.appspot.com/166046


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Make rpc.js window.frames code more robust (issue166046)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c0016e68fd0adc0d8ee0479db02b7@google.com%3e"/>
<id>urn:uuid:%3c0016e68fd0adc0d8ee0479db02b7@google-com%3e</id>
<updated>2009-12-03T23:04:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Old patch accidentally uploaded. fixed.

http://codereview.appspot.com/166046


</pre>
</div>
</content>
</entry>
<entry>
<title>Make rpc.js window.frames code more robust (issue166046)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c0016e68fd0ad7b7bcf0479daff93@google.com%3e"/>
<id>urn:uuid:%3c0016e68fd0ad7b7bcf0479daff93@google-com%3e</id>
<updated>2009-12-03T23:03:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Reviewers: shindig.remailer_gmail.com,

Description:
Turns out IE8 treats this as an Array access rather than Object/Map:
window.frames["1234"]

This caused gadgets.rpc to break when the frame name consists only of
isDigit characters.

I propose this patch as a way of centralizing the targetWindow retrieval
mechanism for rpc. It also tries falling back to
document.getElementById(...) if a window.frames find doesn't work.

Comments welcome.

Please review this at http://codereview.appspot.com/166046

Affected files:
   features/src/main/javascript/features/rpc/rmr.transport.js
   features/src/main/javascript/features/rpc/rpc.js
   features/src/main/javascript/features/rpc/wpm.transport.js


Index: features/src/main/javascript/features/rpc/rpc.js
===================================================================
--- features/src/main/javascript/features/rpc/rpc.js	(revision 886897)
+++ features/src/main/javascript/features/rpc/rpc.js	(working copy)
@@ -295,6 +295,30 @@
      return protocol + "://" + host + portStr;
    }

+  function getTargetWindow(id) {
+    if (typeof id === "undefined" ||
+        id === "..") {
+      return window.parent;
+    }
+
+    // Cast to a String to avoid an index lookup.
+    id = String(id);
+
+    // Try window.frames first
+    var target = window.frames[id];
+    if (target) {
+      return target;
+    }
+
+    // Fall back to getElementById()
+    target = document.getElementById(id);
+    if (target &amp;&amp; target.contentWindow) {
+      return target.contentWindow;
+    }
+
+    return null;
+  }
+
    // Pick the most efficient RPC relay mechanism.
    var transport = getTransport();

@@ -369,12 +393,7 @@
          return false;
        }

-      var targetEl = null;
-      if (target === '..') {
-        targetEl = window.parent;
-      } else {
-        targetEl = window.frames[target];
-      }
+      var targetEl = getTargetWin(target);
        try {
          // If this succeeds, then same-domain policy applied
          sameDomain[target] = targetEl.gadgets.rpc.receiveSameDomain;
@@ -800,6 +819,9 @@
        }
      },

+    /** Returns the window keyed by the ID. null/".." for parent, else  
child */
+    getTargetWindow: getTargetWindow,
+
      /** Exported constant, for use by transports only. */
      ACK: ACK,

Index: features/src/main/javascript/features/rpc/rmr.transport.js
===================================================================
--- features/src/main/javascript/features/rpc/rmr.transport.js	(revision  
886897)
+++ features/src/main/javascript/features/rpc/rmr.transport.js	(working  
copy)
@@ -195,12 +195,13 @@
      rmr_channels[frameId].searchCounter++;

      try {
+      var targetWin = gadgets.rpc.getTargetWin(frameId);
        if (frameId === '..') {
          // We are a gadget.
-        channelWindow = window.parent.frames['rmrtransport-' +  
gadgets.rpc.RPC_ID];
+        channelWindow = targetWin.frames['rmrtransport-' +  
gadgets.rpc.RPC_ID];
        } else {
          // We are a container.
-        channelWindow = window.frames[frameId].frames['rmrtransport-..'];
+        channelWindow = targetWin.frames['rmrtransport-..'];
        }
      } catch (e) {
        // Just in case; may happen when relay is set to about:blank or  
unset.
Index: features/src/main/javascript/features/rpc/wpm.transport.js
===================================================================
--- features/src/main/javascript/features/rpc/wpm.transport.js	(revision  
886897)
+++ features/src/main/javascript/features/rpc/wpm.transport.js	(working  
copy)
@@ -81,7 +81,7 @@
      },

      call: function(targetId, from, rpc) {
-      var targetWin = targetId === '..' ? window.parent :  
window.frames[targetId];
+      var targetWin = gadgets.rpc.getTargetWin(targetId);
        // targetOrigin = canonicalized relay URL
        var origRelay = gadgets.rpc.getRelayUrl(targetId) ||
                        gadgets.util.getUrlParameters()["parent"];




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Prevent NullPointer exception (issue164080)</title>
<author><name>johnfargo@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c0016367d55177c557a0479d90ecb@google.com%3e"/>
<id>urn:uuid:%3c0016367d55177c557a0479d90ecb@google-com%3e</id>
<updated>2009-12-03T20:44:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Looks great Ziv - patch committed, thanks!

http://codereview.appspot.com/164080


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: svn commit: r886897 - in /incubator/shindig/trunk/java/gadgets/src:	main/java/org/apache/shindig/gadgets/parse/nekohtml/ test/java/org/apache/shindig/gadgets/parse/	test/resources/org/apache/shindig/gadgets/parse/nekohtml/</title>
<author><name>John Hjelmstad &lt;fargo@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cab5e78ed0912031212q10dfa6f8i93800aba305cdde1@mail.gmail.com%3e"/>
<id>urn:uuid:%3cab5e78ed0912031212q10dfa6f8i93800aba305cdde1@mail-gmail-com%3e</id>
<updated>2009-12-03T20:12:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Possible, though on a search I don't see any obvious candidates offhand?

On Thu, Dec 3, 2009 at 12:09 PM, Paul Lindner &lt;lindner@inuus.com&gt; wrote:

&gt; Isn't this related to a JIRA issue recently filed?
&gt;
&gt;
&gt; On Thu, Dec 3, 2009 at 11:50 AM, &lt;johnh@apache.org&gt; wrote:
&gt;
&gt; &gt; Author: johnh
&gt; &gt; Date: Thu Dec  3 19:50:22 2009
&gt; &gt; New Revision: 886897
&gt; &gt;
&gt; &gt; URL: http://svn.apache.org/viewvc?rev=886897&amp;view=rev
&gt; &gt; Log:
&gt; &gt; Don't invert the order of script blocks added to body.
&gt; &gt;
&gt; &gt;
&gt; &gt; Modified:
&gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt;
&gt; &gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt;
&gt; &gt; Modified:
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; URL:
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; ---
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; (original)
&gt; &gt; +++
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; @@ -210,6 +210,7 @@
&gt; &gt;       Node headScript = headScripts.pop();
&gt; &gt;       head.removeChild(headScript);
&gt; &gt;       body.insertBefore(headScript, bodyFirst);
&gt; &gt; +      bodyFirst = headScript;
&gt; &gt;     }
&gt; &gt;   }
&gt; &gt;
&gt; &gt;
&gt; &gt; Modified:
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; URL:
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; ---
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; (original)
&gt; &gt; +++
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; @@ -44,6 +44,6 @@
&gt; &gt;       throws Exception {
&gt; &gt;     Document document = parser.parseDom(content);
&gt; &gt;     expected = StringUtils.replace(expected, EOL, "\n");
&gt; &gt; -    assertEquals(expected, HtmlSerialization.serialize(document));
&gt; &gt; +    assertEquals(expected.trim(),
&gt; &gt; HtmlSerialization.serialize(document).trim());
&gt; &gt;   }
&gt; &gt;  }
&gt; &gt;
&gt; &gt; Modified:
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; URL:
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; ---
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; (original)
&gt; &gt; +++
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; @@ -3,4 +3,5 @@
&gt; &gt;
&gt; &gt;  &lt;link rel="linkrel"&gt;
&gt; &gt;
&gt; &gt;
&gt; -&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;div
&gt; &gt; id="mydiv"&gt;mycontent&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
&gt; &gt; \ No newline at end of file
&gt; &gt;
&gt; +&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;div
&gt; &gt; id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; +&lt;/body&gt;&lt;/html&gt;
&gt; &gt;
&gt; &gt; Modified:
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; URL:
&gt; &gt;
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt; &gt;
&gt; &gt;
&gt; ==============================================================================
&gt; &gt; ---
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; (original)
&gt; &gt; +++
&gt; &gt;
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; &gt; Thu Dec  3 19:50:22 2009
&gt; &gt; @@ -3,4 +3,4 @@
&gt; &gt;  &lt;script&gt;foo2();&lt;/script&gt;
&gt; &gt;  &lt;link rel="linkrel"/&gt;
&gt; &gt;  &lt;script&gt;foo3();&lt;/script&gt;
&gt; &gt; -&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt; \ No newline at end of file
&gt; &gt; +&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: svn commit: r886897 - in /incubator/shindig/trunk/java/gadgets/src:	main/java/org/apache/shindig/gadgets/parse/nekohtml/ test/java/org/apache/shindig/gadgets/parse/	test/resources/org/apache/shindig/gadgets/parse/nekohtml/</title>
<author><name>Paul Lindner &lt;lindner@inuus.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cb71cdca90912031209j5ab31c5euc1a05a02a90baff8@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb71cdca90912031209j5ab31c5euc1a05a02a90baff8@mail-gmail-com%3e</id>
<updated>2009-12-03T20:09:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Isn't this related to a JIRA issue recently filed?


On Thu, Dec 3, 2009 at 11:50 AM, &lt;johnh@apache.org&gt; wrote:

&gt; Author: johnh
&gt; Date: Thu Dec  3 19:50:22 2009
&gt; New Revision: 886897
&gt;
&gt; URL: http://svn.apache.org/viewvc?rev=886897&amp;view=rev
&gt; Log:
&gt; Don't invert the order of script blocks added to body.
&gt;
&gt;
&gt; Modified:
&gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt;
&gt;  incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt;
&gt; Modified:
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; URL:
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt;
&gt; ==============================================================================
&gt; ---
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; (original)
&gt; +++
&gt; incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/nekohtml/NekoSimplifiedHtmlParser.java
&gt; Thu Dec  3 19:50:22 2009
&gt; @@ -210,6 +210,7 @@
&gt;       Node headScript = headScripts.pop();
&gt;       head.removeChild(headScript);
&gt;       body.insertBefore(headScript, bodyFirst);
&gt; +      bodyFirst = headScript;
&gt;     }
&gt;   }
&gt;
&gt;
&gt; Modified:
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; URL:
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt;
&gt; ==============================================================================
&gt; ---
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; (original)
&gt; +++
&gt; incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/AbstractParserAndSerializerTest.java
&gt; Thu Dec  3 19:50:22 2009
&gt; @@ -44,6 +44,6 @@
&gt;       throws Exception {
&gt;     Document document = parser.parseDom(content);
&gt;     expected = StringUtils.replace(expected, EOL, "\n");
&gt; -    assertEquals(expected, HtmlSerialization.serialize(document));
&gt; +    assertEquals(expected.trim(),
&gt; HtmlSerialization.serialize(document).trim());
&gt;   }
&gt;  }
&gt;
&gt; Modified:
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; URL:
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt;
&gt; ==============================================================================
&gt; ---
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; (original)
&gt; +++
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript-expected.html
&gt; Thu Dec  3 19:50:22 2009
&gt; @@ -3,4 +3,5 @@
&gt;
&gt;  &lt;link rel="linkrel"&gt;
&gt;
&gt; -&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;div
&gt; id="mydiv"&gt;mycontent&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
&gt; \ No newline at end of file
&gt; +&lt;/head&gt;&lt;body&gt;&lt;script&gt;foo1();&lt;/script&gt;&lt;script&gt;foo2();&lt;/script&gt;&lt;script&gt;foo3();&lt;/script&gt;&lt;div
&gt; id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; +&lt;/body&gt;&lt;/html&gt;
&gt;
&gt; Modified:
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; URL:
&gt; http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html?rev=886897&amp;r1=886896&amp;r2=886897&amp;view=diff
&gt;
&gt; ==============================================================================
&gt; ---
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; (original)
&gt; +++
&gt; incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-leadingscript.html
&gt; Thu Dec  3 19:50:22 2009
&gt; @@ -3,4 +3,4 @@
&gt;  &lt;script&gt;foo2();&lt;/script&gt;
&gt;  &lt;link rel="linkrel"/&gt;
&gt;  &lt;script&gt;foo3();&lt;/script&gt;
&gt; -&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt; \ No newline at end of file
&gt; +&lt;div id="mydiv"&gt;mycontent&lt;/div&gt;
&gt;
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Locked Domain</title>
<author><name>jss9920 &lt;jss9920@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3ca2c628990912030655o351d483fg9ef0b921260215aa@mail.gmail.com%3e"/>
<id>urn:uuid:%3ca2c628990912030655o351d483fg9ef0b921260215aa@mail-gmail-com%3e</id>
<updated>2009-12-03T14:55:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I would like to start rendering my gadgets on unique locked domains but am
getting a bit confused about where to start...

Since the container generates the gadget iframe urls, it would seem that
implementing locked domain would be a container side affair, but I see
configuration options for locked domain support in the shindig container.js
file and I also see associated Java classes that do a lot of locked domain
work in the Shindig codebase (Java Shindig 1.0 release)...

So is there actually work that needs to be done on both the container side
and the Shindig side to enable locked domain gadgets?

Any pointers on how to get started (even high level) would be helpful and
much appreciated.

Thanks!


</pre>
</div>
</content>
</entry>
<entry>
<title>Reducing amount of JS for CONTAINER context</title>
<author><name>&quot;Weygandt, Jon&quot; &lt;jweygandt@ebay.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cA4CC0718BF5AB24C85ED0B6F3E8982E3121E6F13@DEN-EXM-05.corp.ebay.com%3e"/>
<id>urn:uuid:%3cA4CC0718BF5AB24C85ED0B6F3E8982E3121E6F13@DEN-EXM-05-corp-ebay-com%3e</id>
<updated>2009-12-03T00:10:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Just browsing the feature files, and noticed that there is container
side content for: core.io and core.util, yet I don't see any obvious
calls being made to these. Does anyone know why they are present?
Perhaps we could remove them?
 
Thanks,
Jon


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Next step towards URL gadgets - design proposal</title>
<author><name>&quot;Weygandt, Jon&quot; &lt;jweygandt@ebay.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cA4CC0718BF5AB24C85ED0B6F3E8982E3121E6A72@DEN-EXM-05.corp.ebay.com%3e"/>
<id>urn:uuid:%3cA4CC0718BF5AB24C85ED0B6F3E8982E3121E6A72@DEN-EXM-05-corp-ebay-com%3e</id>
<updated>2009-12-02T18:37:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The concept of having a framework (e.g. OpenSocial Gadgets) that allows
developers to embed a custom application into a page, whether HTML
gadget or URL "thing" is very valuable. The URL "thing" should interact
with the page the way HTML gadgets do, but the style of application
development is very different.

I'm open to Randy's comments on what to call them, or how to position
them for the community. Somewhere I remember Google's initial position
on URL gadgets as a way to quickly port an existing application into the
gadget framework.

Just to correct a few things from the specifics of Java API:

- RPC should be able to work both ways, ifpc with RpcRelay file is one
pain, but ifpc is fading away. Not to mention that 2-way rpc may be
little used till pubsub comes back in its full glory and by that time
ifpc will not be an issue.

- up_xxx should work fine. But unlike HTML gadgets using Prefs(), URL
gadgets simply get the query parameters server side.

- view parameters (from requestNavigateTo()), well that's not part of
the OpenSocial specification - but a spec update is all that's needed.

- Yes, makeRequest, templating, pipelining, preloading, etc... All don't
work, but that's the "very different" style of development that URL
gadget authors face. 

- Remember all OpenSocial data is available via REST and RPC calls.

- Feature parameters - not sure where Shindig uses that? 

- Container config - another issue - that will be handled by the new
RenderContext==URLGADGET, and the JsServlet will generate the proper
code. This is the equivalent of the RenderingGadgetRewriter inject
methods. This is one of the areas where there are issues, and my
thoughts are that we inject only what is invariant wrt user parameters. 

-----Original Message-----
From: Randy Hudson [mailto:hudsonr@us.ibm.com] 
Sent: Wednesday, December 02, 2009 9:02 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

Are URL "gadgets" even gadgets?  They seem to have the following
gaps/limitations:

 - Even though they are given a URL from which to fetch javascript, most
of the javascript won't function
 - RPC only works in one direction (?)
 - makeRequest, proxying, appdata, etc. are all broken
 - Templating and markup aren't supported
 - Data pipelining isn't supported
 - Preloading resources isn't supported
 - Providing userprefs or messages as URL params doesn't really work
 - View parameters, Feature parameters aren't available

I find it confusing that these "embedded pages" are called gadgets, when
often they are little more than a bookmark to some external site (like
twitter), typically having little interaction with the site in which
they appear.

I like Jon's suggestion of scoping URL gadgets to some very small API
(perhaps just being able to update the "chrome", requesting to be
maximized, etc.).  Maybe it would help to start calling these things
something other than Gadgets?  Otherwise, there's this subliminal force
telling us to provide two different ways of doing everything, often when
one way is enough (e.g. Jon's reference to message bundles).

--Randy Hudson



From:
"Weygandt, Jon" &lt;jweygandt@ebay.com&gt;
To:
&lt;shindig-dev@incubator.apache.org&gt;
Date:
12/01/2009 11:31 AM
Subject:
RE: Next step towards URL gadgets - design proposal



Just so that it is known, more on the design: I'm taking liberty in
defining "URL gadget JS API" based on:

*) Shindig does not support anything today.
*) Very few actual server implementations for URL gadgets exist
*) Our experience with URL gadgets. Our implementation has quite a few
URL gadgets, but the implementation is propriety
*) You cannot support cross domain XMLHttpRequests - no makeRequest
etc...

Just to go a bit further...

Just about every URL gadget author will have a multi-page URL gadget.
That is one which the location URL changes over time. That's just the
typical pattern for these type of applications. We must make the
interface work for them, and be relatively easy for them to implement.

I believe that full API support using libs, would require either:
*) A really long lib URL
*) Maintenance of session state on the server
*) A complex calling procedure
None of the above are really good. 

But if we narrow down the scope of the API to simply what cannot be
replaced by typical URL server side code, it then becomes easier. 

For an example, think about how one would do message bundles
Prefs.getMsg? (These need user prefs for hangman substitution) Then
think, does a URL gadget developer even need this? (They don't, I18N is
done differently for URL apps)

Jon

-----Original Message-----
From: Weygandt, Jon [mailto:jweygandt@ebay.com]
Sent: Tuesday, December 01, 2009 8:14 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

The URL to the gadget developers server will have up_xxx parameters for
them to access the parameters.

As to "setprefs", these are done through rpc. Rpc will be supported,
just like it is today - that is there will be an rpctoken on the URL
(presumably the fragment portion). This rpctoken is used to validate
themselves to the container.

Handling of the rpctoken, and initial processing of the rpc call, is
container side JS - independent of HTML or URL gadgets. Ultimate
handling of the setpref service call is that of the container, which is
NOT anything Shindig code is responsible for.

I predict the JS code inside of the URL gadget (that which comes from
the "libs" parameter) will be very similar to existing code. Generally I
will remove calls that are not within the narrow specification for "URL
gadget JS API". 

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com]
Sent: Tuesday, December 01, 2009 8:03 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

Perhaps I misunderstood your statement, but your Design Requirement 2
states:

&lt;quote&gt;
2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters...
&lt;/quote&gt;

If you're talking about the setpref feature, will the user have to pass
session ID and some application-specific preferences as URL parameters?
I thought it wouldn't be secure.


 

  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;

 

  To:         &lt;shindig-dev@incubator.apache.org&gt;

 

  Date:       12/01/2009 09:53 AM

 

  Subject:    RE: Next step towards URL gadgets - design proposal

 






Not sure what you mean by "server side accessing of URL parameters"?

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com]
Sent: Tuesday, December 01, 2009 7:47 AM
To: shindig-dev@incubator.apache.org
Subject: Re: Next step towards URL gadgets - design proposal

The ability to handle URL gadgets "out of the box" is critical if we
want Shindig to become an enterprise asset, so I applaud the effort.
This said, does anyone have plans to address how URL gadgets will work
in a secure environment? I don't think " server side accessing of URL
parameters" plays very well here. The scenario is further complicated by
the fact that Shindig will frequently be used as a "service" rather than
co-hosted with the application. Would be interesting to hear how people
address these needs or if there are any plans to solve this once and for
all in Shindig.

Thanks,
Ilya




  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;



  To:         &lt;shindig-dev@incubator.apache.org&gt;



  Date:       11/25/2009 01:52 PM



  Subject:    Next step towards URL gadgets - design proposal








A proposal for review and comment...

I would like to implement section 3.1.3(6)(c)
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadget
s-API-Specification.html#process. This will not be a complete
implementation for URL gadgets, but takes Shindig one step closer to the
specification, and will provide a platform for which server implementers
can experiment with URL functionality.

Design requirements:
================
1) URL gadget developers require features that they cannot easily
replace, such as rpc, dynamic-height, set-title, views, etc...

2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters

3) Same origin policy makes implementing makeRequest, dataRequest
impractical
     *) Server side calls to REST and RPC APIs are the alternative

Design proposal
=============
libs parameter
This will be a variant of the /gadgets/js/rpc.js. It will fetch the
URL-Gadget-Side JS necessary.

Feature libraries, JS Servlet, Rendering Context To support a reduced
set of JavaScript, and maybe even a different set of JS the changes will
start with introducing a new RenderingContext.URLGADGET. "c=2" for the
JSServlet. Down to the feature.xml file having a new tag &lt;urlgadget&gt;

Some of the individual feature JS may be split apart to support
inclusion in gadget context separately from urlgadget context.

Currently the rendering does a redirect as part of the ifr call. I will
also introduce an option into shindig.properties, whereby the metadata
call will return the external URL as part of iframeurl, instead of the
ifr url with a redirect.

Open Issues
==========
The spec does not address how one determines the "servers JavaScript
request handler path". I don't propose to address this as part of this
effort, since few containers will actually support URL gadgets, the
developer will pretty much know who they are targeting.

The issue of the gadget developer putting "foreign" JavaScript on their
page introduces cross site scripting concerns for them. This is also
beyond the scope of this patch, but would probably be addressed by
signing the request and developers whitelisting the servers that they
support.

Comments
=========
I would be doing the changes to the Java side of Shindig.

As to the additional tag in features.xml with respect to PHP, it appears
the PHP code (GadgetFeatureResigtry.php) is similar to the Java side, it
will simply ignore the new tag.



---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------




---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------




</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Next step towards URL gadgets - design proposal</title>
<author><name>Randy Hudson &lt;hudsonr@us.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cOFEBA78903.94EF2E16-ON85257680.0058DE5D-85257680.005D92A3@us.ibm.com%3e"/>
<id>urn:uuid:%3cOFEBA78903-94EF2E16-ON85257680-0058DE5D-85257680-005D92A3@us-ibm-com%3e</id>
<updated>2009-12-02T17:02:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Are URL "gadgets" even gadgets?  They seem to have the following 
gaps/limitations:

 - Even though they are given a URL from which to fetch javascript, most 
of the javascript won't function
 - RPC only works in one direction (?)
 - makeRequest, proxying, appdata, etc. are all broken
 - Templating and markup aren't supported
 - Data pipelining isn't supported
 - Preloading resources isn't supported
 - Providing userprefs or messages as URL params doesn't really work
 - View parameters, Feature parameters aren't available

I find it confusing that these "embedded pages" are called gadgets, when 
often they are little more than a bookmark to some external site (like 
twitter), typically having little interaction with the site in which they 
appear.

I like Jon's suggestion of scoping URL gadgets to some very small API 
(perhaps just being able to update the "chrome", requesting to be 
maximized, etc.).  Maybe it would help to start calling these things 
something other than Gadgets?  Otherwise, there's this subliminal force 
telling us to provide two different ways of doing everything, often when 
one way is enough (e.g. Jon's reference to message bundles).

--Randy Hudson



From:
"Weygandt, Jon" &lt;jweygandt@ebay.com&gt;
To:
&lt;shindig-dev@incubator.apache.org&gt;
Date:
12/01/2009 11:31 AM
Subject:
RE: Next step towards URL gadgets - design proposal



Just so that it is known, more on the design: I'm taking liberty in
defining "URL gadget JS API" based on:

*) Shindig does not support anything today.
*) Very few actual server implementations for URL gadgets exist
*) Our experience with URL gadgets. Our implementation has quite a few
URL gadgets, but the implementation is propriety
*) You cannot support cross domain XMLHttpRequests - no makeRequest
etc...

Just to go a bit further...

Just about every URL gadget author will have a multi-page URL gadget.
That is one which the location URL changes over time. That's just the
typical pattern for these type of applications. We must make the
interface work for them, and be relatively easy for them to implement.

I believe that full API support using libs, would require either:
*) A really long lib URL
*) Maintenance of session state on the server
*) A complex calling procedure
None of the above are really good. 

But if we narrow down the scope of the API to simply what cannot be
replaced by typical URL server side code, it then becomes easier. 

For an example, think about how one would do message bundles
Prefs.getMsg? (These need user prefs for hangman substitution)
Then think, does a URL gadget developer even need this? (They don't,
I18N is done differently for URL apps)

Jon

-----Original Message-----
From: Weygandt, Jon [mailto:jweygandt@ebay.com] 
Sent: Tuesday, December 01, 2009 8:14 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

The URL to the gadget developers server will have up_xxx parameters for
them to access the parameters.

As to "setprefs", these are done through rpc. Rpc will be supported,
just like it is today - that is there will be an rpctoken on the URL
(presumably the fragment portion). This rpctoken is used to validate
themselves to the container.

Handling of the rpctoken, and initial processing of the rpc call, is
container side JS - independent of HTML or URL gadgets. Ultimate
handling of the setpref service call is that of the container, which is
NOT anything Shindig code is responsible for.

I predict the JS code inside of the URL gadget (that which comes from
the "libs" parameter) will be very similar to existing code. Generally I
will remove calls that are not within the narrow specification for "URL
gadget JS API". 

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com]
Sent: Tuesday, December 01, 2009 8:03 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

Perhaps I misunderstood your statement, but your Design Requirement 2
states:

&lt;quote&gt;
2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters...
&lt;/quote&gt;

If you're talking about the setpref feature, will the user have to pass
session ID and some application-specific preferences as URL parameters?
I thought it wouldn't be secure.


 

  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;

 

  To:         &lt;shindig-dev@incubator.apache.org&gt;

 

  Date:       12/01/2009 09:53 AM

 

  Subject:    RE: Next step towards URL gadgets - design proposal

 






Not sure what you mean by "server side accessing of URL parameters"?

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com]
Sent: Tuesday, December 01, 2009 7:47 AM
To: shindig-dev@incubator.apache.org
Subject: Re: Next step towards URL gadgets - design proposal

The ability to handle URL gadgets "out of the box" is critical if we
want Shindig to become an enterprise asset, so I applaud the effort.
This said, does anyone have plans to address how URL gadgets will work
in a secure environment? I don't think " server side accessing of URL
parameters" plays very well here. The scenario is further complicated by
the fact that Shindig will frequently be used as a "service" rather than
co-hosted with the application. Would be interesting to hear how people
address these needs or if there are any plans to solve this once and for
all in Shindig.

Thanks,
Ilya




  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;



  To:         &lt;shindig-dev@incubator.apache.org&gt;



  Date:       11/25/2009 01:52 PM



  Subject:    Next step towards URL gadgets - design proposal








A proposal for review and comment...

I would like to implement section 3.1.3(6)(c)
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadget
s-API-Specification.html#process. This will not be a complete
implementation for URL gadgets, but takes Shindig one step closer to the
specification, and will provide a platform for which server implementers
can experiment with URL functionality.

Design requirements:
================
1) URL gadget developers require features that they cannot easily
replace, such as rpc, dynamic-height, set-title, views, etc...

2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters

3) Same origin policy makes implementing makeRequest, dataRequest
impractical
     *) Server side calls to REST and RPC APIs are the alternative

Design proposal
=============
libs parameter
This will be a variant of the /gadgets/js/rpc.js. It will fetch the
URL-Gadget-Side JS necessary.

Feature libraries, JS Servlet, Rendering Context To support a reduced
set of JavaScript, and maybe even a different set of JS the changes will
start with introducing a new RenderingContext.URLGADGET. "c=2" for the
JSServlet. Down to the feature.xml file having a new tag &lt;urlgadget&gt;

Some of the individual feature JS may be split apart to support
inclusion in gadget context separately from urlgadget context.

Currently the rendering does a redirect as part of the ifr call. I will
also introduce an option into shindig.properties, whereby the metadata
call will return the external URL as part of iframeurl, instead of the
ifr url with a redirect.

Open Issues
==========
The spec does not address how one determines the "servers JavaScript
request handler path". I don't propose to address this as part of this
effort, since few containers will actually support URL gadgets, the
developer will pretty much know who they are targeting.

The issue of the gadget developer putting "foreign" JavaScript on their
page introduces cross site scripting concerns for them. This is also
beyond the scope of this patch, but would probably be addressed by
signing the request and developers whitelisting the servers that they
support.

Comments
=========
I would be doing the changes to the Java side of Shindig.

As to the additional tag in features.xml with respect to PHP, it appears
the PHP code (GadgetFeatureResigtry.php) is similar to the Java side, it
will simply ignore the new tag.



---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------




---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [OpenSocial] Re: Implementing requestSendMessage for Partuza</title>
<author><name>Chris Chabot &lt;chabotc@google.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c818767740912020712maaed948w35d5fa9db1a21a7f@mail.gmail.com%3e"/>
<id>urn:uuid:%3c818767740912020712maaed948w35d5fa9db1a21a7f@mail-gmail-com%3e</id>
<updated>2009-12-02T15:12:44Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hmm this is quickly running outside of my area of expertise, I'm not
terribly familiar with the current internals of the gadget&lt;&gt;container rpc
structure.

I think it would be best if you took this question to the shindig-dev list,
where our resident experts on this topic can be found, see
http://incubator.apache.org/shindig/community/getting-help.html for details
on how to sign up

   -- Chris

On Wed, Dec 2, 2009 at 3:55 PM, Mel Morrow &lt;mel.morow@gmail.com&gt; wrote:

&gt; Thanks Chris for your patience:)
&gt;
&gt; Actually I'm diving into the code...I've found something that leaves a
&gt; mess..
&gt;
&gt; I'm debugging the entire code to have a notion of shindig - partuza
&gt; interaction flow, and
&gt; that is what I found..
&gt;
&gt; gadgets.json.stringify function (..rps/wpm.transport.js) changes the
&gt; entire rpc object structure... I mean that some fields of that object
&gt; (i.e the array containing
&gt; title, body and message type) are getting changed ...hence in my
&gt; container.js (partuza's) in requestSendMessage function(that I should
&gt; implement) I can get only the recipient, but no message to proceed.
&gt;
&gt; something is wrong with my code:( or I'm doing so..
&gt;
&gt;
&gt; On Dec 2, 3:13 pm, Chris Chabot &lt;chab...@google.com&gt; wrote:
&gt; &gt; On Wed, Dec 2, 2009 at 9:05 AM, Mel Morrow &lt;mel.mo...@gmail.com&gt; wrote:
&gt; &gt;
&gt; &gt; &gt; requestSendMessage: function() {
&gt; &gt;
&gt; &gt; &gt; }
&gt; &gt;
&gt; &gt; &gt; this is what I need..
&gt; &gt;
&gt; &gt; Well, there you send stuff! :-)
&gt; &gt;
&gt; &gt; Really the implementation details are completely up to you, if you wanted
&gt; to
&gt; &gt; add this functionality to partuza I would suggest adding a new controller
&gt; &gt; (partuza/Application/Controllers) that can receive the message post, and
&gt; &gt; just do a simple Ajax post to that url (suggestion: do include the
&gt; security
&gt; &gt; token so you can validate it's not a abuse of the functionality, and can
&gt; &gt; retrieve or compare the app id and viewer id).
&gt; &gt;
&gt; &gt; I know that probably doesn't sound like a useful suggestion, but there's
&gt; &gt; just no replacing actually diving into the code and figuring it out to
&gt; see
&gt; &gt; how it works
&gt;
&gt; --
&gt;
&gt; You received this message because you are subscribed to the Google Groups
&gt; "Implementing OpenSocial Containers" group.
&gt; To post to this group, send email to opensocial-container@googlegroups.com
&gt; .
&gt; To unsubscribe from this group, send email to
&gt; opensocial-container+unsubscribe@googlegroups.com&lt;opensocial-container%2Bunsubscribe@googlegroups.com&gt;
&gt; .
&gt; For more options, visit this group at
&gt; http://groups.google.com/group/opensocial-container?hl=en.
&gt;
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Issue with different secure domains for container and shindig</title>
<author><name>&quot;Terlecki, Stephen&quot; &lt;stephen.terlecki@lmco.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c581C2F1AB3315145BD64D2022634BF8DE078C98A@HVXMSP4.us.lmco.com%3e"/>
<id>urn:uuid:%3c581C2F1AB3315145BD64D2022634BF8DE078C98A@HVXMSP4-us-lmco-com%3e</id>
<updated>2009-12-02T12:53:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hafiz,

I had the same issue that you are seeing and it had to do with the NIX transport setup.  When
a gadget is rendered the first time, the NIX transport sets up both the container and gadget
hook at the same time.  Since I was not re-rendering the page when switching to canvas view,
when the gadget was told to render in canvas view it was failing to establish the connection
with the NIX transport on the container side since the container's side of the NIX transport
setup was already running.

I put a hack in place to force the rpc.js to setup the frame when I called setAuthToken after
switching to canvas view.  I am still trying to work out a better solution so that I can submit
a bug.

I am quite a bit behind at this point, since I haven't downloaded the latest BETA for Shindig,
but the problem for me exists in the setupFrame function in the rpc.js file for the rpc feature.
 If you look, the setup array on the container shows that the frame has already been setup
when switching to canvas view so it just returns.  In the case of the NIX transport with IE7,
switching to canvas view kills the frames reference to the VBScript for the NIX transport
and its link to the container.

Hopefully this points you in the right direction.  I need to download the latest code for
Shindig so I can put together a sensible fix for this issue.

Steve T.

-----Original Message-----
From: Hafiz A Haq [mailto:hafizahaq@gmail.com]
Sent: Wednesday, December 02, 2009 12:42 AM
To: shindig-dev@incubator.apache.org
Subject: Re: Issue with different secure domains for container and shindig

Thank you John for the helping hand.

I just noticed one more strange behavior, probably is already discussed in the thread - http://markmail.org/thread/zorpp3exisyei76w

When i maximize the gadget, i change the view to canvas, and the rpcs fail in ie7. I could
fix the issue by rerendering the gadget with a new moduleId.

Any recommendation on the proper fix for this one?

Thanks and Regards,
Hafiz

2009/12/1 John Hjelmstad &lt;fargo@google.com&gt;

&gt; Hi Hafiz:
&gt;
&gt; Sounds like this has something to do with the way that numeric values
&gt; are coerced to and from String values in JS. Forcing the value to be a
&gt; String (w/ a non-numeric char) is a fine solution for the moment. A
&gt; colleague recently saw this behavior as well. I'll take a look when I get some time.
&gt;
&gt; Let me know if you run into any other troubles-
&gt;
&gt; --j
&gt;
&gt; On Mon, Nov 30, 2009 at 11:32 PM, Hafiz A Haq &lt;hafizahaq@gmail.com&gt; wrote:
&gt;
&gt; &gt; Seems appending a random character to the random number has fixed
&gt; &gt; the issue, atleast in my dev environment.
&gt; &gt;
&gt; &gt; I will update you once the build makes it to production. Waiting
&gt; &gt; with my fingers crossed.
&gt; &gt;
&gt; &gt; Thanks and Regards,
&gt; &gt; Hafiz
&gt; &gt;
&gt; &gt; 2009/11/25 John Hjelmstad &lt;fargo@google.com&gt;
&gt; &gt;
&gt; &gt; &gt; Throwing a few ideas out there:
&gt; &gt; &gt;
&gt; &gt; &gt; 1. Rather than your rpctoken being (interpreted as) a number,
&gt; &gt; &gt; ensure
&gt; it's
&gt; &gt; a
&gt; &gt; &gt; string by prepending "A" or something to it.
&gt; &gt; &gt; 2. Any chance VBScript is disabled for you?
&gt; &gt; &gt;
&gt; &gt; &gt; -j-
&gt; &gt; &gt;
&gt; &gt; &gt; On Sun, Nov 22, 2009 at 10:30 PM, Hafiz A Haq
&gt; &gt; &gt; &lt;hafizahaq@gmail.com&gt;
&gt; &gt; wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; 2009/11/21 John Hjelmstad &lt;fargo@google.com&gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; 1. Ah, version 1.1-beta2. I can't recall whether that version
&gt; &gt; &gt; &gt; &gt; has
&gt; the
&gt; &gt; &gt; new
&gt; &gt; &gt; &gt; &gt; NIX protocol in it or not. Does your /gadgets/js/rpc.js?c=1
&gt; &gt; &gt; &gt; &gt; file
&gt; &gt; &gt; contain
&gt; &gt; &gt; &gt; &gt; symbols named gadgets.rpctx.nix*?
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; I tried 1.1beta2 and 1.1beta4 , i could find something like
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; gadgets.rpctx.nix=function(){var C="GRPC____NIXVBS_wrapper";
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; 2. Do you have a special container config for
&gt; &gt; &gt; &gt; container=smx-container
&gt; &gt; &gt; that
&gt; &gt; &gt; &gt; &gt; overrides any values for "gadgets.features":{"rpc"...?
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; "rpc" : {
&gt; &gt; &gt; &gt;    // Path to the relay file. Automatically appended to the parent
&gt; &gt; &gt; &gt;    /// parameter if it passes input validation and is not null.
&gt; &gt; &gt; &gt;    // This should never be on the same host in a production
&gt; &gt; environment!
&gt; &gt; &gt; &gt;    // Only use this for TESTING!
&gt; &gt; &gt; &gt;    "parentRelayUrl" : "/app/core/main/rpc_relay.html",
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;    // If true, this will use the legacy ifpc wire format when
&gt; &gt; &gt; &gt; making
&gt; &gt; rpc
&gt; &gt; &gt; &gt;    // requests.
&gt; &gt; &gt; &gt;    "useLegacyProtocol" : false
&gt; &gt; &gt; &gt;  }
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Anything amiss here?
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Thanks and Regards,
&gt; &gt; &gt; &gt; Hafiz
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; On Fri, Nov 20, 2009 at 4:51 AM, Hafiz A Haq
&gt; &gt; &gt; &gt; &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; wrote:
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Thanks a ton John, I had almost given up.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Yeah, First up i create the iframe url, which is like
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; https://shindig.company.com//app/shindig/gadgets/ifr?container=smx-con
&gt; tainer&amp;v=d84f1182fc1ef128c4c16095d561c3&amp;lang=en&amp;country=US&amp;view=defaul
&gt; t&amp;up_appServiceCode=MY.CUSTOM.REPORT&amp;up_chartTitle=My+Custom+Chart+For
&gt; +Performance&amp;up_reportSWFURL=https%3A%2F%2Flocalhost%3A8443%2Fapp%2Fco
&gt; re%2Fmain%2Fswf%2Freporting.swf&amp;up_reportingXmlStr=%3CreportPreference
&gt; s%3E+%3Csettings%3E+%3CchartID%3Erankedbubblechart%3C%2FchartID%3E+%3C
&gt; %2Fsettings%3E+%3Cquery%3E+%3CappServiceCode%3EMY.CUSTOM.REPORT%3C%2Fa
&gt; ppServiceCode%3E+%3CfilterInstanceID%3EiNstance_fRom_tEmplate_11383%3C
&gt; %2FfilterInstanceID%3E+%3Ctemplate%3Eacct-report-template.xml%3C%2Ftem
&gt; plate%3E+%3CtimeHorizon%3E+%3CperiodTypeCode%3EHALFYEAR%3C%2FperiodTyp
&gt; eCode%3E+%3CstartPeriod%2F%3E+%3CendPeriod%2F%3E+%3C%2FtimeHorizon%3E+
&gt; %3C%2Fquery%3E%3C%2FreportPreferences%3E&amp;url=https%3A%2F%2Fi-0029%3A84
&gt; 43%2Fapp%2Fgadget%2Fcom.company.gadget.ReportingGadget%2Fcom.company.g
&gt; adget.client.ReportingGadget.gadget.xml&amp;libs=opensocial-0.8&amp;parent=htt
&gt; ps%3A%2F%2Fi-0029%3A8443%2Fapp%2Fcore%2Fmain%2F&amp;nocache=0#rpctoken=0.2
&gt; 649638729165247
&gt; &gt; &gt; &gt; &gt; &gt; &lt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; https://i-0029:8443/https://i-0029:8443//app/shindig/gadgets/ifr?conta
&gt; iner=smx-container&amp;v=d84f1182fc1ef128c4c16095d561c3&amp;lang=en&amp;country=US
&gt; &amp;view=default&amp;up_appServiceCode=MY.CUSTOM.REPORT&amp;up_chartTitle=My+Cust
&gt; om+Chart+For+Performance&amp;up_reportSWFURL=https%3A%2F%2Flocalhost%3A844
&gt; 3%2Fapp%2Fcore%2Fmain%2Fswf%2Freporting.swf&amp;up_reportingXmlStr=%3Crepo
&gt; rtPreferences%3E+%3Csettings%3E+%3CchartID%3Erankedbubblechart%3C%2Fch
&gt; artID%3E+%3C%2Fsettings%3E+%3Cquery%3E+%3CappServiceCode%3EMY.CUSTOM.R
&gt; EPORT%3C%2FappServiceCode%3E+%3CfilterInstanceID%3EiNstance_fRom_tEmpl
&gt; ate_11383%3C%2FfilterInstanceID%3E+%3Ctemplate%3Eacct-report-template.
&gt; xml%3C%2Ftemplate%3E+%3CtimeHorizon%3E+%3CperiodTypeCode%3EHALFYEAR%3C
&gt; %2FperiodTypeCode%3E+%3CstartPeriod%2F%3E+%3CendPeriod%2F%3E+%3C%2Ftim
&gt; eHorizon%3E+%3C%2Fquery%3E%3C%2FreportPreferences%3E&amp;url=https%3A%2F%2
&gt; Fi-0029%3A8443%2Fapp%2Fgadget%2Fcom.company.gadget.ReportingGadget%2Fc
&gt; om.company.gadget.client.ReportingGadget.gadget.xml&amp;libs=opensocial-0.
&gt; 8&amp;parent=https%3A%2F%2Fi-0029%3A8443%2Fapp%2Fcore%2Fmain%2F&amp;nocache=0#
&gt; rpctoken=0.2649638729165247
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; then i set this as innerhtml to my gadget div and i follow
&gt; &gt; &gt; &gt; &gt; &gt; it up with
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setRelayUrl(iframeId, iframeUrl, false);
&gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setAuthToken(iframeId, rpcToken);
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; The browser versions having trouble are ie6 and ie7
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; I tried
&gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setupReceiver(gadgetIFrameId);
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; but it seems the method is not available in my version of
&gt; &gt; &gt; &gt; &gt; &gt; Shindig
&gt; -
&gt; &gt; &gt; &gt; &gt; &gt; 1.1-Beta2
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Thanks in advance.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Best Regards,
&gt; &gt; &gt; &gt; &gt; &gt; Hafiz
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; 2009/11/20 John Hjelmstad &lt;fargo@google.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Hi Hafiz:
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Order is everything. I want to confirm: you're first
&gt; &gt; &gt; &gt; &gt; &gt; &gt; rendering
&gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; IFRAME,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; then immediately doing gadgets.rpc.setRelayUrl(...) and
&gt; &gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setAuthToken(...) correct?
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; To best deduce this issue, I'd need:
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 1. The exact IFRAME URL you're generating (you can remove
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; security
&gt; &gt; &gt; &gt; &gt; &gt; &gt; token
&gt; &gt; &gt; &gt; &gt; &gt; &gt; if there is one)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 2. The order in which you're generating the IFRAME URL
and
&gt; &gt; calling
&gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; setup
&gt; &gt; &gt; &gt; &gt; &gt; &gt; commands.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 3. The browser version(s) you're using.
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; As well, you might try
&gt; gadgets.rpc.setupReceiver(gadgetIFrameId);
&gt; &gt; &gt; --&gt;
&gt; &gt; &gt; &gt; &gt; &gt; this
&gt; &gt; &gt; &gt; &gt; &gt; &gt; is the replacement to setRelayUrl and setAuthToken which
&gt; ensures
&gt; &gt; &gt; &gt; proper
&gt; &gt; &gt; &gt; &gt; &gt; &gt; ordering.
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; --j
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; On Wed, Nov 18, 2009 at 11:39 PM, Hafiz A Haq &lt;
&gt; &gt; hafizahaq@gmail.com
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; wrote:
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; nix_channels[targetId] is not undefined, for the first
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; time
&gt; &gt; when
&gt; &gt; &gt; i
&gt; &gt; &gt; &gt; &gt; run
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; app after a jboss restart... so basically the rpc
goes
&gt; through
&gt; &gt; &gt; for
&gt; &gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; first
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; gadget(if and only there is one gadget request while
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; starting
&gt; &gt; &gt; &gt; up)...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Any clue, why this happens?
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Thanks and Regards,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 2009/11/18 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Not sure if i am pestering you guys, but i dont
have
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; any
&gt; &gt; other
&gt; &gt; &gt; &gt; &gt; &gt; &gt; option...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; :-(
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; I am also invoking
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setRelayUrl(iframeId, iframeUrl,
false);
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setAuthToken(iframeId, rpcToken);
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; from the container for each gadget generated.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; and alert from nix.transport.js
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; call: function(targetId, from, rpc) {
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;       try {
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;         // If we have a handler, call it.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;         alert(targetId+" = "+nix_channels[targetId]+"
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; from
&gt; &gt; &gt; &gt; "+from+"
&gt; &gt; &gt; &gt; &gt; &gt; rpc
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; "+gadgets.json.stringify(rpc));
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;        ....
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;     }
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; gives
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; .. = from remote_iframe_0 rpc
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; {"s":"set_title","f":"remote_iframe_0","c":0,"a"["Acco
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; unt overview"],"t":"0.6466592220939002","I":false}
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; works (once in a blue moon)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; .. = undefined from remote_iframe_2 rpc is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; {"s":"set_title","f":"remote_iframe_2","c":0,"a":["Acc
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; ount summary"],"t":"0.33673688496145","I":false}
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; doesnt work
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; I don't understand why most of the times the
undefined
&gt; comes
&gt; &gt; up
&gt; &gt; &gt; &gt; and
&gt; &gt; &gt; &gt; &gt; &gt; &gt; then
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; it
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; fails...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Please , all those gurus and experts, any tip,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; something i
&gt; &gt; &gt; might
&gt; &gt; &gt; &gt; be
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; missing...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Thanks and Regards,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;  Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 2009/11/18 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; I have also added rpctoken into the iframeurl
like
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; https://
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; .../ifr?container=...&amp;lang=en&amp;country=US&amp;view=default&amp;nocache=1&amp;rpctok
&gt; en=0.9956869901138398,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; which is essentially a random number
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; still the rpc calls are not getting through.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; Anything else i might be missing.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; 2009/11/18 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; Any input would help me. Please provide a
hint why
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; nix
&gt; &gt; &gt; transport
&gt; &gt; &gt; &gt; &gt; &gt; fails
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; when container and shindig is at 2 different
secure
&gt; &gt; domains?
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; 2009/10/28 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Seems there is something that makes
the nix
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; transport
&gt; &gt; &gt; &gt; mechanism
&gt; &gt; &gt; &gt; &gt; &gt; fail
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; here, the call method is not going
through , where
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; it
&gt; &gt; fails
&gt; &gt; &gt; at
&gt; &gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; check
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; if (nix_channels[targetId])
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; In the call method the parameters
targetId, from,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; rpc
&gt; &gt; alerts
&gt; &gt; &gt; &gt; to
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;  '.. , remote_iframe_3 , [object
Object]'
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Can anyone please give me a hint
why the code
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; if (nix_channels[..])
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; is not going through as expected..
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Any help is appreciated.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Thanks and REgards, Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; 2009/10/28 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Hi All,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; My dashboard application is up
and running in
&gt; production,
&gt; &gt; &gt; &gt; &gt; thanks
&gt; &gt; &gt; &gt; &gt; &gt; to
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Shindig and you guys. Due to
some serious mistake
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; from
&gt; QA
&gt; &gt; &gt; and
&gt; &gt; &gt; &gt; &gt; IT
&gt; &gt; &gt; &gt; &gt; &gt; &gt; guys
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; i have
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; a bug at this last hour as rpc
feature is broken
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; in
&gt; &gt; &gt; &gt; production
&gt; &gt; &gt; &gt; &gt; &gt; and
&gt; &gt; &gt; &gt; &gt; &gt; &gt; my
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; clients are not so happy.. :(
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; In production each client has
individual
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; subdomains and
&gt; &gt; &gt; &gt; shindig
&gt; &gt; &gt; &gt; &gt; &gt; is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; deployed in a common subdomain
for all customers,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; both
&gt; &gt; over
&gt; &gt; &gt; &gt; &gt; &gt; https.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; RPC is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; now broken in IE6,7 and setTitle,
setHeight ...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; are not
&gt; &gt; &gt; &gt; &gt; working.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; I assigned gadgets.parent in
myContainer.js with a
&gt; regex
&gt; &gt; &gt; &gt; &gt; pattern
&gt; &gt; &gt; &gt; &gt; &gt; &gt; like
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; "gadgets.parent" : "(https://localhost:8443|
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; https://customer1.app.company.com|
&gt; &gt; &gt; &gt; &gt; &gt; &gt; https://customer2.app.company.com
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; )",
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; and rpc like
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;  "rpc" : {
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // Path to the relay file.
Automatically
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; appended
&gt; to
&gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; parent
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // parameter if it passes
input validation and
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; is
&gt; not
&gt; &gt; &gt; &gt; null.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // This should never be on
the same host in a
&gt; &gt; &gt; production
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; environment!
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // Only use this for TESTING!
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     "parentRelayUrl" :
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; "/app/core/main/rpc_relay.html",
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // If true, this will use
the legacy ifpc wire
&gt; format
&gt; &gt; &gt; &gt; when
&gt; &gt; &gt; &gt; &gt; &gt; &gt; making
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; rpc
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // requests.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     "useLegacyProtocol" : false
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;   }
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Now i tried
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; var parentRelayUrl = window.location.protocol
+
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; "//" + window.location.host
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; gadgets.container.setParentUrl(parentRelayUrl);
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; from the container js file, which
is loaded after
&gt; loading
&gt; &gt; &gt; all
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; required
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; shindig js file dependencies.
Still i am not able
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; to
&gt; get
&gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; rpcs
&gt; &gt; &gt; &gt; &gt; &gt; &gt; to
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; work
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; properly in IE6,7. Any help is
greatly appreciated
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; as
&gt; &gt; some
&gt; &gt; &gt; of
&gt; &gt; &gt; &gt; &gt; my
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; customers
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; are tied down on IE7.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Best Regards,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; He who asks is a fool for five
minutes, but he who
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; does
&gt; &gt; not
&gt; &gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; a fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; He who asks is a fool for five minutes,
but he who
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; does
&gt; &gt; not
&gt; &gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; a fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; He who asks is a fool for five minutes,
but he who
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; does
&gt; not
&gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; He who asks is a fool for five minutes, but
he who
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; does
&gt; not
&gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he
who
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; does not
&gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he who
does
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; not
&gt; ask
&gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he who does not
&gt; &gt; &gt; &gt; &gt; &gt; ask
&gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he who does not ask
&gt; remains
&gt; &gt; a
&gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; --
&gt; &gt; He who asks is a fool for five minutes, but he who does not ask
&gt; &gt; remains a fool forever.
&gt; &gt;
&gt;



--
He who asks is a fool for five minutes, but he who does not ask remains a fool forever.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Issue with different secure domains for container and shindig</title>
<author><name>Hafiz A Haq &lt;hafizahaq@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c5a4ec3c60912012141j55a27a01s3d2dfd535d51c460@mail.gmail.com%3e"/>
<id>urn:uuid:%3c5a4ec3c60912012141j55a27a01s3d2dfd535d51c460@mail-gmail-com%3e</id>
<updated>2009-12-02T05:41:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thank you John for the helping hand.

I just noticed one more strange behavior, probably is already discussed in
the thread - http://markmail.org/thread/zorpp3exisyei76w

When i maximize the gadget, i change the view to canvas, and the rpcs fail
in ie7. I could fix the issue by rerendering the gadget with a new moduleId.

Any recommendation on the proper fix for this one?

Thanks and Regards,
Hafiz

2009/12/1 John Hjelmstad &lt;fargo@google.com&gt;

&gt; Hi Hafiz:
&gt;
&gt; Sounds like this has something to do with the way that numeric values are
&gt; coerced to and from String values in JS. Forcing the value to be a String
&gt; (w/ a non-numeric char) is a fine solution for the moment. A colleague
&gt; recently saw this behavior as well. I'll take a look when I get some time.
&gt;
&gt; Let me know if you run into any other troubles-
&gt;
&gt; --j
&gt;
&gt; On Mon, Nov 30, 2009 at 11:32 PM, Hafiz A Haq &lt;hafizahaq@gmail.com&gt; wrote:
&gt;
&gt; &gt; Seems appending a random character to the random number has fixed the
&gt; &gt; issue,
&gt; &gt; atleast in my dev environment.
&gt; &gt;
&gt; &gt; I will update you once the build makes it to production. Waiting with my
&gt; &gt; fingers crossed.
&gt; &gt;
&gt; &gt; Thanks and Regards,
&gt; &gt; Hafiz
&gt; &gt;
&gt; &gt; 2009/11/25 John Hjelmstad &lt;fargo@google.com&gt;
&gt; &gt;
&gt; &gt; &gt; Throwing a few ideas out there:
&gt; &gt; &gt;
&gt; &gt; &gt; 1. Rather than your rpctoken being (interpreted as) a number, ensure
&gt; it's
&gt; &gt; a
&gt; &gt; &gt; string by prepending "A" or something to it.
&gt; &gt; &gt; 2. Any chance VBScript is disabled for you?
&gt; &gt; &gt;
&gt; &gt; &gt; -j-
&gt; &gt; &gt;
&gt; &gt; &gt; On Sun, Nov 22, 2009 at 10:30 PM, Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; 2009/11/21 John Hjelmstad &lt;fargo@google.com&gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; 1. Ah, version 1.1-beta2. I can't recall whether that version has
&gt; the
&gt; &gt; &gt; new
&gt; &gt; &gt; &gt; &gt; NIX protocol in it or not. Does your /gadgets/js/rpc.js?c=1 file
&gt; &gt; &gt; contain
&gt; &gt; &gt; &gt; &gt; symbols named gadgets.rpctx.nix*?
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; I tried 1.1beta2 and 1.1beta4 , i could find something like
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; gadgets.rpctx.nix=function(){var C="GRPC____NIXVBS_wrapper";
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; 2. Do you have a special container config for container=smx-container
&gt; &gt; &gt; that
&gt; &gt; &gt; &gt; &gt; overrides any values for "gadgets.features":{"rpc"...?
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; "rpc" : {
&gt; &gt; &gt; &gt;    // Path to the relay file. Automatically appended to the parent
&gt; &gt; &gt; &gt;    /// parameter if it passes input validation and is not null.
&gt; &gt; &gt; &gt;    // This should never be on the same host in a production
&gt; &gt; environment!
&gt; &gt; &gt; &gt;    // Only use this for TESTING!
&gt; &gt; &gt; &gt;    "parentRelayUrl" : "/app/core/main/rpc_relay.html",
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;    // If true, this will use the legacy ifpc wire format when making
&gt; &gt; rpc
&gt; &gt; &gt; &gt;    // requests.
&gt; &gt; &gt; &gt;    "useLegacyProtocol" : false
&gt; &gt; &gt; &gt;  }
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Anything amiss here?
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Thanks and Regards,
&gt; &gt; &gt; &gt; Hafiz
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; On Fri, Nov 20, 2009 at 4:51 AM, Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; wrote:
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Thanks a ton John, I had almost given up.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Yeah, First up i create the iframe url, which is like
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; https://shindig.company.com//app/shindig/gadgets/ifr?container=smx-container&amp;v=d84f1182fc1ef128c4c16095d561c3&amp;lang=en&amp;country=US&amp;view=default&amp;up_appServiceCode=MY.CUSTOM.REPORT&amp;up_chartTitle=My+Custom+Chart+For+Performance&amp;up_reportSWFURL=https%3A%2F%2Flocalhost%3A8443%2Fapp%2Fcore%2Fmain%2Fswf%2Freporting.swf&amp;up_reportingXmlStr=%3CreportPreferences%3E+%3Csettings%3E+%3CchartID%3Erankedbubblechart%3C%2FchartID%3E+%3C%2Fsettings%3E+%3Cquery%3E+%3CappServiceCode%3EMY.CUSTOM.REPORT%3C%2FappServiceCode%3E+%3CfilterInstanceID%3EiNstance_fRom_tEmplate_11383%3C%2FfilterInstanceID%3E+%3Ctemplate%3Eacct-report-template.xml%3C%2Ftemplate%3E+%3CtimeHorizon%3E+%3CperiodTypeCode%3EHALFYEAR%3C%2FperiodTypeCode%3E+%3CstartPeriod%2F%3E+%3CendPeriod%2F%3E+%3C%2FtimeHorizon%3E+%3C%2Fquery%3E%3C%2FreportPreferences%3E&amp;url=https%3A%2F%2Fi-0029%3A8443%2Fapp%2Fgadget%2Fcom.company.gadget.ReportingGadget%2Fcom.company.gadget.client.ReportingGadget.gadget.xml&amp;libs=opensocial-0.8&amp;parent=https%3A%2F%2Fi-0029%3A8443%2Fapp%2Fcore%2Fmain%2F&amp;nocache=0#rpctoken=0.2649638729165247
&gt; &gt; &gt; &gt; &gt; &gt; &lt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; https://i-0029:8443/https://i-0029:8443//app/shindig/gadgets/ifr?container=smx-container&amp;v=d84f1182fc1ef128c4c16095d561c3&amp;lang=en&amp;country=US&amp;view=default&amp;up_appServiceCode=MY.CUSTOM.REPORT&amp;up_chartTitle=My+Custom+Chart+For+Performance&amp;up_reportSWFURL=https%3A%2F%2Flocalhost%3A8443%2Fapp%2Fcore%2Fmain%2Fswf%2Freporting.swf&amp;up_reportingXmlStr=%3CreportPreferences%3E+%3Csettings%3E+%3CchartID%3Erankedbubblechart%3C%2FchartID%3E+%3C%2Fsettings%3E+%3Cquery%3E+%3CappServiceCode%3EMY.CUSTOM.REPORT%3C%2FappServiceCode%3E+%3CfilterInstanceID%3EiNstance_fRom_tEmplate_11383%3C%2FfilterInstanceID%3E+%3Ctemplate%3Eacct-report-template.xml%3C%2Ftemplate%3E+%3CtimeHorizon%3E+%3CperiodTypeCode%3EHALFYEAR%3C%2FperiodTypeCode%3E+%3CstartPeriod%2F%3E+%3CendPeriod%2F%3E+%3C%2FtimeHorizon%3E+%3C%2Fquery%3E%3C%2FreportPreferences%3E&amp;url=https%3A%2F%2Fi-0029%3A8443%2Fapp%2Fgadget%2Fcom.company.gadget.ReportingGadget%2Fcom.company.gadget.client.ReportingGadget.gadget.xml&amp;libs=opensocial-0.8&amp;parent=https%3A%2F%2Fi-0029%3A8443%2Fapp%2Fcore%2Fmain%2F&amp;nocache=0#rpctoken=0.2649638729165247
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; then i set this as innerhtml to my gadget div
&gt; &gt; &gt; &gt; &gt; &gt; and i follow it up with
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setRelayUrl(iframeId, iframeUrl, false);
&gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setAuthToken(iframeId, rpcToken);
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; The browser versions having trouble are ie6 and ie7
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; I tried
&gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setupReceiver(gadgetIFrameId);
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; but it seems the method is not available in my version of Shindig
&gt; -
&gt; &gt; &gt; &gt; &gt; &gt; 1.1-Beta2
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Thanks in advance.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Best Regards,
&gt; &gt; &gt; &gt; &gt; &gt; Hafiz
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; 2009/11/20 John Hjelmstad &lt;fargo@google.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Hi Hafiz:
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Order is everything. I want to confirm: you're first rendering
&gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; IFRAME,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; then immediately doing gadgets.rpc.setRelayUrl(...) and
&gt; &gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setAuthToken(...) correct?
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; To best deduce this issue, I'd need:
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 1. The exact IFRAME URL you're generating (you can remove
the
&gt; &gt; &gt; &gt; security
&gt; &gt; &gt; &gt; &gt; &gt; &gt; token
&gt; &gt; &gt; &gt; &gt; &gt; &gt; if there is one)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 2. The order in which you're generating the IFRAME URL
and
&gt; &gt; calling
&gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; setup
&gt; &gt; &gt; &gt; &gt; &gt; &gt; commands.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 3. The browser version(s) you're using.
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; As well, you might try
&gt; gadgets.rpc.setupReceiver(gadgetIFrameId);
&gt; &gt; &gt; --&gt;
&gt; &gt; &gt; &gt; &gt; &gt; this
&gt; &gt; &gt; &gt; &gt; &gt; &gt; is the replacement to setRelayUrl and setAuthToken which
&gt; ensures
&gt; &gt; &gt; &gt; proper
&gt; &gt; &gt; &gt; &gt; &gt; &gt; ordering.
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; --j
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; On Wed, Nov 18, 2009 at 11:39 PM, Hafiz A Haq &lt;
&gt; &gt; hafizahaq@gmail.com
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; wrote:
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; nix_channels[targetId] is not undefined, for the first
time
&gt; &gt; when
&gt; &gt; &gt; i
&gt; &gt; &gt; &gt; &gt; run
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; app after a jboss restart... so basically the rpc
goes
&gt; through
&gt; &gt; &gt; for
&gt; &gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; first
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; gadget(if and only there is one gadget request while
starting
&gt; &gt; &gt; &gt; up)...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Any clue, why this happens?
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Thanks and Regards,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 2009/11/18 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Not sure if i am pestering you guys, but i dont
have any
&gt; &gt; other
&gt; &gt; &gt; &gt; &gt; &gt; &gt; option...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; :-(
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; I am also invoking
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; gadgets.rpc.setRelayUrl(iframeId, iframeUrl,
false);
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;  gadgets.rpc.setAuthToken(iframeId, rpcToken);
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; from the container for each gadget generated.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; and alert from nix.transport.js
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; call: function(targetId, from, rpc) {
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;       try {
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;         // If we have a handler, call it.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;         alert(targetId+" = "+nix_channels[targetId]+"
from
&gt; &gt; &gt; &gt; "+from+"
&gt; &gt; &gt; &gt; &gt; &gt; rpc
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; "+gadgets.json.stringify(rpc));
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;        ....
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;     }
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; gives
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; .. = from remote_iframe_0 rpc
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; {"s":"set_title","f":"remote_iframe_0","c":0,"a"["Account
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; overview"],"t":"0.6466592220939002","I":false}
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; works (once in a blue moon)
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; .. = undefined from remote_iframe_2 rpc is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; {"s":"set_title","f":"remote_iframe_2","c":0,"a":["Account
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; summary"],"t":"0.33673688496145","I":false}
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; doesnt work
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; I don't understand why most of the times the
undefined
&gt; comes
&gt; &gt; up
&gt; &gt; &gt; &gt; and
&gt; &gt; &gt; &gt; &gt; &gt; &gt; then
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; it
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; fails...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Please , all those gurus and experts, any tip,
something i
&gt; &gt; &gt; might
&gt; &gt; &gt; &gt; be
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; missing...
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Thanks and Regards,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;  Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 2009/11/18 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; I have also added rpctoken into the iframeurl
like
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; https://
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; .../ifr?container=...&amp;lang=en&amp;country=US&amp;view=default&amp;nocache=1&amp;rpctoken=0.9956869901138398,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; which is essentially a random number
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; still the rpc calls are not getting through.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; Anything else i might be missing.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; 2009/11/18 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; Any input would help me. Please provide a
hint why nix
&gt; &gt; &gt; transport
&gt; &gt; &gt; &gt; &gt; &gt; fails
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; when container and shindig is at 2 different
secure
&gt; &gt; domains?
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; 2009/10/28 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Seems there is something that makes
the nix transport
&gt; &gt; &gt; &gt; mechanism
&gt; &gt; &gt; &gt; &gt; &gt; fail
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; here, the call method is not going
through , where it
&gt; &gt; fails
&gt; &gt; &gt; at
&gt; &gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; check
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; if (nix_channels[targetId])
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; In the call method the parameters
targetId, from, rpc
&gt; &gt; alerts
&gt; &gt; &gt; &gt; to
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;  '.. , remote_iframe_3 , [object
Object]'
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Can anyone please give me a hint
why the code
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; if (nix_channels[..])
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; is not going through as expected..
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Any help is appreciated.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Thanks and REgards,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; 2009/10/28 Hafiz A Haq &lt;hafizahaq@gmail.com&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; Hi All,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; My dashboard application is up
and running in
&gt; production,
&gt; &gt; &gt; &gt; &gt; thanks
&gt; &gt; &gt; &gt; &gt; &gt; to
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Shindig and you guys. Due to
some serious mistake from
&gt; QA
&gt; &gt; &gt; and
&gt; &gt; &gt; &gt; &gt; IT
&gt; &gt; &gt; &gt; &gt; &gt; &gt; guys
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; i have
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; a bug at this last hour as rpc
feature is broken in
&gt; &gt; &gt; &gt; production
&gt; &gt; &gt; &gt; &gt; &gt; and
&gt; &gt; &gt; &gt; &gt; &gt; &gt; my
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; clients are not so happy.. :(
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; In production each client has
individual subdomains and
&gt; &gt; &gt; &gt; shindig
&gt; &gt; &gt; &gt; &gt; &gt; is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; deployed in a common subdomain
for all customers, both
&gt; &gt; over
&gt; &gt; &gt; &gt; &gt; &gt; https.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; RPC is
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; now broken in IE6,7 and setTitle,
setHeight ... are not
&gt; &gt; &gt; &gt; &gt; working.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; I assigned gadgets.parent in
myContainer.js with a
&gt; regex
&gt; &gt; &gt; &gt; &gt; pattern
&gt; &gt; &gt; &gt; &gt; &gt; &gt; like
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; "gadgets.parent" : "(https://localhost:8443|
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; https://customer1.app.company.com|
&gt; &gt; &gt; &gt; &gt; &gt; &gt; https://customer2.app.company.com
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; )",
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; and rpc like
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;  "rpc" : {
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // Path to the relay file.
Automatically appended
&gt; to
&gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; &gt; parent
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // parameter if it passes
input validation and is
&gt; not
&gt; &gt; &gt; &gt; null.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // This should never be on
the same host in a
&gt; &gt; &gt; production
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; environment!
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // Only use this for TESTING!
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     "parentRelayUrl" : "/app/core/main/rpc_relay.html",
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // If true, this will use
the legacy ifpc wire
&gt; format
&gt; &gt; &gt; &gt; when
&gt; &gt; &gt; &gt; &gt; &gt; &gt; making
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; rpc
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     // requests.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;     "useLegacyProtocol" : false
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;   }
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Now i tried
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; var parentRelayUrl = window.location.protocol
+ "//" +
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; window.location.host
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; gadgets.container.setParentUrl(parentRelayUrl);
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; from the container js file, which
is loaded after
&gt; loading
&gt; &gt; &gt; all
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; required
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; shindig js file dependencies.
Still i am not able to
&gt; get
&gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; rpcs
&gt; &gt; &gt; &gt; &gt; &gt; &gt; to
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; work
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; properly in IE6,7. Any help is
greatly appreciated as
&gt; &gt; some
&gt; &gt; &gt; of
&gt; &gt; &gt; &gt; &gt; my
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; customers
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; are tied down on IE7.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Best Regards,
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; Hafiz
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; He who asks is a fool for five
minutes, but he who does
&gt; &gt; not
&gt; &gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt; a fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; He who asks is a fool for five minutes,
but he who does
&gt; &gt; not
&gt; &gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt; a fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; He who asks is a fool for five minutes,
but he who does
&gt; not
&gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; He who asks is a fool for five minutes, but
he who does
&gt; not
&gt; &gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he
who does not
&gt; &gt; ask
&gt; &gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he who
does not
&gt; ask
&gt; &gt; &gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he who does not
ask
&gt; &gt; &gt; remains
&gt; &gt; &gt; &gt; a
&gt; &gt; &gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; He who asks is a fool for five minutes, but he who does not ask
&gt; remains
&gt; &gt; a
&gt; &gt; &gt; &gt; fool forever.
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; --
&gt; &gt; He who asks is a fool for five minutes, but he who does not ask remains a
&gt; &gt; fool forever.
&gt; &gt;
&gt;



-- 
He who asks is a fool for five minutes, but he who does not ask remains a
fool forever.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: osapi.js libraries in Shindig</title>
<author><name>Luc Castera &lt;luc.castera@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3c1259699602.26695.10.camel@shabba%3e"/>
<id>urn:uuid:%3c1259699602-26695-10-camel@shabba%3e</id>
<updated>2009-12-01T20:33:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Paul &amp; Louis,

Thanks for your help. It is really appreciated!

I found the config you mentionned in container.js and was able to solve
my problem.

Turns out I had changed the following line in SocialAPIGuiceModule.java:

    bind(Boolean.class)
        .annotatedWith(Names.named(AnonymousAuthenticationHandler.ALLOW_UNAUTHENTICATED))
        .toInstance(Boolean.TRUE);

to FALSE.

And the call to social/rpc was failing due to authentication, with the
following message:

{"message":"unauthorized: The request did not have a proper security
token nor oauth message and unauthenticated requests are not
allowed","code":401}

I set it to TRUE and it is now allowing that call to be completed.
However, it is also allowing all calls to my REST endpoints to be
accessed without authentication and I would like to prevent that.

How can I let the social/rpc introspection call go through without
authentication without removing authentication for all my REST
endpoints?

Thank you,

Luc



On Mon, 2009-11-30 at 11:40 -0800, Louis Ryan wrote:
&gt; Luc
&gt; 
&gt; You may be better off directly defining the exposed JSON-RPC services in
&gt; your Shindig container.js rather than relying on the service introspection.
&gt; This is documented inside the sample container.js file provided with
&gt; Shindig.
&gt; 
&gt; -Louis
&gt; 
&gt; On Mon, Nov 30, 2009 at 9:31 AM, Paul Lindner &lt;lindner@inuus.com&gt; wrote:
&gt; 
&gt; &gt; When shindig starts it makes a request to to /social/rpc to get the list of
&gt; &gt; available methods.  See container.js sections "osapi" and "osapi.services"
&gt; &gt; for ways to hard-code the list or change the endpoints used.
&gt; &gt;
&gt; &gt;
&gt; &gt; On Mon, Nov 30, 2009 at 6:18 AM, Luc Arthur Castera
&gt; &gt; &lt;luc.castera@gmail.com&gt;wrote:
&gt; &gt;
&gt; &gt; &gt; Paul,
&gt; &gt; &gt;
&gt; &gt; &gt; When I load the gadget that uses osapi.people, I get a javascript error
&gt; &gt; in
&gt; &gt; &gt; Firebug: osapi.people is undefined
&gt; &gt; &gt;
&gt; &gt; &gt; I also see the following warning coming from rpc.js: Unknown RPC service:
&gt; &gt; &gt; osapi._handleGadgetRpcMethod
&gt; &gt; &gt;
&gt; &gt; &gt; On the shindig logs, I see the following error:
&gt; &gt; &gt;
&gt; &gt; &gt; Nov 30, 2009 9:06:59 AM
&gt; &gt; &gt; org.apache.shindig.gadgets.render.DefaultServiceFetcher retrieveServices
&gt; &gt; &gt; SEVERE: Failed to parse services methods from endpoint
&gt; &gt; &gt; http://localhost:8080/social/rpc. JSONObject["data"] not found.
&gt; &gt; &gt;
&gt; &gt; &gt; My environment is the following:
&gt; &gt; &gt; - Ubuntu 9.10
&gt; &gt; &gt; - Java 1.6.0_16
&gt; &gt; &gt; - Java version of Shindig (Trunk: SVN Revision 818615)
&gt; &gt; &gt;
&gt; &gt; &gt; I appreciate your help with this,
&gt; &gt; &gt;
&gt; &gt; &gt; Luc
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; On Fri, Nov 27, 2009 at 5:45 AM, Paul Lindner &lt;lindner@inuus.com&gt; wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; osapi should 'just work' if you specify &lt;Require feature="osapi"/&gt;
in
&gt; &gt; &gt; your
&gt; &gt; &gt; &gt; ModulePrefs. What behavior are you observing?  Do you get the osapi
&gt; &gt; &gt; classes
&gt; &gt; &gt; &gt; loaded?  Is there any error with 'listMethods' in your shindig logs?
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Can you provide more information about your environment?  Java/PHP?
&gt; &gt; &gt; &gt; Javascript Errors? etc....
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Thanks!
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; On Wed, Nov 25, 2009 at 5:10 PM, Luc Arthur Castera
&gt; &gt; &gt; &gt; &lt;luc.castera@gmail.com&gt;wrote:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Hey,
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; I wrote a gadget that uses the OS lite api (osapi.people,
&gt; &gt; &gt; osapi.appdata,
&gt; &gt; &gt; &gt; &gt; etc...). When I test the gadget on iGoogle, it works fine but when
I
&gt; &gt; &gt; try
&gt; &gt; &gt; &gt; it
&gt; &gt; &gt; &gt; &gt; on my local shindig instance, it is not working properly. It looks
&gt; &gt; like
&gt; &gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; osapi.people and osapi.appdata are not implemented in Shindig.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; FYI, I have written my adapters for my local shindig instance and
I
&gt; &gt; am
&gt; &gt; &gt; &gt; able
&gt; &gt; &gt; &gt; &gt; to use the older JS APIs without any issue.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Are we suppose to implement the osapi.js libraries ourselves when
we
&gt; &gt; &gt; &gt; build
&gt; &gt; &gt; &gt; &gt; our container or is it just that the shindig implementation hasn't
&gt; &gt; &gt; &gt; &gt; implemented these newer APIs yet?
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Any pointers of the issue would be greatly helpful. I tried to search
&gt; &gt; &gt; the
&gt; &gt; &gt; &gt; &gt; mailing list but could not find anything on that matter.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Thank you,
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Luc
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; --
&gt; &gt; &gt; ______________________
&gt; &gt; &gt; Luc Castera
&gt; &gt; &gt;
&gt; &gt;


-- 
______________________
Luc Castera
Founder, ShareMeme Inc.
http://messagepub.com
Phone: 786-877-3789
Skype: luc.castera



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Next step towards URL gadgets - design proposal</title>
<author><name>&quot;Weygandt, Jon&quot; &lt;jweygandt@ebay.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cA4CC0718BF5AB24C85ED0B6F3E8982E31214DBDD@DEN-EXM-05.corp.ebay.com%3e"/>
<id>urn:uuid:%3cA4CC0718BF5AB24C85ED0B6F3E8982E31214DBDD@DEN-EXM-05-corp-ebay-com%3e</id>
<updated>2009-12-01T16:31:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Just so that it is known, more on the design: I'm taking liberty in
defining "URL gadget JS API" based on:

*) Shindig does not support anything today.
*) Very few actual server implementations for URL gadgets exist
*) Our experience with URL gadgets. Our implementation has quite a few
URL gadgets, but the implementation is propriety
*) You cannot support cross domain XMLHttpRequests - no makeRequest
etc...

Just to go a bit further...

Just about every URL gadget author will have a multi-page URL gadget.
That is one which the location URL changes over time. That's just the
typical pattern for these type of applications. We must make the
interface work for them, and be relatively easy for them to implement.

I believe that full API support using libs, would require either:
*) A really long lib URL
*) Maintenance of session state on the server
*) A complex calling procedure
None of the above are really good. 

But if we narrow down the scope of the API to simply what cannot be
replaced by typical URL server side code, it then becomes easier. 

For an example, think about how one would do message bundles
Prefs.getMsg? (These need user prefs for hangman substitution)
Then think, does a URL gadget developer even need this? (They don't,
I18N is done differently for URL apps)

Jon

-----Original Message-----
From: Weygandt, Jon [mailto:jweygandt@ebay.com] 
Sent: Tuesday, December 01, 2009 8:14 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

The URL to the gadget developers server will have up_xxx parameters for
them to access the parameters.

As to "setprefs", these are done through rpc. Rpc will be supported,
just like it is today - that is there will be an rpctoken on the URL
(presumably the fragment portion). This rpctoken is used to validate
themselves to the container.

Handling of the rpctoken, and initial processing of the rpc call, is
container side JS - independent of HTML or URL gadgets. Ultimate
handling of the setpref service call is that of the container, which is
NOT anything Shindig code is responsible for.

I predict the JS code inside of the URL gadget (that which comes from
the "libs" parameter) will be very similar to existing code. Generally I
will remove calls that are not within the narrow specification for "URL
gadget JS API". 

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com]
Sent: Tuesday, December 01, 2009 8:03 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

Perhaps I misunderstood your statement, but your Design Requirement 2
states:

&lt;quote&gt;
2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters...
&lt;/quote&gt;

If you're talking about the setpref feature, will the user have to pass
session ID and some application-specific preferences as URL parameters?
I thought it wouldn't be secure.


 

  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;

 

  To:         &lt;shindig-dev@incubator.apache.org&gt;

 

  Date:       12/01/2009 09:53 AM

 

  Subject:    RE: Next step towards URL gadgets - design proposal

 






Not sure what you mean by "server side accessing of URL parameters"?

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com]
Sent: Tuesday, December 01, 2009 7:47 AM
To: shindig-dev@incubator.apache.org
Subject: Re: Next step towards URL gadgets - design proposal

The ability to handle URL gadgets "out of the box" is critical if we
want Shindig to become an enterprise asset, so I applaud the effort.
This said, does anyone have plans to address how URL gadgets will work
in a secure environment? I don't think " server side accessing of URL
parameters" plays very well here. The scenario is further complicated by
the fact that Shindig will frequently be used as a "service" rather than
co-hosted with the application. Would be interesting to hear how people
address these needs or if there are any plans to solve this once and for
all in Shindig.

Thanks,
Ilya




  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;



  To:         &lt;shindig-dev@incubator.apache.org&gt;



  Date:       11/25/2009 01:52 PM



  Subject:    Next step towards URL gadgets - design proposal








A proposal for review and comment...

I would like to implement section 3.1.3(6)(c)
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadget
s-API-Specification.html#process. This will not be a complete
implementation for URL gadgets, but takes Shindig one step closer to the
specification, and will provide a platform for which server implementers
can experiment with URL functionality.

Design requirements:
================
1) URL gadget developers require features that they cannot easily
replace, such as rpc, dynamic-height, set-title, views, etc...

2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters

3) Same origin policy makes implementing makeRequest, dataRequest
impractical
     *) Server side calls to REST and RPC APIs are the alternative

Design proposal
=============
libs parameter
This will be a variant of the /gadgets/js/rpc.js. It will fetch the
URL-Gadget-Side JS necessary.

Feature libraries, JS Servlet, Rendering Context To support a reduced
set of JavaScript, and maybe even a different set of JS the changes will
start with introducing a new RenderingContext.URLGADGET. "c=2" for the
JSServlet. Down to the feature.xml file having a new tag &lt;urlgadget&gt;

Some of the individual feature JS may be split apart to support
inclusion in gadget context separately from urlgadget context.

Currently the rendering does a redirect as part of the ifr call. I will
also introduce an option into shindig.properties, whereby the metadata
call will return the external URL as part of iframeurl, instead of the
ifr url with a redirect.

Open Issues
==========
The spec does not address how one determines the "servers JavaScript
request handler path". I don't propose to address this as part of this
effort, since few containers will actually support URL gadgets, the
developer will pretty much know who they are targeting.

The issue of the gadget developer putting "foreign" JavaScript on their
page introduces cross site scripting concerns for them. This is also
beyond the scope of this patch, but would probably be addressed by
signing the request and developers whitelisting the servers that they
support.

Comments
=========
I would be doing the changes to the Java side of Shindig.

As to the additional tag in features.xml with respect to PHP, it appears
the PHP code (GadgetFeatureResigtry.php) is similar to the Java side, it
will simply ignore the new tag.



---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------




---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Next step towards URL gadgets - design proposal</title>
<author><name>&quot;Weygandt, Jon&quot; &lt;jweygandt@ebay.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-shindig-dev/200912.mbox/%3cA4CC0718BF5AB24C85ED0B6F3E8982E31214DBB2@DEN-EXM-05.corp.ebay.com%3e"/>
<id>urn:uuid:%3cA4CC0718BF5AB24C85ED0B6F3E8982E31214DBB2@DEN-EXM-05-corp-ebay-com%3e</id>
<updated>2009-12-01T16:14:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The URL to the gadget developers server will have up_xxx parameters for
them to access the parameters.

As to "setprefs", these are done through rpc. Rpc will be supported,
just like it is today - that is there will be an rpctoken on the URL
(presumably the fragment portion). This rpctoken is used to validate
themselves to the container.

Handling of the rpctoken, and initial processing of the rpc call, is
container side JS - independent of HTML or URL gadgets. Ultimate
handling of the setpref service call is that of the container, which is
NOT anything Shindig code is responsible for.

I predict the JS code inside of the URL gadget (that which comes from
the "libs" parameter) will be very similar to existing code. Generally I
will remove calls that are not within the narrow specification for "URL
gadget JS API". 

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com] 
Sent: Tuesday, December 01, 2009 8:03 AM
To: shindig-dev@incubator.apache.org
Subject: RE: Next step towards URL gadgets - design proposal

Perhaps I misunderstood your statement, but your Design Requirement 2
states:

&lt;quote&gt;
2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters...
&lt;/quote&gt;

If you're talking about the setpref feature, will the user have to pass
session ID and some application-specific preferences as URL parameters?
I thought it wouldn't be secure.


 

  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;

 

  To:         &lt;shindig-dev@incubator.apache.org&gt;

 

  Date:       12/01/2009 09:53 AM

 

  Subject:    RE: Next step towards URL gadgets - design proposal

 






Not sure what you mean by "server side accessing of URL parameters"?

-----Original Message-----
From: Ilya.Shtein@Metavante.com [mailto:Ilya.Shtein@Metavante.com]
Sent: Tuesday, December 01, 2009 7:47 AM
To: shindig-dev@incubator.apache.org
Subject: Re: Next step towards URL gadgets - design proposal

The ability to handle URL gadgets "out of the box" is critical if we
want Shindig to become an enterprise asset, so I applaud the effort.
This said, does anyone have plans to address how URL gadgets will work
in a secure environment? I don't think " server side accessing of URL
parameters" plays very well here. The scenario is further complicated by
the fact that Shindig will frequently be used as a "service" rather than
co-hosted with the application. Would be interesting to hear how people
address these needs or if there are any plans to solve this once and for
all in Shindig.

Thanks,
Ilya




  From:       "Weygandt, Jon" &lt;jweygandt@ebay.com&gt;



  To:         &lt;shindig-dev@incubator.apache.org&gt;



  Date:       11/25/2009 01:52 PM



  Subject:    Next step towards URL gadgets - design proposal








A proposal for review and comment...

I would like to implement section 3.1.3(6)(c)
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadget
s-API-Specification.html#process. This will not be a complete
implementation for URL gadgets, but takes Shindig one step closer to the
specification, and will provide a platform for which server implementers
can experiment with URL functionality.

Design requirements:
================
1) URL gadget developers require features that they cannot easily
replace, such as rpc, dynamic-height, set-title, views, etc...

2) URL gadget developers do not require features like Prefs.get*, log,
etc...
     *) Some of these they would never use
     *) Prefs methods are replaced with server side accessing of URL
parameters

3) Same origin policy makes implementing makeRequest, dataRequest
impractical
     *) Server side calls to REST and RPC APIs are the alternative

Design proposal
=============
libs parameter
This will be a variant of the /gadgets/js/rpc.js. It will fetch the
URL-Gadget-Side JS necessary.

Feature libraries, JS Servlet, Rendering Context To support a reduced
set of JavaScript, and maybe even a different set of JS the changes will
start with introducing a new RenderingContext.URLGADGET. "c=2" for the
JSServlet. Down to the feature.xml file having a new tag &lt;urlgadget&gt;

Some of the individual feature JS may be split apart to support
inclusion in gadget context separately from urlgadget context.

Currently the rendering does a redirect as part of the ifr call. I will
also introduce an option into shindig.properties, whereby the metadata
call will return the external URL as part of iframeurl, instead of the
ifr url with a redirect.

Open Issues
==========
The spec does not address how one determines the "servers JavaScript
request handler path". I don't propose to address this as part of this
effort, since few containers will actually support URL gadgets, the
developer will pretty much know who they are targeting.

The issue of the gadget developer putting "foreign" JavaScript on their
page introduces cross site scripting concerns for them. This is also
beyond the scope of this patch, but would probably be addressed by
signing the request and developers whitelisting the servers that they
support.

Comments
=========
I would be doing the changes to the Java side of Shindig.

As to the additional tag in features.xml with respect to PHP, it appears
the PHP code (GadgetFeatureResigtry.php) is similar to the Java side, it
will simply ignore the new tag.



---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------




---------------------------------------------------------------------
The information contained in this message is proprietary and/or
confidential.  If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
---------------------------------------------------------------------



</pre>
</div>
</content>
</entry>
</feed>
