on 04-14-2015 3:00 PM
We have an application developed in PB v8. Our client has asked us if PowerBuilder application can integrate with their Active Directory using single sign on. Users launch the application from Windows OS. They login to their desktop with network user id and password. When they run PB application, it should automatically authenticate with AD server (like Keberos) and open the application without asking credential again.
If this is not possible in PB v8 but later version like v12.5 supports SSO then it is possible for us to upgrade our application to PB v12.5.
I would like some assistance with implementing SSO feature in PB application. Any help provided would be much appreciated.
-Ravi
Hi Chris,
Many thanks for your suggestion, It worked for me. I am able to make Websso authentication using JAVA VM in my DOD machine,
But I am facing one more issue,
My build code is working fine in my desktop(DOD) but when I am running same in SDOD machine from shared drive It is giving error. "Failed to load JAVA VM, perhaps jvm.dll is not in current path".
I have placed jvm.dll and pbjvm125.dll in my current working directory and in classpath we have set pbejbclient125.jar and Other webssomigration.jar(used for websso)
Kindly let me know what is wrong and why I am getting this error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sourbh;
I believe that you need more than just the JVM.dll file for the JVM to execute. When I deploy my Java enabled PB applications, I also deploy the entire BIN folder contents and then add that to the System Path.
SystemPath = "%SystemRoot%;%SystemRoot%\System32;%SystemRoot%\System32\Wbem;%systemroot%\System32\WindowsPowerShell\v1.0\ ;%DotnetSDK4.0%;%DotnetSDK2.0%;%Dotnet4.0%;%Dotnet3.5%;%Dotnet2.0%;%PB12.6%;
%PB12.5%;%PB12.0%;%JavaPB%;%ASE15.7%;%GS_DLL%;%SA16%;%SA12%;%SA11%;
%Tesseract%;%ImageMagicK64%;%ImageMagicK32%;%GraphicsMagicK%;%WPTK%;
%ClearCase%;%NSSM%;%SS2008%;%WinMerge%;%VisualSVN%;%Java%;\Program Files\Microsoft SQL Server\110\Tools\Binn\;
HTH
Regards ... Chris
Hi Sourabh;
You have no given us much to work with on this issue. Unless you give us a lot more details as to what you are attempting to do - its hard to comment on this much further.
What I would suggest that you can do though is ...
1) Call the JAR from a Java test application and see if it works there.
2) In you PB Code, make sure that you use a TRY..CATCH around your JVM & Java Class call(s).
Regards ... Chris
Thanks for your reply Chris.
My question is inline from my last post "websso authentication from PB".
As mentioned, we have deployed websso.jar file and able to see methods in it and using JavaVM instance we are invoking method.
but while invoking the method, we are getting this exception
The exception is handled in TRY-CATCH block
One more thing: we are not getting this exception every time. Sometime It works fine and some time it throws this exception.Because of this, not sure what is the actual issue.
=> One more thing: we are not getting this exception every time. Sometime It works fine and some time it throws this exception.Because of this, not sure what is the actual issue.
Hmmm ...
1) I wonder if a clean-up method may not have been called that de-allocates the JVM and/or Java Class resources properly.
2) The other related issue may be calling the Java class repetitively and not giving the JVM time to clean-up its work areas. If that is the case - a simple Yield() or Sleep () might fix the issue.
3) Make sure you use the IsJavaVMLoaded() method first before trying to load another JVM instance.
4) If you are destroying the JVM instance - see # 2. Then think about using PB's GarbageCollect() command.
HTH
The points you have mentioned in above post are all in place and are taken care.
The more point we want to highlight here is, we have two applications for which we are implementing web sso,and both share the same code to authenticate user login.
If we launch App1 through PB, we are not getting this exception and able to authenticate successful and after that If we launch App2 it also works fine.
But when I am launching App2 first it is throwing exception and after that if we launch App1 it is also throwing same exception.
It means the settings/initialization (classpath, systempath) for App1 is correct and with same settings App2 is also working fine. In other way the App2 settings/initialization is having issue which will make App1 also to throw exception.
We checked classpath settings and It is same for both App1 and App2, What else can be checked for such issue?
Hi Sourabh;
Its hard for me to tell without reviewing your source code. However, it does should like there is a variation in the approach in App#2 vs App#1 - either in the sequence of the JVM start, Java execution, and/or clean-up.
Also, as just a thought - what happens if you start App#2 first using a "Run As Admin" option?
Regards ... Chris
The Issue for Exception is resolved, It was due to weblogic.jar which is used in our code for ejbconnection. Now, we have used wlfullclient.jar which worked for ejb and Javavm both.
Thanks for you support!!!
Code is working fine when we are running it from DOD machine but when we ran it from Shared drive through SDOD, It is giving JVM.dll not available at current path error, even when It was working fine when we have not integrated Websso changes. After adding new changes in existing code getting JVM.dll error.
We have JVM.dll in our current working directory.
Could you please suggest what else we should check to resolve this issue/error?
Hello Team,
We want to Implement WebSSO in PowerBuilder classic 12.5.
Tried 2 options but no success.
1. Webservice : but failed because WSDL is having security header which is not supported by PB Classic. And we have a constraintt to Implement this using PB .net
2. Ejb call: we can't use ejb to implement this because ejb server is required to be up and running for this.
We tried the 3rd option to call java method using JAVAVM which has Java Class and Java interface in jar file and deployed jar using EJB Client Proxy in Power builder by giving
Fully qualified remote interface class name
Fully qualified home interface class name
we are able to deploy the jar in powerbuilder and can see the class and method.
Also set classpath and created JAVAVM instance but while making a call to method application is getting crashed.
Can someone suggest, would it be possible to call java method by steps given above.
If not, then what else can be done to achieve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi;
I have done a full integration with Active Directory in my STD Foundation Classes framework. In fact, I am about to release a new PowerBuilder Classic built Web Service that brokers the AD interaction for you from any PB, Appeon Web or Appeon Mobile application. In fact, you could also use the Web Service features from C#, Java. Delphi, ASP, JSP, etc as well.
FYI: STD Foundation Classes | SourceForge.net
I am also about to present an in depth session on PB, Appeon and Active Directory integration at the 2015 PowerBuilder Conference on May 8, 2015 (Fully integrating Active Directory into your PB/Web/Mobile applications)
FYI: Friday May 8, 2015 | NCPBUG
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi;
I should be posting the new Web Service Active Directory In-A-Box code within the next week. However, the latest AD logic is all coded in PB 12.1. My philosophy is that I always publish in the lowest supported release. That would normally be 12.5.x today - but, I have found PB 12.6 totally unsuitable for production use due to its many run-time issues (basically we got PB 12.6 beta2 not a GA release IMHO). Also, the AD WS is built with my STD Web Service Foundation Classes framework - which also relies on a PB v12.1 or higher release.
So for the AD Web Service, you would just need a PB 12.1 or higher release of PowerBuilder to use it "as is". I have just completed testing the WS with PB 12.1 => 12.5.1 => 12.6 and it works great. PB 8.x can call (consume) a WS so you should be able to utilize the WS from your PB 8 application via EasySoap (only supported mechanism in PB 8.x).
However, you would still need to modify your PB 8 application to use ADSI (Active Directory System Interface) API's to get the User, Group or Role AD signature to pass to the Web Service. I have all that automatically coded in my STD "Integrated" Foundation Classes framework. You could certainly download and run the example OrderEntry application built from this fvramework and you will see how the AD signatures are captured. The framework is 100% PB code (no external DLL's) ... so all you would need to do is transpose the PB 12.1 code back to PB 8. The challenge in that will be fact that PB 8.x is ANSI based while PB v12.1 is Unicode based. So a little Unicode to ANSI backward code massaging would be required.
BTW: The STD "Integrated" and "Web Service" frameworks are free and open source: STD Foundation Classes | SourceForge.net
Regards ... Chris
PS: If you want the new Active Directory In-A-Box web service code sooner - let me know and I can send it to you.
Hi Ravi;
Yes, I did and I sent the WS code to you last Friday. Check your spam folder and see if it might of ended up in there.
In the mean time, I will post the code to SourceForge later today & let you know. In the worst case, you will be able to download it from SF this evening or tomorrow AM at the latest.
Regards ... Chris
Hi Ravi;
The "Beta1" version of the Active Directory (LDAP) Web Service "In-A-Box" code for PB 12.1 is now located on SourceForge for you enjoyment.
FYI: STD Foundation Classes - Browse /In-A-Box/LDAP at SourceForge.net
Please note that the installation notes and a client example that uses ADSI still needs to be created to properly demonstrate the use of this web service. However, you can run the WS "as is" after deployment to IIs and enter AD information for yourself and also groups you are authorized to access. The WS should return a +1 for OK and 0 for No. I will probably change the 0 (zero) to a -1 (for NO) in the final version to make this a C++ compliant standard.
At least you can look at the code & run it - even using the debugger - to get an idea how it works.
Enjoy!
Regards .... Chris
I tried it too, but I did not succeed
In my case i have to install some package in Oracle. So i abort the project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.