cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
161
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Kevin Pickard on 21-10-2011 12:01:07 PM
I am trying to create a gadget that accesses a webapp on another server on the same domain as the Finesse server and my gadget server (in fact it is this very same server). I am getting a "No Transport" error though. From my reading on jquery.com this is likely a cross-site scripting issue as the underlying AJAX code does not allow cross-site scripting by design. But in my case everything is on the same domain.
 
I have my gadget on a Windows box running IIS. It is being loaded by the finesselayout.xml file on the Finesse box (as recommended). The gadget runs fine until it trys to access the other webapp. The webapp is on the same server as the gadget itself (ie. the Windows box running IIS). Both this Windows server and the Linux based Finesse server are on the same domain (although I don't think the Finesse box actually tries to join the domain in the way Windows does).
 
Below is the code snippet that is giving me the problem. The .post is triggering the AJAX .error entry as well as the AJAX .complete entry. The .error entry shows the "No Transport" error.
 
Has anyone managed to get this sort of functionality working?
 
Also if this does turn out to be a cross-site scripting issue, will there be an option in the final Finesse interface to allow modifying the underlying webserver to allow what it may be interpreting (due to Linux/Windows domain issues) as cross-site scripting? I am sure I could use root access to set something in the Finesse webserver to allow this but that access will not be in the final product.
 
So here is the code snippet.



            var jqxhr = $.post("http://myserver:8090/index.html", function(data) {
                    _agentMessage.text("Message: Got response " + data);
            })
            .success(function(data, textStatus, jqXHR) {
                _agentMessage.text("Message: success '" + textStatus + "' '" + data +"'");
            })
            .error(function(jqXHR, textStatus, errorThrown) {
                _agentMessage.text("Message: error '" + textStatus +"' '" + errorThrown + "'");
            })
            .complete(function(jqXHR, textStatus) {
                _agentMessage.text("Message: complete '" + textStatus +"'");
            });
 
Kevin

Subject: RE: Third-Party Webapp Access
Replied by: Swamynathan.b Balasubramanian on 24-10-2011 02:57:04 AM
Kevin,

I am able to access third party apps from Finesse using the following methodology.

I installed Apahce Shindig on a Windows 7 desktop machine (tomact as Web Server) and have a sample gadget.xml file in it.

Contents of the file are as follows.

<?xml version="1.0" encoding="UTF-8"?>

<Module>
<ModulePrefs title="My Sample" height="250" />
<Content type="url" href="http://172.16.18.34/Stats/Default.aspx" /> </Module>


The default.aspx is hosted under IIS in the same Windows 7 box.

I called the sample gadget.xml from the finesse third party gadget xml.

When i logged into the agent application i could see the Default.aspx getting loaded in Finesse Agent desktop.

Hope this helps.


Thanks
Hari

Subject: RE: Third-Party Webapp Access
Replied by: Kevin Pickard on 24-10-2011 01:46:43 PM
Thank you Hari for the response.

Yes I got that method to work earlier but it strictly runs the remote webapp with no access to the Finesse desktop by the same gadget (ie. you cannot have gadget code running behind this). I need to have a Finesse desktop gadget (using the Finesse API and actively processing BOSH events and such) also interfacing with a third-party app at the same time. So this form of implementation that basically "replaces" the gadget completely with a remote webapp will not work.

Kevin
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links