Problem with direct Invoke

igunawan
User offline. Last seen 1 year 45 weeks ago. Offline
Joined: 03/18/2010
Points: 10

Hi, I have this simple http get direct invoke mashup which runs fine on its own. But when I add an input on visual mashup composer, it won't save the mashup and saying
"Error execution Mashup Script : Unable to compile script : Error parsing mashup script : Element type "directinvoke" must be followed by either attribute specifications, ">" or "/>"". I am using Presto Developer edition on my own environment with Firefox. Anyone can help? Thanks.

0
Your rating: None
igunawan
User offline. Last seen 1 year 45 weeks ago. Offline
Joined: 03/18/2010
Points: 10

It's on Presto 2.7.0 Service Pack 1

aishmishra
aishmishra's picture
User offline. Last seen 10 weeks 6 days ago. Offline
Joined: 09/24/2008
Points: 3

Hi Indra,

i. Is the input that you are providing a document type?

ii. Could you please attach the EMML generated in your reply to this query. The following link will help in getting the EMML.

http://www.jackbe.com/prestodocs/v2.7.0/prestolibrary/wwhelp/wwhimpl/api.htm?href=PrestoLibrary.1.139.html

Do let us know in case you have queries.

igunawan
User offline. Last seen 1 year 45 weeks ago. Offline
Joined: 03/18/2010
Points: 10

Hi Aishmishra,

the input type is string. I'll attach the emml later. But what I find is, if you have an input and drag a line to  the direct invoke, then this will happens. But if I go from the direct invoke param and choose the input from one of the params which will then create an automatic line, then this will be ok. I don't know why you have this different behaviour according to the sequence of making it. Because the end diagram will be same.

igunawan
User offline. Last seen 1 year 45 weeks ago. Offline
Joined: 03/18/2010
Points: 10

Hi,

This is the EMML for only direct invoke (which works);

<mashup name="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema../src/schemas/EMMLSpec.xsd" xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema" xmlns:macro="http://www.jackbe.com/2008-03-01/EMMLMacro" >
<operation name="runMashup" >
<variable name="limitRecords" type="number" default="-2"/>

<output wires_id="output_0" name="output_0" type="document" service=""/>
<directinvoke _Wires_name="directinvoke_1" outputvariable="output_0" endpoint="http://www.google.com/" method="GET" _Wires_id="directinvoke_1" _Wires_label="Direct Invoke" #q="test" />

</operation>
</mashup>

igunawan
User offline. Last seen 1 year 45 weeks ago. Offline
Joined: 03/18/2010
Points: 10

And this one with input which does not worked:

<mashup name="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema../src/schemas/EMMLSpec.xsd" xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema" xmlns:macro="http://www.jackbe.com/2008-03-01/EMMLMacro" >
<operation name="runMashup" >
<variable name="limitRecords" type="number" default="-2"/>

