This was discussed on this list a few months back. I think the suggested solution was to use one Response Assertion to match 2 occurences, and another to NOT match 3.
S. On Apr 4, 2005 10:22 AM, Grigoryan, Lilit <[EMAIL PROTECTED]> wrote: > Hi, > > Please can someone help me to define a regular expression that will be > used as a pattern string in Response assertion. > > Test build-in from SOAP/XML-RPC Requests and a sample response looks > like: > > ___ > > <?xml version="1.0" encoding="UTF-8"?> > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ > <http://schemas.xmlsoap.org/soap/envelope/> " > xmlns:xsd="http://www.w3.org/2001/XMLSchema > <http://www.w3.org/2001/XMLSchema> " > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance > <http://www.w3.org/2001/XMLSchema-instance> "> > <soapenv:Body> > <item href="#id2"/> > <item href="#id3"/> > </ns1:getCustomerAddressesReturn> > </ns1:getCustomerAddressesResponse> > <multiRef id="id2" soapenc:root="0" > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ > <http://schemas.xmlsoap.org/soap/encoding/> " > xsi:type="ns4:ValidationScore" xmlns:ns4="http://address.com > <http://address.com> " > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/ > <http://schemas.xmlsoap.org/soap/encoding/> "> > <method xsi:type="xsd:string">HopeWiser</method> > <score xsi:type="xsd:short">100</score> > </multiRef> > <multiRef id="id3" soapenc:root="0" > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ > <http://schemas.xmlsoap.org/soap/encoding/> " > xsi:type="ns5:ValidationScore" xmlns:ns5="http://address.com > <http://address.com> " > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/ > <http://schemas.xmlsoap.org/soap/encoding/> "> > <method xsi:type="xsd:string">HopeWiser</method> > <score xsi:type="xsd:short">100</score> > </multiRef> > </soapenv:Body> > </soapenv:Envelope> > > ____ > > I need Response Assertion to check that "<method > xsi:type="xsd:string">HopeWiser</method>" pattern has exactly 2 > occurances in the response. > > Regards, > Lilit > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

