How to Use Query_Match for Soap UI

amaters picture amaters · Oct 30, 2012 · Viewed 10k times · Source

I am having trouble using the MockOperation Editor in Soap UI.

I have got this request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <methodName xmlns="http://tempuri.org/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <dataAreaId>error</dataAreaId>
      <pInvoiceList>
      <dataAreaId>NOTTHESAME</dataAreaId>
        ...
      </pInvoiceList>
    </methodName>
  </s:Body>
</s:Envelope>

I tried almost every XPATH expression but I always get "Missing match in request"

What to fill in the Xpath box?

I tried:

  • //dataAreaId/text()
  • //dataAreaId/
  • //dataAreaId
  • /dataAreaId/text()
  • /dataAreaId
  • /methodName/dataAreaId/text()
  • /methodName/dataAreaId/
  • /methodName/dataAreaId

Answer

amaters picture amaters · Oct 31, 2012

I finally managed to get it based on the answer from user1740631

Seems I it had to do with namespaces afterall.

The correct syntax:

declare namespace tem='http://tempuri.org/';
//tem:methodName/tem:dataAreaId[1]