I have, in the context of a SOAP request,
- a WSDL
- a bunch of XSDs, referenced by the WSDL
- an example SOAP request
I would like to validate that the SOAP request fits the WSDL and all the XSDs.
I am specifically looking for a dead simple (as in lines-of-code) way using existing gems. I know, in principle, how to do it myself by extracting all the XSDs from the WSDL and validating the XML against the XSDs myself (with nokogiri
, for example), but in the context of this question I am specifically looking for something as easy as
require 'wonderful_validator'
WonderfulValidator.validate(xml, wsdl)
The validator should be able, given that it can find all the files in the proper manner of course, to do everything needed to decide whether the XML fits the WSDL and all the XSDs. Including the SOAP header/body message structure.
Similar to Java. Validate SOAP message against a WSDL or http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/support/wsdl/WsdlValidator.html or https://www.codeproject.com/Articles/182406/Validating-SOAP-Message-against-WSDL , just in ruby.