summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/js/TuscanyWebsocketToolkit.js
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/js/TuscanyWebsocketToolkit.js')
-rw-r--r--sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/js/TuscanyWebsocketToolkit.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/js/TuscanyWebsocketToolkit.js b/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/js/TuscanyWebsocketToolkit.js
index 501250f3cf..ede28579d3 100644
--- a/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/js/TuscanyWebsocketToolkit.js
+++ b/sca-java-2.x/contrib/modules/binding-websocket/src/main/resources/js/TuscanyWebsocketToolkit.js
@@ -20,9 +20,9 @@
var channels = [];
function buildRequest(operation, message) {
- return $.toJSON({
+ return JSON.stringify({
operation: operation,
- payload: $.toJSON(message)
+ payload: JSON.stringify(message)
});
}
@@ -34,7 +34,7 @@ function sendMessage(port, operation, message) {
$(document).trigger('' + port);
}
ws.onmessage = function (message) {
- var response = $.evalJSON(message.data);
+ var response = eval('(' + message.data + ')');
eval('Tuscany.WebsocketComponentContext.' + response.operation + '.responseHandler(' + response.payload + ')');
}
}