I'm trying to do a simple invocation of a service published in Presto Mashup Server. When the javascript modules are loaded I get the exception:
Class is not defined presto-connect.js()() presto-connect.js (line 618) Presto.DataProxy = Class.create({
When I try to create the Presto connection I get the following exception: Object.extend is not a function" coming from line 148 of presto-connect.js.
I put the following in my HTML as instructed in the documentation.
I'm trying to do a simple invocation of a service published in Presto Mashup Server. When the javascript modules are loaded I get the exception:
Class is not defined presto-connect.js()() presto-connect.js (line 618) Presto.DataProxy = Class.create({When I try to create the Presto connection I get the following exception:
Object.extend is not a function" coming from line 148 of presto-connect.js.I put the following in my HTML as instructed in the documentation.
<script language="javascript" src="http://localhost:8080/static/common/js/prototype-1.6.0.js"></script> <script language="JavaScript" src="http://localhost:8080/static/common/js/presto-utils.js"></script> <script language="JavaScript" src="http://localhost:8080/static/common/js/presto-connect.js"></script>My Javascript looks like this:
function getData(wordRoot)
{
try
{
var prestoUrl = "http://127.0.0.1:8080/presto";
var connection = new Presto.Connection({prestoUrl: prestoUrl, username: 'xxx', password: 'xxx'});
}
catch (e)
{
console.error(e);
}
connection.request(
{ //request configuration
sid: 'SpellSuggest',
oid: 'getData',
//input parameters
params: {
"wordRoot":wordRoot,
"size":10
}
},
{ //callback
onSuccess: function(response) {
console.log('response = ');
console.log(data.response);
alert('success');
},
onFailure: function(err) {
alert('failure = ' + err.message);
},
scope: this
}
);
console.log("done");
}
any ideas? Thanks!