You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Adam Bradley <ad...@yahoo.com> on 2006/06/27 17:01:44 UTC

Q: Extracting a value from the result of a LDAP Extended Request (query)

I currently received the following from a query

---snip---
<ldapanswer>
<operation>
<opertype>search</opertype>
<searchfilter>(&(objectclass=BasicMobileDevice)(MDN=40000000))</searchfilter>
<searchbase>o=Meta,</searchbase>
<scope>2</scope>
<countlimit></countlimit>
<timelimit></timelimit>
</operation>
<searchresult>
<dn>DeviceName=BMD11515761684792932,ou=BasicMobileDevices,ou=Devices,ou=Identities,o=Meta,</dn>
<returnedattr>0</returnedattr>
</searchresult>
</operation>
<responsecode>0</responsecode>
<responsemessage>Success</responsemessage>
</ldapanswer>
---snip---

And I'm trying to do a vars.put("setDestDN",... to the value of <dn> in 
the result.  How might I accomplish this?

Thanks in advance
Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Q: Extracting a value from the result of a LDAP Extended Request (query)

Posted by sebb <se...@gmail.com>.
Much easier to use the Regex Extractor rather than BeanShell (which
you seem to be trying to use)

Template: $1$
RE:  <dn>(.+?)</dn>

S.
On 27/06/06, Adam Bradley <ad...@yahoo.com> wrote:
> I currently received the following from a query
>
> ---snip---
> <ldapanswer>
> <operation>
> <opertype>search</opertype>
> <searchfilter>(&(objectclass=BasicMobileDevice)(MDN=40000000))</searchfilter>
> <searchbase>o=Meta,</searchbase>
> <scope>2</scope>
> <countlimit></countlimit>
> <timelimit></timelimit>
> </operation>
> <searchresult>
> <dn>DeviceName=BMD11515761684792932,ou=BasicMobileDevices,ou=Devices,ou=Identities,o=Meta,</dn>
> <returnedattr>0</returnedattr>
> </searchresult>
> </operation>
> <responsecode>0</responsecode>
> <responsemessage>Success</responsemessage>
> </ldapanswer>
> ---snip---
>
> And I'm trying to do a vars.put("setDestDN",... to the value of <dn> in
> the result.  How might I accomplish this?
>
> Thanks in advance
> Adam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org