Hi, I am unable to extract value of an element when it has a namespace prefix. Can someone please give me a sample script on how to use "XPath Extractor" and "XPath Assertion" for a WebService (SOAP) request/response.
Here is the response from which I need to extract the value for "ns:result": *********************************** <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><ResponseHeader xmlns="http://biz.aol.com/schema/header/2006-10"><statusCode>200</statusCode><statusText>Ok</statusText><requestId>5498812049246984836--661430c8.114b6ef1996.-7a4e</requestId></ResponseHeader></SOAP-ENV:Header><SOAP-ENV:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><ns:registerOfferResponse xmlns:ns="http://biz.aol.com/schema/2006-12-18"><ns:result>0</ns:result></ns:registerOfferResponse></SOAP-ENV:Body></soapenv:Envelope> *********** I have tried different variations of XPATH Query and here are some I tried: ************* /soapenv:Envelope/SOAP-ENV:Body/ns:registerOfferResponse/ns:result ************* //ns:result ************* /*[local-name(.)="Envelope" and namespace-uri(.)="http://schemas.xmlsoap.org/soap/envelope/"]/*[local-name(.)="Body" and namespace-uri(.)="http://schemas.xmlsoap.org/soap/envelope/"][1]/*[local-name(.)="registerOfferResponse" and namespace-uri(.)="http://biz.aol.com/schema/2006-12-18"][1]/*[local-name(.)="result" and namespace-uri(.)="http://biz.aol.com/schema/2006-12-18"][1]/text() ************* Your help is sincerely appreciated. Thank you. -- View this message in context: http://www.nabble.com/Unable-to-extract-using-XPath-Extractor-tf4354380.html#a12407599 Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

