Forum Discussion

vignesh2006n's avatar
vignesh2006n
New Contributor
9 years ago

LIKE operator within my SOAP request

Hi,

 

Is is possible to have a "LIKE" or "CONTAINS" operator similar to SQL within my SOAP request so that it searches within the item value for a particular set of characters?

For example: I can have something like :


<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:attribute>AccountPartyId</typ1:attribute>
<typ1:operator>=</typ1:operator>
<typ1:value>3212006941687575</typ1:value>
</typ1:item>

 

But I want to know if I can have something like : 


<typ1:item>
<typ1:conjunction>And</typ1:conjunction>
<typ1:attribute>AccountPartyId</typ1:attribute>
<typ1:operator>CONTAINS</typ1:operator>
<typ1:value>12345</typ1:value>
</typ1:item>

 

and it returns all the records which contain "12345" within the accountpartyid.

Is that possible?

Thanks for your assistance.

 

Vignesh

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Vignesh,

     

    a) You posted to the forum dedicated to TestComplete, another tool by SmartBear but not SoapUI. I am moving your question to the relevant forum.

    b) Technicaly, data in the request are just text strings. So the answer to your question is "yes, request can contain the 'contains' value for the Operator attribute". But requirements as for the valid format and values for request data are defined by your tested application: whether or not the client can generate request with such data and whether or not server can process such request. This is something that only you know.

  • nmrao's avatar
    nmrao
    Champion Level 3
    There is no context to the question. Would you mind adding information like what are you trying to achieve? What type of test step? or assertion?