I think this type of regular expression will get you into trouble at times - the .* operator is going to be greedy and match as much as possible. Safer would be:
<NewId>([^<]*)</NewIdt> or <NewId>([-a-z0-9]*)</NewIdt> (not sure if that initial '-' has to be escaped inside the brackets). Point being, make your regular expression as restrictive as you can, and it will usually be more robust as a result. -Mike On Tue, 2005-05-17 at 10:45 +0530, Manjunath N.S. wrote: > Hi, > > >From the First WebService Response extract the ID information into > variable, using PostProcess/Regular Expression Extractor into > Variable. and Later use this Variable in the next TestCase. > > > Regular Expression Extractor > > VariableName: NewId > RegularExpression: <NewId>(.*)</NewIdt> > Template:$1$ > > In the Second Request use NewID Variable Extracted into SOAP Request > soap:Body> > > <Validate xmlns="http://www.mydomain.com/myWebservices"> > > <inputContext> > > <NewId> ${NewId} </NewID> > .... > </...> > > thanks > Manju > On 5/16/05, Donato Trony <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm trying to build a test plan for Web Services and I'm using JMeter > > version 2.0.3 with JDK 1.4.2_08-b03. I've already made a simple/single > > request that it's working well. > > > > The application that I am trying to test need the following sequence: > > > > - The first request returns an identification that will be used in the > > next requests. This is the reply that I get: > > > > <?xml version="1.0" encoding="utf-8"?> > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <soap:Body> > > <GetNewIDResponse xmlns="http://www.mydomain.com/myWebservices"> > > <GetNewIDResult> > > > > <NewIDUpdateDate>2005-05-16T13:51:17.1130000+01:00</NewIDUpdateDate> > > <OutputContext> > > <NewId>debaa047-a763-42d3-a728-caafad2a6c5d</NewId> > > </OutputContext> > > </GetNewIDResult> > > </GetNewIDResponse> > > </soap:Body> > > </soap:Envelope> > > > > - Afterwards I need to extract > > <NewId>debaa047-a763-42d3-a728-caafad2a6c5d</NewId> from > > the reply and in the following next requests I must always indicate > > the previous NewId. > > > > The goal is to have something like this: > > > > <?xml version="1.0" encoding="utf-8"?> > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <soap:Body> > > <Validate xmlns="http://www.mydomain.com/myWebservices"> > > <inputContext> > > <NewId>debaa047-a763-42d3-a728-caafad2a6c5d</NewId> > > <UserName>username</UserName> > > <UserPassword>userpassaword</UserPassword> > > </inputContext> > > </Validate> > > </soap:Body> > > </soap:Envelope> > > > > I'm not being able to do it so any help will be appreciated. > > > > Thanks, > > Donato > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

