Results 1 to 10 of 16

Hybrid View

  1. #1
    Member
    Join Date
    Oct 2007
    Location
    new york
    Posts
    9

    Unable to find Engine

    Hello guys,

    i have created a simple .NET adapter. Now I need to create a simple web page that would connect to LS server and get everything that the adapter sends out. LS is running locally on my developement machine. I created an HTML code like this:

    Code:
    <html>
     <head>
       <title></title>
         <script src="ls/lscommons.js"></script>
         <script src="ls/lspushpage.js"></script>
     </head>
      <body>
    	
     </body>
    	
    <script language="javascript" type="text/javascript">
    
    var schema = "hdln smbl body tpcid cmnd";
    
    var lsPage = new PushPage();
    lsPage.context.setDomain(null);
    lsPage.onEngineCreation = startEngine;
    lsPage.onEngineReady = engineReady;
    lsPage.bind();
    lsPage.createEngine("SLEngine", "LS/lsengine.html");
    
    function startEngine(eng) 
    {
    	eng.policy.setMaxBandwidth(30);
    	eng.policy.setIdleTimeout(30000);
    	eng.policy.setPollingInterval(1000);
    	eng.connection.setLSHost("localhost");
    	eng.connection.setLSPort("8080");
    	eng.connection.setAdapterName("HEADLINESDEMO");
    	eng.changeStatus("STREAMING");
    }
    
    function engineReady ()
    {
        var newTable = new NonVisualTable("item",schema,"MERGE");
        newTable.onItemUpdate = updateItem; 
        lsPage.addTable(newTable, "1");
    }
    when I open this page I am getting an error message "ER Bind Unable to find Engine..check your.. bla bla".

    Could you please point me out how do I create a client application?

    Thanks

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hello,

    Probably you have some experience with the old loadEngine/loadEngineMinimal methods.

    there is an error on your createEngine call:

    The path for the createEngine method is not the path of the lsengine.html file but the path of the library.
    So your call should be:

  3. #3
    Member
    Join Date
    Oct 2007
    Location
    new york
    Posts
    9
    Mone,

    thanks a lot for the reply. I changed the path to the library to "ls/" and now everytime I open my page I see a message "Streaming system is connecting..." at the bottom of the browser. And nothing happens next.. I have my LS server up and running and my adapter is connected to the LS server.

  4. #4
    Member
    Join Date
    Oct 2007
    Location
    new york
    Posts
    9
    Mone,

    Do you have a simple step-by-step tutorial with a simple sample code of how to connect to a LS server from a web page and get simple updates from it?

    I have implemented my client side according to those sample code you provided here but it sill does not work.

    Thanks a lot

  5. #5
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hello,

    you can find a tutorial here, and another one on the software distribution. Look for LS_HOME/DOCS-SDKs/sdk_client_web/doc/Web Client Tutorial.pdf . Read also LS_HOME/DOCS-SDKs/sdk_client_web/examples/StockListDemo/README.TXT .

    Your configuration is ok if you access the page from Lightstreamer internal web server with an url like http://localhost:8080/MyApp/

    Please note that the use of localhost is discouraged. Please use a complete machine name (e.g.: mypc.mydomain.com) even if you are just testing LS on your local environment.

  6. #6
    Member
    Join Date
    Oct 2007
    Location
    new york
    Posts
    9
    I put LSS on the same machine as the webserver and created a DNS record "test.domain.com". Here is the new client side code:

    Code:
    <html>
     <head>
        <script src="ls/lscommons.js"></script>
        <script src="ls/lspushpage.js"></script>
      </head>
      <body>
    	
      <script language="javascript" type="text/javascript">
    
      var lsPage = new PushPage();
      lsPage.context.setDomain(null);
      lsPage.onEngineCreation = startEngine;
      lsPage.onEngineReady = engineReady;
      lsPage.bind();
      lsPage.createEngine("SLEngine", "ls/");
    
     function startEngine(eng) 
     {
       eng.policy.setMaxBandwidth(30);
       eng.policy.setIdleTimeout(30000);
       eng.policy.setPollingInterval(1000);
       eng.connection.setLSHost("test.domain.com");
       eng.connection.setLSPort(8080);
       eng.connection.setAdapterName("HEADLINESDEMO");
       eng.changeStatus("STREAMING");
    }
    
    function engineReady ()
    {
        var newTable = new NonVisualTable(new Array("item"), new Array("id", "hdln","smbl","body","tpcid","cmnd"), "DISTINCT"); 
        newTable.onItemUpdate = updateItem; 
        lsPage.addTable(newTable, "1");
    }
    
    function updateItem(item, updateInfo, name) 
    {
        trace (...);
    }
    
     </script>
    </body>
    </html>
    I am still on the same page. When this page is opened in the browser I see "Streaming system is connecting..." message

 

 

Similar Threads

  1. unable to find engine-chrome browser
    By georgeeapen in forum Client SDKs
    Replies: 1
    Last Post: May 25th, 2009, 10:21 AM
  2. Client error - Unable to find the Engine
    By kg_can in forum Client SDKs
    Replies: 1
    Last Post: March 7th, 2008, 10:11 AM
  3. ER bind Unable to find the Engine
    By eduramires in forum Client SDKs
    Replies: 3
    Last Post: February 4th, 2008, 10:14 AM
  4. ER bind Unable to find the Engine
    By eduramires in forum General
    Replies: 1
    Last Post: January 29th, 2008, 06:03 PM
  5. Unable to find the Engine
    By RichP1 in forum Client SDKs
    Replies: 6
    Last Post: December 18th, 2007, 02:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 01:24 PM.