<output wires_id="output_0" name="output_0" type="document" service=""/>
<directinvoke _Wires_name="directinvoke_1" outputvariable="output_0" endpoint="http://www.google.com/" method="GET" _Wires_id="directinvoke_1" _Wires_label="Direct Invoke" #q="test" 0="[object Object]" inputBlk="[object Object]" each="function (iterator, context) {
var index = 0;
iterator = iterator.bind(context);
try {
this._each(function (value) {iterator(value, index++);});
} catch (e) {
if (e != $break) {
throw e;
}
}
return this;
}"
eachSlice="function (number, iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var index = - number, slices = [], array = this.toArray();
while ((index += number) < array.length) {
slices.push(array.slice(index, index + number));
}
return slices.collect(iterator, context);
}"
all="function (iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var result = true;
this.each(function (value, index) {result = result && !!iterator(value, index);if (!result) {throw $break;}});
return result;
}"
any="function (iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var result = false;
this.each(function (value, index) {if ((result = !!iterator(value, index))) {throw $break;}});
return result;
}"
collect="function (iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var results = [];
this.each(function (value, index) {results.push(iterator(value, index));});
return results;
}"
detect="function (iterator, context) {
iterator = iterator.bind(context);
var result;
this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
return result;
}"
findAll="function (iterator, context) {
iterator = iterator.bind(context);
var results = [];
this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
return results;
}"
grep="function (filter, iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var results = [];
if (Object.isString(filter)) {
filter = new RegExp(filter);
}
this.each(function (value, index) {if (filter.match(value)) {results.push(iterator(value, index));}});
return results;
}"
include="function (object) {
if (Object.isFunction(this.indexOf)) {
if (this.indexOf(object) != -1) {
return true;
}
}
var found = false;
this.each(function (value) {if (value == object) {found = true;throw $break;}});
return found;
}"
inGroupsOf="function (number, fillWith) {
fillWith = Object.isUndefined(fillWith) ? null : fillWith;
return this.eachSlice(number, function (slice) {while (slice.length < number) {slice.push(fillWith);}return slice;});
}"
inject="function (memo, iterator, context) {
iterator = iterator.bind(context);
this.each(function (value, index) {memo = iterator(memo, value, index);});
return memo;
}"
invoke="function (method) {
var args = $A(arguments).slice(1);
return this.map(function (value) {return value[method].apply(value, args);});
}"
max="function (iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var result;
this.each(function (value, index) {value = iterator(value, index);if (result == null || value >= result) {result = value;}});
return result;
}"
min="function (iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var result;
this.each(function (value, index) {value = iterator(value, index);if (result == null || value < result) {result = value;}});
return result;
}"
partition="function (iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var trues = [], falses = [];
this.each(function (value, index) {(iterator(value, index) ? trues : falses).push(value);});
return [trues, falses];
}"
pluck="function (property) {
var results = [];
this.each(function (value) {results.push(value[property]);});
return results;
}"
reject="function (iterator, context) {
iterator = iterator.bind(context);
var results = [];
this.each(function (value, index) {if (!iterator(value, index)) {results.push(value);}});
return results;
}"
sortBy="function (iterator, context) {
iterator = iterator.bind(context);
return this.map(function (value, index) {return {value: value, criteria: iterator(value, index)};}).sort(function (left, right) {var a = left.criteria, b = right.criteria;return a < b ? -1 : a > b ? 1 : 0;}).pluck("
value");
}" toArray="function () {
return [].concat(this);
}"
zip="function () {
var iterator = Prototype.K, args = $A(arguments);
if (Object.isFunction(args.last())) {
iterator = args.pop();
}
var collections = [this].concat(args).map($A);
return this.map(function (value, index) {return iterator(collections.pluck(index));});
}"
size="function () {
return this.length;
}"
inspect="function () {
return "
[" + this.map(Object.inspect).join(", ") + "]";
}" find="function (iterator, context) {
iterator = iterator.bind(context);
var result;
this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
return result;
}"
select="function (iterator, context) {
iterator = iterator.bind(context);
var results = [];
this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
return results;
}"
member="function (object) {
if (Object.isFunction(this.indexOf)) {
if (this.indexOf(object) != -1) {
return true;
}
}
var found = false;
this.each(function (value) {if (value == object) {found = true;throw $break;}});
return found;
}"
entries="function () {
return this.map();
}"
_reverse="function reverse() {
[native code]
}"
_each="function forEach() {
[native code]
}"
clear="function () {
this.length = 0;
return this;
}"
first="function () {
return this[0];
}"
last="function () {
return this[this.length - 1];
}"
compact="function () {
return this.select(function (value) {return value != null;});
}"
flatten="function () {
return this.inject([], function (array, value) {return array.concat(Object.isArray(value) ? value.flatten() : [value]);});
}"
without="function () {
var values = $A(arguments);
return this.select(function (value) {return !values.include(value);});
}"
uniq="function (sorted) {
return this.inject([], function (array, value, index) {if (0 == index || (sorted ? array.last() != value : !array.include(value))) {array.push(value);}return array;});
}"
intersect="function (array) {
return this.uniq().findAll(function (item) {return array.detect(function (value) {return item === value;});});
}"
clone="function () {
return [].concat(this);
}"
toJSON="function () {
var results = [];
this.each(function (object) {var value = Object.toJSON(object);if (!Object.isUndefined(value)) {results.push(value);}});
return "
[" + results.join(", ") + "]";
}" remove="function (B) {
var A = this.indexOf(B);
if (A != -1) {
this.splice(A, 1);
}
return this;
}"
/>
<inputparam wires_id="inputparam_3" name="inputparam_3" type="string" default=""/>

</operation>
</mashup>