Assuming you have the REST response in a String called response
import javax.xml.XMLConstants
import javax.xml.transform.stream.StreamSource
import javax.xml.validation.SchemaFactory
String response = messageExchange.responseContent
new File( 'C:\\Documents and Settings\\schema\\sclBase.xsd' ).withReader { xsd ->
SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI )
.newSchema( new StreamSource( xsd ) )
.newValidator()
.validate( new StreamSource( new StringReader( response ) ) )
}
Should do it. You were closing the input stream before reading from it afaict (but you don't say what error you were getting)