Topic
2 replies Latest Post - ‏2013-01-07T20:31:35Z by tonye1
tonye1
tonye1
2 Posts
ACCEPTED ANSWER

Pinned topic Worklight Studio 5.0.5 and local WL Servers

‏2013-01-07T19:06:53Z |
Hi,
I'm using Worklight Studio 5.0.5 Consumer Edition. I also have Configured TomCat, Liberty Profile, and WebSphere 7 as Worklight 5.0.5 servers. However, WL Studio 5.0.5 does not recognize the WL 5.0.5 servers such that it will allow them to be used as Test Servers. Only the Jetty Server allows "add and remote" of a Worklight project. This causes lots of problems, since the Jetty server can't do security, or just about anything that requires an external class.

I've seen the thread about the free Developer download not being able to add a Worklight-enabled Appserver - this is not that edition.

I believe setting "Target Server" on the Studio shows this well. When trying to set Targetted Runtimes of any Worklight enabled AppServer to the Worklight Server, the Worklight servers are grayed out, and the hint says "If a runtime that you want to select is not displayed or is disabled you may need to uninstall one of the currently installed project facets". This tells me that Studio doesn't recognize the Worklight jars on the target servers.
  • MichaelOrtman
    MichaelOrtman
    35 Posts
    ACCEPTED ANSWER

    Re: Worklight Studio 5.0.5 and local WL Servers

    ‏2013-01-07T19:53:57Z  in response to tonye1
    Hello,

    In short, you cannot 'Build All and Deploy' to a remote Worklight server (even if it is on the same machine). Studio starts a server with an embedded version of Jetty, and is accessible on localhost:8080/console. To administer on a remote server, it is a little more complex. You can find the full documentation in the infocenter (http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m5/index.jsp), specifically in "IBM Worklight Server administration > Installation > Deploying content: applications and adapters"

    To use things like security require a little bit of manual work since you are required to use a supported application server (Jetty does not work with security mechanisms like LTPA). You would configure your remote worklight server directly by editing the WAR file instead of editing the project's server configuration. To deploy applications to your remote worklight server, you can use the included ANT task, or manually deploy the .wlapp or .adapter files. This info is in the "Deploying content: applications and adapters" section in the infocenter link above.

    Hope this helps,
    Mike
    • tonye1
      tonye1
      2 Posts
      ACCEPTED ANSWER

      Re: Worklight Studio 5.0.5 and local WL Servers

      ‏2013-01-07T20:31:35Z  in response to MichaelOrtman
      Hi Mike
      Thanks for this. Understood that you can uncomment the various LTPA pieces in the AuthenticationConfig.xml and a WAR file will still build, then you can manually configure it as you would any WAR file (FYI, I usually just re-import the WAR file to an EAR file in a new EAR project so that I can set PARENT-LAST classloading on the WAR file explicitly).

      The confusion comes in because, after uncommenting the LTPA entries in the AuthenticationConfig.xml, if you do nothing else, the first and only message you get when trying to build is the "Worklight Project Test-project-customization failed to start: com.ibm.websphere.security.WSSecurityException" message,
      so it's pretty hard to tell if the war file is any good.

      So maybe to summarize: If you configure your AuthenticationConfig.xml for LTPA and get the WSSecurityException message, the WAR file created in BUILD-ALL is still fine, but the WAR file is a seeded to deploy only for a WebSphere deployment, and you still have some manual work to do to make it complete.

      Maybe this posting will help others similarly confused. Thanks for your help.