WsdlCacheRr cacheGenerator = new WsdlCacheRr();
cacheGenerator.addWSDL(wsdlUrl);
if (!cacheGenerator.containsResource("file:main.wsdl")) {
cacheGenerator.aliasUri(wsdlUrl.toExternalForm(), "file:main.wsdl");
}
ExplodedSarFile sf = new ExplodedSarFile();
sf.setCommonResourceRepository(cacheGenerator);
BpelC bc = BpelC.newBpelCompiler();
bc.setProcessWSDL(new URI(wsdlUrl.toExternalForm()));
bc.setOutputFile(tmpBar);
bc.compile(bpelUrl);
sf.setSystemDescriptor(sd);
sf.addResource("a.cbp", tmpBar);
for (Iterator it = resources.keySet().iterator(); it.hasNext();) {
String name = (String) it.next();
sf.addResource(name, new URL((String) resources.get(name)));
}
sf.validate();
return sf;
}