|
From: Tyler C. <tyl...@gm...> - 2006-02-06 22:51:12
|
On 2/6/06, Sandro Magi <naa...@gm...> wrote:
> It was the first example. I copy+pasted one after another as I e-mailed. =
I
> realized after the fact that there actually was no specified constructor =
so
> it must have been using a default one. I suspect this should still work
> though right?
Ah yes, that must be it then. And since the first example doesn't
implement java.io.Serializable, an attempt to serialize an instance
will fail. The first example should be modified to look like:
package com.example.hello;
public final class
Hello {
private
Hello () {}
public static String
getGreeting() { return "Hello World!"; }
}
Loading this class in the Waterken Server should produce XML like:
<list>
<doc schema=3D"http://example.com/hello/Hello-class">
<greeting schema=3D"http://web-calculus.org/pointer/Link">
<target>./?key=3Dabcd-efgh-ijkl</target>
</greeting>
</doc>
</lis>
A GET on the greeting URL should produce:
<list>
<doc schema=3D"http://web-calculus.org/string/String">Hello World!</doc>
</list>
Tyler
--
The web-calculus is the union of REST and capability-based security:
http://www.waterken.com/dev/Web/
Name your trusted sites to distinguish them from phishing sites.
https://addons.mozilla.org/extensions/moreinfo.php?id=3D957
|