I have been playing with the webservice sampler for a couple of weeks,
and I the regexp extractor is working well for me.
I have a scenario which is similar to yours:
1) one webservice creates a customer account, and the request contains
the newly created customer ID, which is an integer between 5 and 8 digits
2) with that ID, I need to do one more operation (say, change the password)
What I have is a regexp extractor like this
Reference Name: CustomerID
Regular Expression: (<addCustomerReturn
xsi:type="xsd:int">)([\d]{5,8})(</addCustomerReturn>)
Template: $2$
Match: 1
Default value: INVALID_ID
The idea is to use groups to make sure you don't match any random
integer, but exactly the customer ID, then with the template specify
that you want group 2.
In request 2 you can then use ${CustomerID}
I suggest to set the default value to something that will show very
clearly in request 2 in case the regexp extraction went wrong in request 1
Variable substitution works if you have online XML, not yet if you use a
file.
hope this helps
RE: Help with JMETER webservices(SOAP) test.
Sudarshan Krishnaprasad
Fri, 17 Feb 2006 08:34:10 -0800
Thanks Peter. I will try, but does not seem feasible.
-----Original Message-----
From: Peter Lin [mailto:[EMAIL <mailto:%5BEMAIL> PROTECTED]
Sent: Friday, February 17, 2006 9:58 AM
To: JMeter Users List
Subject: Re: Help with JMETER webservices(SOAP) test.
the current webservice sampler is very basic. One of the major challenges
with test SOAP is the response is stuck inside some XML, so you'd have to
use Regexp to parse out the value and then use it in a subsequent request.
to do that, make sure memory cache is turned off. In theory, a variable in
the request soap message "should" get replaced and then sent.
peter
On 2/17/06, Sudarshan Krishnaprasad <[EMAIL PROTECTED]> wrote:
>
> I am trying to test a webservice using JMeter. I have succesfully been
> able to test a webservice and got a response. The place where i get
> stuck is, I need to get the response from one method in this
> webservice and send it to another method to test in the webservice.
> Eg:
> Login - I successfully got a response.
> Search - I need to save the token from the login and do the search. I
> dont know how to save the token from the login webservice response and
> send it into the search SOAP message.
>
> Can anybody help me overcome this issue?
>
> Regards,
> Sudarshan Krishnaprasad
>
>
>
>
--
Ivan Rancati
SharpMind QA
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]