On 10/04/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Sebb, > Thanks here is how I have my tests setup: > > -Thread Group > ??? -WebserviceSoap1 > ??? ?? -View Results Tree > ??? ?? -Regular Expression Extractor > ??? -Simple Data Writer > ??? -Save Responses to file > ??? -WebServiceSoap2 > ??? ?? -View Results Tree > > I then changed it to check "Response Code" as you suggested.
No, I did not suggest that. Response Code is "200" or "404" etc. You need to apply the RE to the Body. > I changed the RE to <Town>(.+?)</Town> as suggested. > And i checked the Jmeter log and nothing out of the ordinary there yet still > the values is being set as "failed"? :-( That was in case of syntax errors in the RE. > > > > > > > > > -----Original Message----- > From: sebb <[EMAIL PROTECTED]> > To: JMeter Users List <[email protected]> > Sent: Thu, 10 Apr 2008 9:05 am > Subject: Re: using Regular Expression Extractor with XML > > > > > > > > > > > On 10/04/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have a WebService(Soap)Request that is working and I get a response back > in > results tree: > > > > <NewDataSet>? <Table>??? <Town>Eltham</Town>??? <County>Greater > London</County>??? <PostCode>SE9</PostCode>? </Table>? <Table>??? > <Town>Mottingham</Town>??? <County>Greater London</County>??? > <PostCode>SE9</PostCode>? </Table>? <Table>??? <Town>New Eltham</Town>??? > <County>Greater London</County>??? <PostCode>SE9</PostCode>? </Table>? > <Table>??? <Town>Well Hall</Town>??? <County>Greater London</County>??? > <PostCode>SE9</PostCode>? </Table>? <Table>??? <Town>Avery Hill</Town>??? > <County>Greater London</County>??? <PostCode>SE9</PostCode>? > </Table></NewDataSet> > > > > So i then (after this step) added a Regular Expression Extractor to try > and > pull out a value for Town: > > > > Add it as a child so it only applies to the relevant sample. > > > Response Field to Check:? (i have tried both Response Message and Body its > not clear which one I should be using for XML?) > > Response Message is usually "OK" - it is the text of Response Code. > > > Reference Name: town > > Regular Expression: <Town>(.+*)</Town> > > Not a valid RE, you need > > Regular Expression: <Town>(.+?)</Town> > or > Regular Expression: <Town>([^<]+)</Town> > > > Template: $1$ > > Match No.:? 1 > > Default Value: failed > > > > In the next WebService Sampler I have the following as my SOAP Request: > > > > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:web="http://www.webserviceX.NET"> > > ?? <soapenv:Header/> > > ?? <soapenv:Body> > > ????? <web:GetUKLocationByTown> > > ??????? > > <web:Town>${town}</web:Town> > > OK > > > ???????? > > ????? </web:GetUKLocationByTown> > > ?? </soapenv:Body> > > </soapenv:Envelope> > > > > Using this to insert the value of what I got from the Regular Expression > Extractor before it.? However I have tried many combinations of variables in > the > Regular Expression Extractor form but I still get "failed" as the value that > gets passed along in this second WebService Sampler.? Any ideas?? > > Did you check the jmeter log file? > > > Thanks > > Matthew > > > > > --------------------------------------------------------------------- > 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]

