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.
IndexProcessing DevelopmentLibraries,  Tool Development › switchboard web services library
Page Index Toggle Pages: 1
switchboard web services library (Read 4652 times)
switchboard web services library
Apr 23rd, 2006, 7:01am
 
Hello everyone,

I'd like to introduce my Processing library, Switchboard.  The goal of Switchboard is to be a simple interface to as many web and network-related functions as possible, and to simplify the creation of projects that use several data sources. Currently, I have implemented 22 "services" (some more solid than others), including google, yahoo, msn, allmusic, shoutcast, foaf, and rss/atom feeds.  There are many more services planned, which can be found in the "to-do" section of the site.  Switchboard also includes utilities for screen scraping, including XQuery and Lucene text search.  The interface uses a simple callback method, similar to other Processing libraries with asynchronous elements.

I am just a little protective of Switchboard at the moment because there are still some semi-major bugs that I haven't had time to fix.  It is definitely usable, but I am posting it here mostly in the hope that some of you might want to help me sort out these bugs and/or add new features.  Underneath the interface is an extensible framework which is build on Apache Axis (among other packages), so it is pretty easy to add any service with a WSDL file.  I could also use help creating example code in the documentation.

Switchboard central
http://switchboard.sourceforge.net/

For more information about why I created Switchboard
http://www.realtimeart.com/thesis

If you have any questions or suggestions, please let me know.
Re: switchboard web services library
Reply #1 - Aug 12th, 2006, 2:18pm
 
Hi there,

switchboard seems to be a really nice library and is exactly what I need right now. The problem is that, after following the installation steps, the following code won't execute.  

import org.switchboard.*;

Switchboard board;

void setup() {

// The switchboard will be our interface to all of the services.

board = new Switchboard(this);
}

// this method will be called whenever we get a result from any of our services.
void resultReceived() {
}


The error message is:

endOfResults() was not found in class Temporary_1221_8474
You will not be notified when a service is finished.
status() was not found in class Temporary_1221_8474


-----------

I use processing 115 on linux.

Any suggestions?
Re: switchboard web services library
Reply #2 - Aug 13th, 2006, 2:16pm
 
I looked at the code of switchboard and figured out that

----------
endOfResults() was not found in class Temporary_1221_8474
You will not be notified when a service is finished.
status() was not found in class Temporary_1221_8474
----------

are only warnings which appear when certain methods are not implemented in the processing code. Maybe this could be indicated in future.
Re: switchboard web services library
Reply #3 - Oct 21st, 2006, 9:24pm
 
has anyone any experiences with the FOAF service..? i can not get it to work, even this simplified demo from jeff. prog just hangs..
what does the level number mean after the URL, bytheway?
thanks for reply.

import org.switchboard.*;

Switchboard board;

void setup() {

size(400, 400);

framerate(10);

background(20, 40, 60);


board = new Switchboard(this);

board.foaf("http://rdfweb.org/people/danbri/rdfweb/danbri-foaf.rdf", 2);

}

void resultReceived() {

if(board.resultService == Switchboard.FOAF) {


print(board.foaf.getName());



}
}

public void draw() {
 
}

Re: switchboard web services library
Reply #4 - Nov 13th, 2006, 3:11am
 
Hi all,

I was hoping someone might be able to point me in the right direction...

what API key should I be downloading from Google to use with the Switchboard Library? I have the "Base API", which doesn't seem to be returning anything...

is this the right Google API?
Code:

import org.switchboard.*;

Switchboard board;

void setup() {
board = new Switchboard(this);
board.setGoogleKey("----here is where I'm pasting my Google Base API key---------");
board.google("Hungry Hungry Hippo");
}

void resultReceived() {
println("anything?");
println(board.google.getURL());
}


this gives me nothing... (same as if I put a deliberately wrong key in)

any help, HUGEly appreciated

THANKS

C
Re: switchboard web services library
Reply #5 - Nov 26th, 2006, 12:16pm
 
I have exactly the same problem. I signed up for google base data api http://code.google.com/apis/base/signup.html but it doesn't work with that key. Does anyone have a solution for that problem?
Re: switchboard web services library
Reply #6 - Nov 26th, 2006, 5:09pm
 
marion,

I managed to figure it out eventually...

you want the SOAP service:

http://code.google.com/apis/soapsearch/

from there, it should be pretty easy to get going.

Google Base is some weird thing that from what I can tell, has pretty much nothing to do with anything :/

-C
Re: switchboard web services library
Reply #7 - Nov 26th, 2006, 6:22pm
 
hi 5cameron,

thanks for your fast help. I've tested it and it works perfectly. Great Smiley
Re: switchboard web services library
Reply #8 - Dec 5th, 2006, 3:59pm
 
Hello

I use switchboard to get results of webservices, especially from amazon and google.

I have problems with the number of results. There are only 10 results given back. Is it possible to change the number of results or to get more results, about 100?

Does anybody have a solution for this problem?
Re: switchboard web services library
Reply #9 - Jan 2nd, 2007, 2:10am
 
hi. I have a wsdl file and want to add a service... but I donn't know how.
Re: switchboard web services library
Reply #10 - Jan 12th, 2007, 7:21am
 
Inspired by the semi-evil decision by Google to discontinue support for their SOAP search API, I started a ground-up rewrite of Switchboard with a much leaner code base, better functionality, and lots more features.  Having already had one go at it, this version will be much cleaner and easier to use and maintain.  I have been working on it on and off for a few weeks now, but I would love (and desperately need) some help if anyone is interested.  

If you are interested, please send me a message on this board and we can discuss how this will work.  I am not longer working on the SourceForge SVN, so don't even bother looking on there.  Thanks guys.
Re: switchboard web services library
Reply #11 - Feb 9th, 2010, 3:51am
 
Hi, I've  this error message, have anyone this message? How can I resolve it?

resultReceived() was not found in class sketch_feb09g
You will not be notified when a service returns a result.
endOfResults() was not found in class sketch_feb09g
You will not be notified when a service is finished.
status() was not found in class sketch_feb09g
You will not be receive status messages.
9-feb-2010 12.36.10 org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.


Thank you very much

Cla
Re: switchboard web services library
Reply #12 - Feb 9th, 2010, 4:53am
 
That's not one error message, but several warning messages, quite explicit.
I believe they say you need to implement the mentioned functions if you want to get significant results/notifications in your sketch.
These functions are so-called call-back functions, ie. you provide them, and the library calls them when an event occurs: service returns a result, service is finished, library provides status messages, etc.
Page Index Toggle Pages: 1