Forum Discussion

akumar's avatar
akumar
New Contributor
16 years ago

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?