Discussion:
ISIM API through TDI
Add Reply
rp
2017-10-11 16:57:56 UTC
Reply
Permalink
Raw Message
Havent done this in a while and remember going through a lot of grief the last time i attempted it. I am trying to folowo along with this technote but its not workign for me.

http://www-01.ibm.com/support/docview.wss?uid=swg21659565

Wanted to see if anyone had luck getting TDI 7.1.1 working with either ISIM 6 or 7 VA.
The instructions are obviously missing a few steps but my issue is the code isnt able to get past the initial setup of the env hashtable?

env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.CONTEXT_FACTORY, platformContextFactory);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_URL, appServerURL);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_PRINCIPAL, ejbUser);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_CREDENTIALS, ejbPwd);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_REALM, itimRealm);
rp
2017-10-11 16:59:36 UTC
Reply
Permalink
Raw Message
Post by rp
Havent done this in a while and remember going through a lot of grief the last time i attempted it. I am trying to folowo along with this technote but its not workign for me.
http://www-01.ibm.com/support/docview.wss?uid=swg21659565
Wanted to see if anyone had luck getting TDI 7.1.1 working with either ISIM 6 or 7 VA.
The instructions are obviously missing a few steps but my issue is the code isnt able to get past the initial setup of the env hashtable?
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.CONTEXT_FACTORY, platformContextFactory);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_URL, appServerURL);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_PRINCIPAL, ejbUser);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_CREDENTIALS, ejbPwd);
env.put(Packages.com.ibm.itim.apps.InitialPlatformContext.PLATFORM_REALM, itimRealm);
Forgot to post the error- here it is:

com.ibm.jscript.InterpretException: Script interpreter error, line=27, col=13: Java method 'put(com.ibm.itim.apps.InitialPlatformContext.CONTEXT_FACTORY, string)' on java class 'java.util.Hashtable' not found
yn2000
2017-10-11 22:24:15 UTC
Reply
Permalink
Raw Message
I got the same error message if I removed the listed jar files from jars folder. So, my guess, there is a missing jar file; or you just simply forgot to restart TDI after you add the jar files.
Rgds. YN.
rp
2017-10-12 16:03:13 UTC
Reply
Permalink
Raw Message
Post by yn2000
I got the same error message if I removed the listed jar files from jars folder. So, my guess, there is a missing jar file; or you just simply forgot to restart TDI after you add the jar files.
Rgds. YN.
Hi yn2000 i managed to make some progress by following your suggesstions and reorganizing all the isim jar files into their own folder under 3rdparty\ibm\isim. it seems be working ok now but now i get a Nullpointer exception and not sure what the cause is. i have alrady downloaded all the tmsmessages* properties files and bundled them into a jar file and dropped in the same folder above.

12:00:46,491 INFO - Successfully got platform context
12:00:46,506 INFO - ***@5b56866a
12:00:46,538 INFO - Logged in
12:00:46,553 INFO - loginContext: ***@2f593edf - Subject:
12:00:46,600 ERROR - [stuff1] CTGDIS809E handleException - cannot handle exception , script
java.lang.NullPointerException
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:379)
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:341)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:133)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:112)
at com.ibm.di.server.ScriptComponent.add(ScriptComponent.java:216)
at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(AssemblyLine.java:3760)
at com.ibm.di.server.AssemblyLine.executeMainStep(AssemblyLine.java:3380)
at com.ibm.di.server.AssemblyLine.executeMainLoop(AssemblyLine.java:2989)
at com.ibm.di.server.AssemblyLine.executeMainLoop(AssemblyLine.java:2972)
at com.ibm.di.server.AssemblyLine.executeAL(AssemblyLine.java:2939)
at com.ibm.di.server.AssemblyLine.run(AssemblyLine.java:1317)
12:00:46,616 ERROR - CTGDIS266E Error in NextConnectorOperation. Exception occurred: java.lang.NullPointerException
java.lang.NullPointerException
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:379)
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:341)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:133)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:112)
at com.ibm.di.server.ScriptComponent.add(ScriptComponent.java:216)
at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(AssemblyLine.java:3760)
at com.ibm.di.server.AssemblyLine.executeMainStep(AssemblyLine.java:3380)
at com.ibm.di.server.AssemblyLine.executeMainLoop(AssemblyLine.java:2989)
at com.ibm.di.server.AssemblyLine.executeMainLoop(AssemblyLine.java:2972)
at com.ibm.di.server.AssemblyLine.executeAL(AssemblyLine.java:2939)
at com.ibm.di.server.AssemblyLine.run(AssemblyLine.java:1317)
12:00:46,616 DEBUG - CTGDIS075I Trying to exit TaskCallBlock.
12:00:46,616 DEBUG - CTGDIS076I Succeeded exiting TaskCallBlock.
12:00:46,616 INFO - CTGDIS100I Printing the Connector statistics.

