//javax.xml.transform.Result result = bpelOutputResolver.createBpelOutput(process.getTargetNamespace(), fileName);
javax.xml.transform.Result result = createBpelOutput(process.getTargetNamespace(), fileName);
if(result instanceof StreamResult) {
final OutputStream outstream = ((StreamResult)result).getOutputStream();
URI uri = URI.createPlatformResourceURI(fileName);
BPELResource resource = (org.eclipse.bpel.model.resource.BPELResource)brsf.createResource(uri);
fixPartnerLinkPrefixes(resource,process,namespacePrefix);
resource.getContents().add(process);
HashSet<XSDSchema> schemaDeps = processSchemaDeps.get(process);
for (XSDSchema schema : schemaDeps){
resource.getPrefixToNamespaceMap().put(schemaNsPrefixMap.get(schema.getTargetNamespace()), schema.getTargetNamespace());