As mentioned in other posts, one should be able to tell the details of a web service by looking into its WSDL.So a WSDL should have the syntax, data types, input/ output message structures defined in XML format. This called as the XML Schema.
Now, let us see what a Schema Compliance assertion does in soapUI. In simple words, it checks the syntax or the definitions specified in WSDL is matching with the soap Response of a test request. For example, let us say there is an element in the response defined as of type "double". That means the web service expects only numeric/double value in the specific field. In this case, if for some reason, the response is returning a string instead of a numeric value, the soapUI Schema Compliance assertion will catch the difference and it will fail the assertion. See below a sample image of failed Schema Compliance assertion.
This doesn't mean that always it should be an issue with data type to for this assertion to fail. Even when there is a difference in the order of the response elements when compare to the WSDL/Schema, that too can be caught by using this assertion. If you are testing a web service using soapUI for a company that sells web services as one of its products, then make sure you have this assertion added to your tests.
Thanks was helpful
would be great explain with wsdl url. by reading above, not able to understand
I am testing testcases using soapui and getting all assertions as valid, but when i run with junit, using soapuiTestcaseRunner, It is giving "SCHEMA COMPLIANCE FAILED". Can anyone suggest about why i am getting this weird behaviour when soaui is passing all the assertions