Any clues as to what this error is? i think the subject is also coming back as null even though it seems to be able to "login" to ISIM.
yn2000
2017-10-12 18:32:09 UTC
Reply
Permalink
Raw Message
I wonder there is typo in your script, because the log says that you have 'Logged in', but then the Subject shows null.
Rgds. YN.
Franzw
2017-10-13 07:20:07 UTC
Reply
Permalink
Raw Message
Post by yn2000
I wonder there is typo in your script, because the log says that you have 'Logged in', but then the Subject shows null.
Rgds. YN.
Did you remember to make the tmsMassages.properties available to your TDI - on external systems the easiest way is to jar up the tmsMessages*.properties files from your ISIM system and include that into the jars folder of TDI...

If you running this on an ISIM server you can reduce this by including the isim/data path into the Java classpath - this will also give you additional options to play with (hint - Properties.properties is required by many internal ISIM APIs - this is not always documented in the APIDoc)

HTH
Regards
Franz Wolfhagen

PS - I should really post a guide on this - I have spent so much time figuring this out so it should really be part of the common knowledge... - but my free time is non-existing.
rp
2017-10-13 15:21:03 UTC
Reply
Permalink
Raw Message
Post by Franzw
Post by yn2000
I wonder there is typo in your script, because the log says that you have 'Logged in', but then the Subject shows null.
Rgds. YN.
Did you remember to make the tmsMassages.properties available to your TDI - on external systems the easiest way is to jar up the tmsMessages*.properties files from your ISIM system and include that into the jars folder of TDI...
If you running this on an ISIM server you can reduce this by including the isim/data path into the Java classpath - this will also give you additional options to play with (hint - Properties.properties is required by many internal ISIM APIs - this is not always documented in the APIDoc)
HTH
Regards
Franz Wolfhagen
PS - I should really post a guide on this - I have spent so much time figuring this out so it should really be part of the common knowledge... - but my free time is non-existing.
Franz, yep i jarred up all the tmsmessages.* props files and copied the jar to C:\IBM\TDI\V7.1.1\jars\3rdparty\IBM\isim. I dont know what else is missing?

google is also coming up blank for that exception and i dont see anyting on the ISIM side as well for why the subject is null.


1:18:08,676 INFO - Successfully got platform context
11:18:08,691 INFO - ***@af155607
11:18:08,738 INFO - Logged in
11:18:08,754 INFO - loginContext: ***@7314e04a - Subject:
11:18:08,832 ERROR - [stuff1] CTGDIS809E handleException - cannot handle exception , script
java.lang.NullPointerException
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:379)
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:341)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:133)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:112)
at com.ibm.di.server.ScriptComponent.add(ScriptComponent.java:216)
at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(AssemblyLine.java:3760)
Franzw
2017-10-14 10:36:25 UTC
Reply
Permalink
Raw Message
Post by rp
Post by Franzw
Post by yn2000
I wonder there is typo in your script, because the log says that you have 'Logged in', but then the Subject shows null.
Rgds. YN.
Did you remember to make the tmsMassages.properties available to your TDI - on external systems the easiest way is to jar up the tmsMessages*.properties files from your ISIM system and include that into the jars folder of TDI...
If you running this on an ISIM server you can reduce this by including the isim/data path into the Java classpath - this will also give you additional options to play with (hint - Properties.properties is required by many internal ISIM APIs - this is not always documented in the APIDoc)
HTH
Regards
Franz Wolfhagen
PS - I should really post a guide on this - I have spent so much time figuring this out so it should really be part of the common knowledge... - but my free time is non-existing.
Franz, yep i jarred up all the tmsmessages.* props files and copied the jar to C:\IBM\TDI\V7.1.1\jars\3rdparty\IBM\isim. I dont know what else is missing?
google is also coming up blank for that exception and i dont see anyting on the ISIM side as well for why the subject is null.
1:18:08,676 INFO - Successfully got platform context
11:18:08,738 INFO - Logged in
11:18:08,832 ERROR - [stuff1] CTGDIS809E handleException - cannot handle exception , script
java.lang.NullPointerException
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:379)
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:341)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:133)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:112)
at com.ibm.di.server.ScriptComponent.add(ScriptComponent.java:216)
at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(AssemblyLine.java:3760)
I think I spotted your problem - if you are using the the internal ejbuser you will be allowed to create the context, but you will get an null pointer exception if you do create a "real" isim user with the same name e.g. isimuser.

This is actually something I believed changed between ITIM 5.1 and ISIM 6 due to new logon logic (real was login with a mapper - and the ejb user is not mapped to an ISIM user by default).

Try running as "itim manager" or create an isim useer matching your ejb user in ISIM and let us hear the result...

I would think you should show us some more of your code if it still not works - it is by pure chance I spotted the ejbuser reference...

