I have a client who is interested in calling a Worklight adapter from separate projects. For example the adapter might live in ProjectA and the app lives in ProjectB. When I attempt to invoke a procedure for an adapter that resides in ProjectA from my client code in ProjectB using Worklight V6, I see the error
FWLSE0020E Ajax request exception, Adapter testAdapter does not exist.
Is there a way to call adapters that reside in a different project than the client code?
I saw the following question which stated that adapters are per-project entities: worklight server configuration - separating adapters and server
As Idan mentioned at the bottom of the question you linked:
In Worklight 6.0 you are now able to concurrently run multiple
Worklight projects (or, .war files) in the same server instance, so
while adapters are still per-project entities, you can have them
duplicated in separated projects on the same server machine running
Worklight Server and have multiple separate projects (applications)
use that server to connect to the backend.
The adapters being in different projects isn't as important as them being hosted on different WAR files. The client can only connect to an adapter that lives on the Worklight server that the client has been configured to connect with (to my knowledge, someone correct me if I'm wrong).
If you want two projects to connect to the same WAR file, right click your Worklight project and then click "Change Worklight Target Server". Change the context path to the name of the project you want all of your deployments to go to:
Now all adapters and all clients from both projects will go to the same WAR, and I can call the Worklight adapter from a client that connects to either project.
Note: For the second project, you may have to build each application for a remote server to point to the correct context root. I'm not sure and haven't tried it myself.
Related
Using CLI runtime is not pushed to remote development server (only adapters and applications). Is there a way to push runtime (WAR) to remote development server?
The CLI is not supposed to deploy the .war file. The CLI only handles the project artifacts.
If you want to "share" a war file with another remote server then you could simply copy over the entire project folder to a different machine and launch it there. Then, in your original machine, add the remote server using "mfp server add".
Since the two projects are essentially the same, pushing wlapps and adapters should then pass successfully.
I am trying to set up a windows 7 64bit enterprise machine as a BizTalk development machine. Everything works well except..
I've installed the necessary adapters from the BizTalk installer, I've also installed the SAP 7.2 adapters as it has been done on the server.
The problem is that when I am trying to create a send port and define my filter I cannot find Microsoft.Adapters.SAP. properties in the drop down.
It is available in the server but not in my development machine. Any clues?
It's because the Assembly with the SAP Adapter Properties is not deployed to the Group during Setup. Why? Who knows, but it's always been like that.
You have to manually add Microsoft.Adapters.SAP.BiztalkPropertySchema.dll and they'll show up. I always add it to the BizTalk Application 1 Resources but you can put it in any Application.
You will have to add a Reference to use those props in any Port Filter.
Be sure to check GAC on Add.
I missed something when looking at our current setup on the server.
On the application itself you have to go to resources and Add the BizTalk SAP adapter dlls from C:\Program Files (x86)\Microsoft BizTalk Adapter Pack\bin
I ended up adding;
- Microsoft.Adapters.SAP.BizTalk.dll
- Microsoft.Adapters.SAP.BiztalkPropertySchema.dll
- Microsoft.Adapters.SAP.SAPGInvoker.dll
And sure enough the properties now appear in the filters section of the send port.
My configuration is:
OS: RHEL 5.7
IBM DB2 10.1
WAS8.5
WL6.1.0.1 (last fix pack installed)
When reading the WL6.1 Information Center, it is said that you can deploy several Worklight projects (that is, several project WAR files) to an application server just as you would deploy any JEE application: each deployed project must have a unique name and a unique context path.
This exactly what I am trying to do using the Server Configuration Tool located under the directory '/opt/IBM/Worklight/shortcuts/'.
When deploying the first WAR file under a WebSphere Application server profile, the Server Configuration Tool works perfectly and creates/deploys an EAR file named 'IBM_Worklight_Console.ear', in which the WAR file is included. However, when using the Server Configuration Tool to deploy a new WAR file under the same WebSphere Application server profile, the Server Configuration Tool creates the same EAR file named 'IBM_Worklight_Console.ear' with the new WAR file included. But obviously it overwrites the first Worklight Server configuration, preventing to deploy several Worklight projects to the websphere application server profile as it is supposed to do.
What could be the problem?
The Worklight documentation, section "Configuring multiple IBM Worklight projects", says that for multiple Worklight project WAR files in WebSphere Application Server, each must have a different id. In the Worklight Server Configuration Tool, you enter this id in the "Application server configuration" panel, in the "Deployment id" field. Once you choose a different id for each, they will be able to coexist. (At most one of the ids can be left empty.)
My Worklight project use the security module and WorkLightAuthenticator WorkLightAuthLoginModule. When I run the application on environment
development, it works perfectly. When I import the project to the remote server, it seems that do not find the WorkLightAuthenticator.
To import to the remote server, I need to do something besides include the .adapter and .wlapp the Worklight Console?
Changes made in authenticationConfig.xml on eclipse comes with these files (. and adapter. wlapp), or need to do manually on the remote server?
Changes made to the authenticationConfig.xml file are saved in the bin\<projectName>.war file. You must re-deploy this .war file.
See this IBM Worklight Information Center topic: Deploying IBM Worklight applications to test and production environments
Also see this training module for an overview about the process of moving to production (which also provides a general overview of a Worklight project)
I am trying to deploy multiple adapters to a Worklight Server in a production environment. When refreshing the console, the deployed adapters are missing.
What is the problem?
Can you please take a look at your Worklight Server log to see if any errors are displayed. I have seen in the past similar behavior when adapter procedures relied on security-tests, but the security tests were not defined properly in the authenticationConfig.xml file on the server side. In the server log I saw the following error:
"Failed to deploy adapter. This may be due to a JavaScript error in your adapter implementation"
If this is the case please update your authenticationConfig.xml on your production server to match the properties you have defined in your development environment. Also do these adapters deploy successfully in your development environment when running locally?
Make sure that the Studio the adapter was created in and the Server the adapter is deployed to are of the exact same build number
This is reason #1 for adapters to get deployed and then immediately get removed.