}
private WSDLModelImpl parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException {
//try MEX
MetaDataResolver mdResolver = null;
ServiceDescriptor serviceDescriptor = null;
RuntimeWSDLParser wsdlParser = null;
//Currently we try the first available MetadataResolverFactory that gives us a WSDL document
for (MetadataResolverFactory resolverFactory : ServiceFinder.find(MetadataResolverFactory.class)) {
mdResolver = resolverFactory.metadataResolver(resolver);
serviceDescriptor = mdResolver.resolve(wsdlLoc.toURI());
//we got the ServiceDescriptor, now break
if (serviceDescriptor != null)
break;
}
if (serviceDescriptor != null) {
List<? extends Source> wsdls = serviceDescriptor.getWSDLs();
wsdlParser = new RuntimeWSDLParser(wsdlLoc.toExternalForm(), new MexEntityResolver(wsdls), isClientSide, container, policyResolver, extensions);
for(Source src: wsdls ) {
String systemId = src.getSystemId();
Parser parser = wsdlParser.resolver.resolveEntity(null, systemId);