HTH
Regards
Franz Wolfhagen
rp
2017-10-17 15:19:15 UTC
Reply
Permalink
Raw Message
Post by Franzw
Post by rp
Post by Franzw
Post by yn2000
I wonder there is typo in your script, because the log says that you have 'Logged in', but then the Subject shows null.
Rgds. YN.
Did you remember to make the tmsMassages.properties available to your TDI - on external systems the easiest way is to jar up the tmsMessages*.properties files from your ISIM system and include that into the jars folder of TDI...
If you running this on an ISIM server you can reduce this by including the isim/data path into the Java classpath - this will also give you additional options to play with (hint - Properties.properties is required by many internal ISIM APIs - this is not always documented in the APIDoc)
HTH
Regards
Franz Wolfhagen
PS - I should really post a guide on this - I have spent so much time figuring this out so it should really be part of the common knowledge... - but my free time is non-existing.
Franz, yep i jarred up all the tmsmessages.* props files and copied the jar to C:\IBM\TDI\V7.1.1\jars\3rdparty\IBM\isim. I dont know what else is missing?
google is also coming up blank for that exception and i dont see anyting on the ISIM side as well for why the subject is null.
1:18:08,676 INFO - Successfully got platform context
11:18:08,738 INFO - Logged in
11:18:08,832 ERROR - [stuff1] CTGDIS809E handleException - cannot handle exception , script
java.lang.NullPointerException
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:379)
at com.ibm.itim.util.I18NMessage.getMessage(I18NMessage.java:341)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:133)
at com.ibm.itim.exception.ITIMException.getMessage(ITIMException.java:112)
at com.ibm.di.server.ScriptComponent.add(ScriptComponent.java:216)
at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(AssemblyLine.java:3760)
I think I spotted your problem - if you are using the the internal ejbuser you will be allowed to create the context, but you will get an null pointer exception if you do create a "real" isim user with the same name e.g. isimuser.
This is actually something I believed changed between ITIM 5.1 and ISIM 6 due to new logon logic (real was login with a mapper - and the ejb user is not mapped to an ISIM user by default).
Try running as "itim manager" or create an isim useer matching your ejb user in ISIM and let us hear the result...
I would think you should show us some more of your code if it still not works - it is by pure chance I spotted the ejbuser reference...
HTH
Regards
Franz Wolfhagen
Franz, sorry for the delay i got tied up with something else.

here is the sample code i am using to get a context and subject. the code seems to print success for those 2 calls but the actual API call all the way at the bottom is failing with SSL handshake isssues.

https://gist.github.com/rpuggal/49f87733242b24026874cc0d5162ea91


When i run with SSL trace on in TDI via updating solution.props and turning on javax.net.debug=all. i see this in the console output.

Tue Oct 17 11:17:25 EDT 2017 AssemblyLines/testitout, READ: TLSv1 Alert, length = 2
Tue Oct 17 11:17:25 EDT 2017 AssemblyLines/testitout, RECV TLSv1 ALERT: fatal, handshake_failure
Tue Oct 17 11:17:25 EDT 2017 %% Invalidated: [Session-8, SSL_DHE_RSA_WITH_AES_128_CBC_SHA]
Tue Oct 17 11:17:25 EDT 2017 AssemblyLines/testitout, called closeSocket()
Tue Oct 17 11:17:25 EDT 2017 AssemblyLines/testitout, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure


Been trying to isolate this for days now with no success. IBM support doesnt have much of an idea also and i have tried everythign on the google interwebs. Any idea if you or anyone else has seen ssl handshake issues while trying to call the ISIM 6 /7 API and how you were able to resolve it?
yn2000
2017-10-24 00:25:37 UTC
Reply
Permalink
Raw Message
I wonder you have copied key.p12 and trust.p12 files from WAS server into the TDI client/remote machine and then update C:/IBM/ssl.client.props telling where those keystore files are.
Rgds. YN.
rp
2017-11-03 22:59:01 UTC
Reply
Permalink
Raw Message
Hi yn2000 sorry for delay I responded . We gave up the effort of getting the Java API to work and decided to use the web services for ISIM 7. Seems to work a lot better although I will admit its been a few years since I dabnled with it. This is all in the custom Java code and using soapui for WS testing.i feel like there are some major gaps in the API documentation that need to be addressed.
We surely can't be the first people to encounter the issues we have encountered!
Franzw
2017-11-04 16:38:30 UTC
Reply
Permalink
Raw Message
Post by rp
Hi yn2000 sorry for delay I responded . We gave up the effort of getting the Java API to work and decided to use the web services for ISIM 7. Seems to work a lot better although I will admit its been a few years since I dabnled with it. This is all in the custom Java code and using soapui for WS testing.i feel like there are some major gaps in the API documentation that need to be addressed.
We surely can't be the first people to encounter the issues we have encountered!
You are not....

I am working on something unofficial - but as I am heavily overloaded this will take some time.

I agree there are so many undocumented pitfalls in this that needs to be addressed.

Remember that you can extend the ISIM WS if you need additional functionality - look in the samples...

regards
Franz Wolfhagen

Loading...