I have a restricted type with base string:
<simpleType name="stringto1">
<restriction base="string">
<pattern value="[АБВГ2134-]"/>
</restriction>
</simpleType>
And a field with this type:
<element maxOccurs="4" minOccurs="1" name="P5" type="tns:stringto1"/>
But i can write EVERYTHING what i want in this field and the validation is OK! And there IS validation error on the server. Any ideas?
The special character
-inregexis for specify arangelike[a-z]. If you want to use-as a simple character you must escape it with\as\-, so try with the followregexaspattern:Additionally
SOAPUIisn't validating your xml because doesn't compile yourpattern, you can see this in theSOAPUIlog, where the follow error message is displayed:15:57:51,883 WARN [SchemaUtils] Error: ...\wsdl.wsdl: 0: warning: pattern-regex: The regular expression '[????2134-]' is malformed: '-' is an invalid character range. Write '\-'.Note that
????it's because my charset encoding doesn't recognizeАБВГcharacters, I supouse that in your case escaping-as\-will be enough.Hope this helps,