processPartnerLinkAsReference(reader.getAttributeValue(null, "partnerLink"), processDefinition.getPartnerLinks(), monitor); } else if (BPELProcessorConstants.IMPORT_ELEMENT.equals(qname) || BPELProcessorConstants.IMPORT_ELEMENT_20.equals(qname)) { processDefinition.getImports().add(processImportElement(reader)); } else if (BPELProcessorConstants.VARIABLE_ELEMENT.equals(qname) || BPELProcessorConstants.VARIABLE_ELEMENT_20.equals(qname)) {
processPartnerLinkAsReference(reader.getAttributeValue(null, "partnerLink"), processDefinition.getPartnerLinks(), monitor); } else if (BPELProcessorConstants.IMPORT_ELEMENT.equals(qname) || BPELProcessorConstants.IMPORT_ELEMENT_20.equals(qname)) { processDefinition.getImports().add(processImportElement(reader)); } else if (BPELProcessorConstants.VARIABLE_ELEMENT.equals(qname) || BPELProcessorConstants.VARIABLE_ELEMENT_20.equals(qname)) {
private void resolveBPELImports(BPELProcessDefinition processDefinition, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { for (BPELImportElement bpelImport : processDefinition.getImports()) { String namespace = bpelImport.getNamespace(); String location = bpelImport.getLocation(); WSDLDefinition wsdl = bpelImport.getWSDLDefinition(); if (wsdl == null) { try { wsdl = wsdlFactory.createWSDLDefinition(); wsdl.setUnresolved(true); wsdl.setNamespace(bpelImport.getNamespace()); wsdl.setLocation(new URI(null, bpelImport.getLocation(), null)); wsdl = resolver.resolveModel(WSDLDefinition.class, wsdl, context); if(! wsdl.isUnresolved()) { bpelImport.setWSDLDefinition(wsdl); } else { //error("BPELProcessNotFound", implementation, processDefinition.getName()); } } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
private void resolveBPELImports(BPELProcessDefinition processDefinition, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { for (BPELImportElement bpelImport : processDefinition.getImports()) { String namespace = bpelImport.getNamespace(); String location = bpelImport.getLocation(); WSDLDefinition wsdl = bpelImport.getWSDLDefinition(); if (wsdl == null) { try { wsdl = wsdlFactory.createWSDLDefinition(); wsdl.setUnresolved(true); wsdl.setNamespace(bpelImport.getNamespace()); wsdl.setLocation(new URI(null, bpelImport.getLocation(), null)); wsdl = resolver.resolveModel(WSDLDefinition.class, wsdl, context); if(! wsdl.isUnresolved()) { bpelImport.setWSDLDefinition(wsdl); } else { //error("BPELProcessNotFound", implementation, processDefinition.getName()); } } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
List<BPELImportElement> theImports = unresolved.getImports(); Set<Definition> wsdlDefinitions = getImportedWSDLDefinitions( theImports, contribution.getModelResolver(), context );
List<BPELImportElement> theImports = unresolved.getImports(); Set<Definition> wsdlDefinitions = getImportedWSDLDefinitions( theImports, contribution.getModelResolver(), context );