Expected serverHost string for license servlet

Having trouble installing Oxygen? Got a bug to report? Post it all here.
tzimnoch
Posts: 6
Joined: Wed Dec 03, 2014 12:48 am

Expected serverHost string for license servlet

Post by tzimnoch »

For deployment with a larger application I want to run the license servlet on WebSphere 8.5.

I downloaded the .war file, unpacked it, deleted the message digest and RSA information from META-INF, added license.txt to WEB-INF/license, edit the role-names to match my application's users, and so on, then repackaged the war file.

I added the following to my application.xml file:

Code: Select all

<module id="Module_OxygenLicenseServlet">
<web>
<web-uri>oXygenLicenseServlet.war</web-uri>
<context-root>${project.name}_oXygenLicenseServlet</context-root>
</web>
</module>
After deploying my application to my local development environment, I navigate to http://localhost:9080/${project.name}_o ... let/report. I get a screen that gives me information about my licenses (correct number, registration name, company and product) and that none are currently in use. Seems so far so good.

In the Applet, I make a change to the AuthorComponentFactory.init function call used from the standalone developer license key to specifying serverHost and serverPort. I cannot seem to find the correct String wanted for serverHost. I have tried unknown variations on
"http://localhost:9080/${project.name}_o ... e-servlet/" (with ${project.name} correctly resolved) and match the port number in the hostname to the server port asked in the function all.
e.g.
http://localhost:9080/${project.name}_o ... e-servlet/
http://localhost:9080/${project.name}_o ... se-servlet
http://localhost:9080/${project.name}_o ... seServlet/
http://localhost:9080/${project.name}_o ... nseServlet

with and without the port number embedded in the host name. I get an Unknown Host dialog message every time.

I am in a single sign on environment, but when I try to switch to the init method that takes a host, username and password the error messages change from Unknown Host to Unexpected Response and the dialog shows the start of an html response.

I tried to resolve this from the documentation, but it says : http://www.oxygenxml.com/InstData/Edito ... .html#init(java.net.URL[], java.net.URL, java.net.URL, java.lang.String, java.lang.String, int)
serverHost - The license key to use with the Oxygen Author component
serverPort - If license key is missing, the license can be floating and the license server information can be specified, else they are ignored
I probably have some other issue entirely, like maybe it won't work through localhost or I cannot change the context root, but I'm at a loss. How can I make this work?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Expected serverHost string for license servlet

Post by adrian »

Hi,

The AuthorComponentFactory.init method has multiple signatures. The one with 'String serverHost' and 'int serverPort' is supposed to be used for the standalone floating license server. It does not work with the license servlet.

For the license servlet you need to use this one (the one with String servletURL):

Code: Select all

AuthorComponentFactory.init (URL[] frameworksZIPURLs, 
URL optionsZipURL,
URL appletCodeBase,
String appletID,
String servletURL,
String userName,
String password)
As the servletURL you should pass the URL ending in '/license-servlet':
http://localhost:9080/${project.name}_o ... se-servlet
AFAIK this does not work with single sign on. You will have to provide a user and password for authentication.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
tzimnoch
Posts: 6
Joined: Wed Dec 03, 2014 12:48 am

Re: Expected serverHost string for license servlet

Post by tzimnoch »

Thank you. That cut out a lot of run around. I have it working now.

In my SSO test environment, which uses WebSphere's user repository, I supplied the user's name with "" as the password. license-servlet/report updated with 1 used license and at the bottom of the page showed my user name, since, IP and MAC address. This disappeared a short while after closing the applet.

I won't get to test in my development environment for a while, but I'm anxious to see that it works there too so there are no further surprises, but it appears to work at least in SSO at least when deployed in WebSphere.
Post Reply