wsdlFile = writeToFile(wsdl);
System.out.println("wsdl: " + wsdlFile);
FactoryExtensionPoint fep = registry.getExtensionPoint(FactoryExtensionPoint.class);
URLArtifactProcessorExtensionPoint apep = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
ExtensibleURLArtifactProcessor aproc = new ExtensibleURLArtifactProcessor(apep);
ProcessorContext ctx = new ProcessorContext();
ContributionFactory cf = fep.getFactory(ContributionFactory.class);
final Contribution c = cf.createContribution();
c.setURI("temp");
c.setLocation(wsdlFile.toURI().toURL().toString());
c.setModelResolver(new ExtensibleModelResolver(c, registry.getExtensionPoint(ModelResolverExtensionPoint.class), fep));
WSDLDefinition wd = aproc.read(null, new URI("temp.wsdl"), wsdlFile.toURI().toURL(), ctx, WSDLDefinition.class);
c.getModelResolver().addModel(wd, ctx);
c.getModelResolver().resolveModel(WSDLDefinition.class, wd, ctx);
PortType pt = (PortType)wd.getDefinition().getAllPortTypes().values().iterator().next();
WSDLFactory wsdlFactory = registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(WSDLFactory.class);