JsClientBridge errors - resolved

malkishtini at gmail.com malkishtini at gmail.com
Fri Jan 20 19:19:47 UTC 2023


Hello again,

My problem is resolved with the help of Omnis support team (thank you team😊).

 

I thought to share the solution here, before I forget, in case someone else runs into the same problem.

When the Omnis web server is installed on a web server/IIS and not running on its local server in Omnis dev version, the property should be set as follows (be careful when setting the ports as they are the confusing portion of the setup, or at least they were to me):

 

Calculate lJSCBridgeRow.webserverurl as http:// <http://%3cserveraddressORServerIP%3e.com/cgi-bin/omnisapi.dll> <serveraddressORServerIP>.com/cgi-bin/omnisapi.dll

Calculate lJSCBridgeRow.omnisserverandport as  <http://%3cserverIP%3e:%3cthe%20Omnis%20web%20server%20port%3e%20> http://<serverIP>:<the Omnis web server port>    ##Or Only the <the Omnis web server port> if the app is deployed on the same server as the fat client app.

Calculate lJSCBridgeRow.omnislibrary as "Web"

Calculate lJSCBridgeRow.omnisclass as "rfSnapin"

Calculate lJSCBridgeRow.serverport as $prefs.$serverport    ## the port no of the Omnis fat client that is running oBrowser

 

I hope the documentation was clear enough in describing these properties, especially the confusing ones. 😊

 

Happy Friday, 

Mayada

 

From: malkishtini at gmail.com <malkishtini at gmail.com> 
Sent: January 19, 2023 6:36 PM
To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Cc: 'malkishtini' <malkishtini at gmail.com>
Subject: JsClientBridge errors

 

Hi all,

 

I'm not having any luck in running our JSClient form in oBowser when using the JSClientBridge in 10.22 when the Omnis web server is deployed on IIS.

While it worked fine if I run the JSForm in dev version of Omnis.

Before I started, I checked the doc in https://github.com/OmnisStudio/Omnis-JSCBridge and stared my work and everything worked fine until I deploy the JSClient app on IIS.

 

 

I wonder if anyone has worked with this combination before:

 

*	Running an Omnis fat Client app which runs a window with oBrowser that communicates with a JSform that is deployed on windows/IIS on the same or different server.

I setup the htmlcontroloptions as below, which works fine when Omnis, that runs JS client, is running in Dev version of Omnis and using the local server (5621is the port of the Omnis version that runs JSClient)

 

Calculate lJSCBridgeRow.webserverurl as http://127.0.0.1:1021 

Calculate lJSCBridgeRow.omnisserverandport as http:// <http://%3cserverIP%3e:80%20%3chttp:/%3cserverIP%3e:80%20%3e%20> <serverIP>:80 

Calculate lJSCBridgeRow.omnislibrary as "Web"

Calculate lJSCBridgeRow.omnisclass as "rfSnapin"

Calculate lJSCBridgeRow.serverport as "" 

 

 

After I deployed the app to IIS, I changed the params to below (I tried so many combinations of properties but I'm having no luck yet in finding the right ones), so I'm hopping that someone from the list could point me to what I'm doing wrong here if they have done this before:

Calculate lJSCBridgeRow.webserverurl as http:// <http://%3cserveraddress%3e.com%20> <serveraddress>.com  

Calculate lJSCBridgeRow.omnisserverandport as http:// <http://%3cserverIP%3e:80%20%3chttp:/%3cserverIP%3e:80%20%3e%20> <serverIP>:80 

Calculate lJSCBridgeRow.omnislibrary as "Web"

Calculate lJSCBridgeRow.omnisclass as "rfSnapin"

Calculate lJSCBridgeRow.serverport as "5621"  ## 5621 is the port for the Omnis web server that runs the JSForm, I was told to use the Omnis port for the Omnis fat client and I tested that port as well and same error

 

The setting above throws this error: "An error occurred when communicating with the server, click ok to try again"

 

Then I changed the setting to :

Calculate lJSCBridgeRow.webserverurl as http:// <http://%3cserveraddress%3e.com/cgi-bin/omnisapi.dll> <serveraddress>.com/cgi-bin/omnisapi.dll 

Calculate lJSCBridgeRow.omnisserverandport as http:// <http://%3cserverIP%3e:80%20%3chttp:/%3cserverIP%3e:80%20%3e%20> <serverIP>:80 

Calculate lJSCBridgeRow.omnislibrary as "Web"

Calculate lJSCBridgeRow.omnisclass as "rfSnapin"

Calculate lJSCBridgeRow.serverport as "5621"  ## 5621 is the port for the Omnis web server that runs the JSForm, I was told to use the Omnis port for the Omnis fat client and I tested that port as well and same error

The setting above throws this error: "400 bad request - Omnis port not specified or invalid (reported by Omnis ISAPI extension)"

 

 

This is the details in the index.htm of the JSClient app:

 

<div id="omnisobject1" style="position:absolute; top:0; left:0; width:100%; height:100%;" 

data-webserverurl=http://<serveraddress>.com http:// <http://%3cserveraddress%3e.com> <serveraddress>.com /cgi-bin/omnisapi.dll

data-omnisserverandport="5621" 

data-omnislibrary="Web" 

data-omnisclass="rfSnapin" 

data-themename="default"

data-dss="'js320x480Portrait','js768x1024Portrait'" 

data-param1="" data-param2="" 

data-commstimeout="0">

</div>

 

I'm able to successfully load the page when I go directly to http:// <http://%3cserveraddress%3e.com> <serveraddress>.com thru the browser or pass the URL to oBrowser without using the JSClientbridge, which tell me that the web app is setup properly.

So I'm wondering what am I doing wrong in my code??

 

Thank you in advance for any input on this issue.

 

 

Best regards,

Mayada



More information about the omnisdev-en mailing list