I hit an issue where I needed to Search LDAP from a machine I didn’t have access to install new RPMs on. I found this cool article on CURL and LDAP Search. I had to make some minor modifications to get it to work with a secure connection (–insecure ldaps:// and 636). I also added -v to diagnosis some connection problems.
curl "ldaps://127.0.0.1:636/DC=IBM.COM?cn,objectClass?sub?(objectClass=)" -u "cn=user1,ou=test_org3,o=dr,DC=IBM.COM" --insecure -v
Enter host password for user 'cn=user1,ou=test_org3,o=dr,DC=IBM.COM':
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 636 (#0)
* LDAP local: LDAP Vendor = OpenLDAP ; LDAP Version = 20428
* LDAP local: ldaps://127.0.0.1:636/DC=IBM.COM?cn,objectClass?sub?(objectClass=)
* LDAP local: trying to establish encrypted connection
You can then find the userids you need quickly. I left them off the output intentionally.
If you see connected, but no results, I suggest changing to the top level of the ldap, and using this string – ldaps://127.0.0.1:636/DC=IBM.COM?cn,objectClass?sub?(objectClass=*)
As many of you know, I have been working with JAX-RS and WebSphere Liberty for a few years now. Somehow, after this time has passed, I still seem to uncover new JAX-RS capabilities.
For those familiar with JAX-RS, you know it generates some funky errors. I wanted to control the data in the response. I started looking at Servlet Filters, however, by the time you get the response it’s fully committed. I started looking at JAX-RS filters and exception handlers. I found ExceptionMapper and ClientErrorException. The WebSphere Liberty documentation includes a good overview.
I implemented the ExceptionMapper and set a custom response. You could add any of these exceptions – BadRequestException, ForbiddenException, NotAcceptableException, NotAllowedException, NotAuthorizedException, NotFoundException, NotSupportedException. I also added the @Provider annotation to the top of the class, and added a reference in the Application declaration.
I have been working on a project with IIB (IBM Integration Bus). If you are like me, you want to automate all those pesky build tasks. In IIB, I needed to package and build my project (BAR).
I investigated scripting the build using the mqsipackagebar command . I noticed at the bottom a description of using it with ANT.
I’ve used ANT in a few projects (in combination with Maven). I took the script as a starting point, added the jar files and property files (based on configuring environments without IIB). I configured the maven-antrun-plugin in order to integrate within my parent project’s maven build.
Here is some sample code for you, I hope it helps you all get started:
To setup ODBC bridge from IBM Integration Broker to DB2, download and install the ODBC bridge from the IBM Data Server Runtime Clients. It’s a 1.3 G download, and you only need about a 40M file for your system.
The installation is straight foward. Be prepared to click Next, and Finish.
Setup the ODBC bridge and IIB
Start > Run
Click on Data Sources
Click on Configure ODBC