Forum Discussion

prasanthkantu's avatar
14 years ago

Inserting an Assertion to find out a match for a String

Hello Guys

I am SoapUI Pro. I got a Service Operation in my project where it will just create an Application ID each time you run it. The applicationId returned must be of format MEPLxxxxxxxx where the first four characters are pre-defined as “MEPL” and the next 8 characters are running serial numbers starting with 00001050. I came up with a regular expression for this as " ^MEPL[0-9]{8}$ ". I want to insert an Assertion to check the Application ID whether it matches to the regular expression or not each time it produces it. A sample return message for the service will be like below. Can you please help me to do the validation by inserting the Regex as an assertion.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ser-root:createNewApplicationIDResponse xmlns:ser-root="http://mebank.com.au/SalesManagement/SalesOrigination/ApplicationManagement/ApplicationManagementService/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CreateNewAppIdResponse>
<ApplicationID>MEPL00001141</ApplicationID>
<ReturnResponse>
<meb:ReturnResponse xmlns:meb="http://mebank.com.au/Enterprise/schema/Common/0.1">
<meb:SuccessIndicator>0</meb:SuccessIndicator>
<meb:ReturnMessage>Application ID generated</meb:ReturnMessage>
<meb:ReturnCode>0</meb:ReturnCode>
</meb:ReturnResponse>
</ReturnResponse>
</CreateNewAppIdResponse>
</ser-root:createNewApplicationIDResponse>
</soapenv:Body>
</soapenv:Envelope>
No RepliesBe the first to reply