Re: wmlscript capabilities

On Tue, Apr 18, 2000 at 05:00:46PM -0400, Darth Julian wrote:
> First read of the WMLScript spec seems to indicate that the language has
> no hook into external code beyond calling another wmlscript "compilation
> unit."  If I want to a bit of WMLScript to call a URL (which isn't a
> compilation unit, but, say, a servlet that returns a string), am I out of
> luck?

It sounds like you may have answered your own question.

In your main WMLScript code, put a line

	use url ExternalServletFunction "http://foo.com/servlet/fn1.wmls";

at the top, then later you can do things like:

	x = ExternalServletFunction#myFn();

Which will call the servlet, and get back a string.

The servlet would generate WMLScript itself (not a pure text/plain 
string), and the resulting WMLScript would contain a function called
myFn. For example, the following may be the result of querying the
servlet:

extern function myFn()
{
  return "This is a dynamically generated string";
}

So, as you say, you can't get WMLScript to call anything that doesn't
have a WMLScript-like interface, but you can still access a string 
generated by a servlet.

> /jcb
> 

Andrew Scott .................... http://purl.oclc.org/net/andrewscott/
Telstra Research Labs, Melbourne ......................................

Received on Tuesday, 18 April 2000 20:13:58 UTC