I have an application in C# that currently authenticates to LDAP. We want to extend functionality to support IBM’s Tivoli Access Manager, which is comprised of a Policy Server, and an LDAP server (and other modules as well). Unfortunately authenticating with the LDAP server for our customer is not acceptable, thus we must bind with the policy server instead.
The TAM’s Policy Server has 2 APIs for authentication, one in Java, and one in C
My question: What is the better language for C# to interop, C or Java?
Keeping in mind: maintainability, and cost of development.
Thanks everyone in Advance.
Seems to me that C is the easier language for C# to inter-operate with, as there’s a native interface in .NET to allow ‘unsafe’ access. To communicate with Java, you have to go though JNI to get into Java, or use J#, or otherwise jump through hoops to communicate from C# to Java and back again.
I’ve not done any C# to Java communication (except across a socket or across Web Services), but I was on a team that used JNI to communicate from Java to COM via C++ code. We ended up having to throw away the JNI solution as too unwieldy. We rewrote the C++ component in C# and used a nailed-up socket for communication between the two components. This worked fabulously.
From this experience, if you are already using C#, then I would use the C API from C#. This is easy to do.