Forum Discussion

Alex_Junça's avatar
Alex_Junça
New Contributor
17 years ago

XPath Assertion with wildcard

Hi,

I have the problem:

I have received the error message below whem I use the wildcard for an atribute value (xsi:type="*")

"XPathContains assertion failed for path [declare namespace ns2='urn:doc';
declare namespace ns3='urn:doc';
declare namespace soapenc='http://schemas.xmlsoap.org/soap/encoding/';
declare namespace ns1='http://document.service';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
//multiRef[@id="id0"]] : XmlValueDisconnectedException:null"


This is the SOAP RESPONSE used


 
   
     
       
     

   

   
      1
      44405
      1238036400000
      Documento Teste - getDocuments - Cenario 01 (Descricao)
      9885
      4
      6772795
      Documento Teste - getDocuments - Cenario 01 (Name)
      D
      444
      getDocumentsTesteCenario_01.txt
      1
      2
     
   

 


This is the XPath Assertion:
Obs: The options "Allow WildCards" and "ignore namespace prefixes" was selected

This is the XPath Expression:
declare namespace ns2='urn:doc';
declare namespace ns3='urn:doc';
declare namespace soapenc='http://schemas.xmlsoap.org/soap/encoding/';
declare namespace ns1='http://document.service';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
//multiRef[@id="id0"]


This is the Expected Result: (I changed the value of the atribute xsi:type to the wildcard "*")


  1
  44405
  1238036400000
  Documento Teste - getDocuments - Cenario 01 (Descricao)
  9885
  4
  6772795
  Documento Teste - getDocuments - Cenario 01 (Name)
  D
  444
  getDocumentsTesteCenario_01.txt
  1
  2
 
[hr:3bm20uoy][/hr:3bm20uoy]

But after select the save button the assertion fails and the message "... //multiRef[@id="id0"]] : XmlValueDisconnectedException:null" is displayed

I'm using
soapUI 2.5.1, Build dist-104-2009-02-01, Build Date 2009/02/01 21:22

regards

2 Replies

  • I would like to know if this is an error in SoapUI ?
    can someone help me?
  • Now I changed the XPath to a XQuery assertion and it didn't fail anymore. I think there might be an error in using wildcards to atribute value in XPath assertion

    regards