akumar
16 years agoNew Contributor
Adding XPath Assertion
I am using following webservice to test run SOAPUI-2.5.1
http://www.tpisoft.com/smartpayments/validate.asmx?WSDL
My webservice response is as -
AMEX
_________
I am tring to add following XPath assertion
declare namespace ns1='http://localhost/SmartPayments/';
declare namespace soap='http://www.w3.org/2003/05/soap-envelope';
declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance";
declare namespace xsd="http://www.w3.org/2001/XMLSchema";
//GetCardTypeResponse/GetCardTypeResult
I am expecting to verify "AMEX" in the response but when I test it gives me following error -
XPathContains assertion failed for path [declare namespace ns1='http://localhost/SmartPayments/'; declare namespace soap='http://www.w3.org/2003/05/soap-envelope'; declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; declare namespace xsd="http://www.w3.org/2001/XMLSchema"; //GetCardTypeResponse/GetCardTypeResult] : Exception:Missing content for xpath [declare namespace ns1='http://localhost/SmartPayments/'; declare namespace soap='http://www.w3.org/2003/05/soap-envelope'; declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; declare namespace xsd="http://www.w3.org/2001/XMLSchema"; //GetCardTypeResponse/GetCardTypeResult] in Response
Could someone please help me out here?
http://www.tpisoft.com/smartpayments/validate.asmx?WSDL
My webservice response is as -
_________
I am tring to add following XPath assertion
declare namespace ns1='http://localhost/SmartPayments/';
declare namespace soap='http://www.w3.org/2003/05/soap-envelope';
declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance";
declare namespace xsd="http://www.w3.org/2001/XMLSchema";
//GetCardTypeResponse/GetCardTypeResult
I am expecting to verify "AMEX" in the response but when I test it gives me following error -
XPathContains assertion failed for path [declare namespace ns1='http://localhost/SmartPayments/'; declare namespace soap='http://www.w3.org/2003/05/soap-envelope'; declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; declare namespace xsd="http://www.w3.org/2001/XMLSchema"; //GetCardTypeResponse/GetCardTypeResult] : Exception:Missing content for xpath [declare namespace ns1='http://localhost/SmartPayments/'; declare namespace soap='http://www.w3.org/2003/05/soap-envelope'; declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; declare namespace xsd="http://www.w3.org/2001/XMLSchema"; //GetCardTypeResponse/GetCardTypeResult] in Response
Could someone please help me out here?
- This is resolved.
SOAP-UI was expecting me to put assertion as follows -
________________
declare namespace ns1='http://localhost/SmartPayments/';
declare namespace soap='http://www.w3.org/2003/05/soap-envelope';
declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance";
declare namespace xsd="http://www.w3.org/2001/XMLSchema";
//ns1:GetCardTypeResponse/ns1:GetCardTypeResult
______________