Open tiagojco opened 1 year ago
Hi @tiagojco, thank you for opening this issue. One way we could look to achieve this would be to look for the XSD import
element, e.g.
<xs:import namespace="http://example.com/a/namespace" schemaLocation="../parent.xsd"/>
Another alternative could be the include
element.
Source: https://www.oreilly.com/library/view/xml-schema/0596002521/re27.html and https://www.oreilly.com/library/view/xml-schema/0596002521/re28.html
If the XSDs are related, do they have xs:import...
or xs:include
elements within them?
Hi,
When parsing a WSDL file, Imposter loads the content of all XSD files in the same directory as the WSDL file. This means that all XSD types defined in those files are used to support resolution of types referenced from the WSDL file.
https://docs.imposter.sh/soap_plugin/#xsd-file-locations
Could you make this process recursive ?
I'm not familiar with kotlin, otherwise i could make a PR, but here is change sugestion to the Wsdl parser https://github.com/outofcoffee/imposter/blob/cc11dbd3efe23ae5cd1762162a88ca92a762b290/mock/soap/src/main/java/io/gatehill/imposter/plugin/soap/parser/AbstractWsdlParser.kt#L79
Something like that.
I often deal with .wsdl that import .xsds that are organized in subfolders. Those WSDL i cant mock via imposter because of this restriction.