[Resolved]LDAP Data Connection and Data Source
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[Resolved]LDAP Data Connection and Data Source
http://directory.apache.org/api/groovy-ldap.html
It would be a great feature to have LDAP along with other data connections because one of the most high volume uses of web services is for directory and subscription based services that utilize LDAP as the primary or secondary data source.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be great to know the details of how it is tried & what problem being faced.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You just need to include library files in to your bin/ext. then if you add following two lines in the script and didn't see the infamous "can not be resolved" error, you're set to go

import org.apache.directory.groovyldap.LDAP
import org.apache.directory.groovyldap.SearchScope
Unfortunately the provided jar files are incomplete so you'll need to add 2-3 more jars, I tried to attach the zipped file here but I have limitation of only 2mb upload while the compressed file is around 5mb. Please let me know if I can upload it somewhere.
The rest can be found in the provided link.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am very new to this. I use Ready API 1.50 and 64bit Windows. Could you please let me know how I can connect to ldap using this Reday API?
Thx
J
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes! You can do in Ready! API. Here is a tutorial for SoapUI, which will work for Ready! API as well,
http://www.redrock-it.nl/using-groovy-to-connect-to-active-directory/
Thanks,
Samy
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others, Thanks. ↓↓↓
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am unable to connect to LDAP through groovy in ReadyAPI. I have added all ldap jar files under lib folder and re-started ReadyAPI. I tried same in ReadyAPI 1.3.1 and 1.9 version, but getting below error.
In the groovy script I called like this
import org.apache.directory.groovyldap.LDAP
import org.apache.directory.groovyldap.SearchScope
LDAP connection = LDAP.newInstance("ldap://devldapwt.xxxx.com:389","cn=iwsusercontextuser,ou=usercontextusers,ou=people,o=xxxx.com", "2qy80bd")
It is failing at the first line itself.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script11.groovy: 2: unable to resolve class org.apache.directory.groovyldap.SearchScope @ line 2, column 1. import org.apache.directory.groovyldap.SearchScope ^ org.codehaus.groovy.syntax.SyntaxException: unable to resolve class org.apache.directory.groovyldap.SearchScope @ line 2, column 1. at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:146) at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1222) at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:175) at org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit.java:648) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:928) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:590) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:539) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:297) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:692) at groovy.lang.GroovyShell.parse(GroovyShell.java:704) at groovy.lang.GroovyShell.parse(GroovyShell.java:740) at groovy.lang.GroovyShell.parse(GroovyShell.java:731) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:138) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:89) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:76) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:155) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:263) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Script11.groovy: 1: unable to resolve class org.apache.directory.groovyldap.LDAP @ line 1, column 1. import org.apache.directory.groovyldap.LDAP ^ org.codehaus.groovy.syntax.SyntaxException: unable to resolve class org.apache.directory.groovyldap.LDAP @ line 1, column 1. at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:146) at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1222) at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:175) at org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit.java:648) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:928) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:590) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:539) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:297) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:692) at groovy.lang.GroovyShell.parse(GroovyShell.java:704) at groovy.lang.GroovyShell.parse(GroovyShell.java:740) at groovy.lang.GroovyShell.parse(GroovyShell.java:731) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:138) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:89) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:76) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:155) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:263) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 2 errors
Any help would be appreciate.
Thanks
Ravi
