Forum Discussion

ryanshoward's avatar
ryanshoward
Occasional Contributor
9 years ago

Element in request failing validation again regex

I am testing a simple webservice which looks up a VRM in a database and returns vehicle details.

 

The WSDL checks the pattern of the VRM using regex. If I check the VRM against the regex using an online tool I get a match but if I validate the request in SoapUI I get the following message  

 

'string value 'AA06AAA' does not match pattern for type VRM in type of element

 

the regex is ^[A-Z0-9]{1,10}$

 

Has anyone else had similar problems? is there a way to see what exactly what SoapUI is validating against?

 

Thanks

3 Replies

    • ryanshoward's avatar
      ryanshoward
      Occasional Contributor

      I'm not using any assertions myself. The Validation is done as a constraint on the element in the WSDL.

      I'm using the validate function on the request message to check before submitting 

      • nmrao's avatar
        nmrao
        Champion Level 3

        Ok, the string and regex provided by matches as you say. But reproducing it in soapUI for others is the issue.

        May be just another way to try in soapui is have Contains assertion by using the same regular expression for the same response and see if that passes. See section 3.1 of this link. If yes, then you may need to ask the person who provided you the wsdl.