How to call worklight adapter from other adapter - ibm-mobilefirst

How to call method of one adapter from the method of other adapter?
Suppose, I have two adapters :
1. ReadAdapter that has method ReadFile.
2. CreateAdapter that has method CreateFile
Now I wants to call ReadFile method of ReadAdapter from CreateAdapter's CreateFile method.
Is it possible in Worklight 6.1

Please look at the following presentation which outlines this exact behavior:
http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v610/04_07_Advanced_adapter_usage_and_mashup.pdf
Worklight even provides a corresponding sample to compliment the presentation:
http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v610/AdapterMashUpProject.zip
The sample above shows a project with multiple adapters with the following structure:
The sample even provides code snippets for calling one adapter from another such as:

Related

Get Karate request data using another util service

One of the param for my API is security related and linked to the environment on which the test would run , essentially it will be dynamic.
Since this is security related, I have an internal rest API that provides this data.
I want to understand what is the effective way of getting this data in Karate feature?
I have tried two different ways:
1. Defined a java util and invoke the java type and def variable for holding the data
Defined a Util method as part of karate-config.js
In karate-config.js
function getSomeData(someValue) {
return Java.type('xyz.abc.util.MyUtil');
}
In the feature file
defined a JS
* def dataFromJS = read('classpath:com/xyz/util/js_that_invokes_rest.js')
I want to understand if there is a pattern of how this should be done or if there is an explicit support in Karate for doing this?
I have an internal rest API
Well. Did you just forget that Karate is all about making REST requests !? :)
Please create a re-usable feature, make that REST call, define the variables that you need and now you can call it from other features.
Please refer to the documentation: https://github.com/intuit/karate#calling-other-feature-files

Failure in creation of feature class: Unable to create object class extension COM component

I am working with ArcGIS 10.5, installed on-premise, and are developing our feature class in .NET.
I have an issue with registering feature classes. We have created a Feature Class and registered the DLL through “ESRIRegAsm.exe”, and it appears in ArcCatalog:
Trigger appearing image
But when I try to create the Feature Class, I get the following error:
Failed to create feature class. Unable to create object class extension COM Component
Which isn't very helpful, unfortunately.
The odd thing is, that we have another trigger registered on another Feature Class, that works as expected. And the new trigger is based on a copy of the old trigger's code (with changed GUID's).
The steps I have done so far:
I have tried to add the feature class to the component category using categories.exe.
Registered it using ESRIRegAsm.exe for both Desktop and Engine.
Checked that there are .ecfg config files - and there are.
Checked that the CLSID's appear in the windows registry.
The essential parts of our trigger source-code can be found here: here.
Any help would be greatly appreciated, as we are stuck on this.
Our issue was that our ID's were wrong in the code.
The ClassExtensionCLSID should return the same ID as TriggerExtension has.
Moreover, InstanceCLSID should always return 52353152-891A-11D0-BEC6-00805F7C4268, and should hence not get a new ID.

Getting "NotesException: Not implemented" exception while invoking session.getCalendar(string,string)

I am using Lotus Domino 9.0.1.Was using Notes API for Java(Remotely) to get the calendar items.Copied NCSO.jar from server(domino\data\domino\java\NCSO.jar) and given the same as a classpath in my eclipse.But when i try to invoke session.getCalendar(string,string) method it is giving "NotesException: Not implemented" error.
I have a slightly different answer than Richard's. Since Notes & Domino 9.0, the Java Session interface does include a getCalendar method documented here. It's the way you get an instance of NotesCalendar.
However, there are two implementations of Session: 1) The "local" implementation exported by Notes.jar, and 2) the "remote" implementation exported by NCSO.jar. The getCalendar method is only implemented in Notes.jar.
Of course, if you really need to use NCSO.jar, this amounts to the same answer. The "remote" version of Session.getCalendar() is not implemented.
The getCalendar method is not available in the Session class of Notes API for Java. See the API documentation here.
That method is only exposed in the classes for SSJS.

Where does console output go in an IIS hosted app?

Say I have a WCF app hosted in IIS. And in that app I run this line of code:
Console.WriteLine("Testing, testing 1 2 3");
Where will that be written to? Or is it ignored and just lost?
Is there someway to capture it when needed?
Nowhere. More specifically:
NullStream, which is defined as "A Stream with no backing store.".
All the methods do nothing or return nothing. It is an internal class
to Stream. The following code is taken from Microsoft's source code.
Basically, when one of the Console write methods is call the first
time, a call is made to the Windows API function GetStdHandle for
"standard output". If no handle is returned a NullStream is created
and used.
quoted from here: https://stackoverflow.com/a/2075892/12744
actually, the same answer goes to on to address the second part of your question too:
To actually redirect Console output, regardless of the project type, use
Console.SetOut(New System.IO.StreamWriter("C:\ConsoleOutput.txt")),

CAN Controller DLL with Java Application. Unable to open CAN port

I am creating a Java application that controls a Controller Area Network (CAN) controller via a vendor-supplied can.dll file.
can.dll contains a function bool openPort(DWORD memAddr) that allows the application to establish connection with the CAN controller.
I wrote a C++ test application, loaded can.dll via LoadLibrary and found this function to be working as it should, i.e. it returns true.
However, in my Java application, calling this via JNI or JNA returns false.
I hope someone can help me with this problem as I have been trying to fix this problem for more than a week.
Thanks :)
JL
I think you might want to look at sockets as an alternative or other IPC solutions.