We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
proXML (Read 854 times)
proXML
Feb 13th, 2008, 6:53pm
 
Hello.

I make a work reading RSS with proXML. I can read RSS when I can play it on local(Mac OS10.3.9), but cannot play it on the server. Is there a person understanding a cause?

like this...
http://www.soda-lab.sakura.ne.jp/goo_api10/applet/

I am weak in English. If you are hard to read, I am sorry.

Re: proXML
Reply #1 - Feb 13th, 2008, 7:00pm
 
You can't use MovieMaker in an applet unless you sign it.

Here's the error sI get from your applet:
Quote:
Exception in thread "Thread-8" java.lang.ExceptionInInitializerError
at quicktime.util.QTUtils.<clinit>(QTUtils.java:32)
at processing.video.MovieMaker.<clinit>(MovieMaker.java:110)
at goo_api10.setup(goo_api10.java:38)
at processing.core.PApplet.handleDisplay(PApplet.java:1390)
at processing.core.PGraphics.requestDisplay(PGraphics.java:690)
at processing.core.PApplet.run(PApplet.java:1562)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.SecurityException: Applets that utilize QuickTime for Java must be signed.
at quicktime.QTSession.<clinit>(QTSession.java:79)

... 7 more
Re: proXML
Reply #2 - Feb 14th, 2008, 9:11am
 
Thank you very much.
I made a short program about reading RSS with proXML.
It can run on my local.
But I cannot play it on the server...
Please tell me why it cannot play.

http://www.soda-lab.sakura.ne.jp/goo_api10/applet2/

The following programs

import processing.xml.*;
XMLElement xml;
PFont metaBold;
int Length=50;
String[] message=new String[Length];
float[] X=new float[Length];
float[] Y=new float[Length];
float[] Z=new float[Length];
int k=0;

void setup(){
 size(640, 480,P3D);
 background(0);
 metaBold = loadFont("metaBold.vlw");
 textFont(metaBold, 12);

 xml = new XMLElement(this, "http://pipes.yahooapis.com/pipes/pipe.run?_id=FG2_iIyz3BG4JPpL9IS63A&_render=rss");
 XMLElement site = xml.getChild(0);
 XMLElement[] siteData = site.getChildren();
 String s1 = siteData[0].getName();
 String s2 = siteData[1].getName();
 for(int i=0;i<siteData.length;i++) {
   if(siteData[i].getName().equals("item")) {
     XMLElement[] items = siteData[i].getChildren();
     for(int j=0;j<items.length;j++) {
       if(items[j].getName().equals("title")) {    
         String addr = items[j].getContent();
         message[k]=addr;
         k++;
         //println(addr);
       }
     }
   }
 }

 for(int n=0;n<Length-2;n++) {

   X[n]=random(500);
   Y[n]=random(500);
   Z[n]=random(500);
   text(message[n], X[n], Y[n],Z[n]);
 }
 //println(message);
}

Re: proXML
Reply #3 - Feb 14th, 2008, 10:19am
 
That one will not run because an applet can only get data from its own server. So if the applet is on www.soda-lab.sakura.ne.jp it can only get data from www.soda-lab.sakura.ne.jp no other webserver.
Re: proXML
Reply #4 - Feb 14th, 2008, 10:41am
 
Thank you.
Then do I have a method to acquire RSS from an outside server and display it?
Re: proXML
Reply #5 - Feb 14th, 2008, 4:17pm
 
You'll have to write something in PHP (or ASP of whatever) which is on your server, which goes off and gets the remote file for you.
Re: proXML
Reply #6 - Feb 14th, 2008, 4:36pm
 
Thank you for answering my question.
I examine it and try it from now on.
Re: proXML
Reply #7 - Mar 18th, 2008, 3:40am
 
Probably this is because your web page is no longer in a local sandbox. Meaning, you'll have to set up a simple proxy. This is a common problem with ajax(xmlrequest) and I imagine it stand with processing.

check this out:
http://developer.yahoo.com/javascript/howto-proxy.html
Page Index Toggle Pages: 1