namespaceImport.getModelResolver().resolveModel(WSDLDefinition.class, (WSDLDefinition)unresolved, context); if (!resolved.isUnresolved()) { return modelClass.cast(resolved); import_.getModelResolver().resolveModel(WSDLDefinition.class, (WSDLDefinition)unresolved, context); if (!resolved.isUnresolved()) { return modelClass.cast(resolved); throw new RuntimeException(e); if (resolved != null && !resolved.isUnresolved()) {
namespaceImport.getModelResolver().resolveModel(WSDLDefinition.class, (WSDLDefinition)unresolved, context); if (!resolved.isUnresolved()) { return modelClass.cast(resolved); import_.getModelResolver().resolveModel(WSDLDefinition.class, (WSDLDefinition)unresolved, context); if (!resolved.isUnresolved()) { return modelClass.cast(resolved); throw new RuntimeException(e); if (resolved != null && !resolved.isUnresolved()) {
/** * Resolve a reference to a WSDL, given by a namespace and a location * @param wsdlLocation - a string containing the WSDL location * @param wsdlNamespace - a string containing the WSDL namespace * @param resolver - a model resolver * @param context * @return - a WSDLDefinition object for the referenced WSDL, or null if the WSDL cannot be resolved */ private WSDLDefinition resolveWSDLDefinition( String wsdlLocation, String wsdlNamespace, ModelResolver resolver, ProcessorContext context ) { // Resolve the WSDL definition WSDLDefinition proxy = wsdlFactory.createWSDLDefinition(); proxy.setUnresolved(true); proxy.setNamespace(wsdlNamespace); if (wsdlLocation != null) { proxy.setLocation(URI.create(wsdlLocation)); } WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context); if (resolved != null && !resolved.isUnresolved()) { return resolved; } else { error(context.getMonitor(), "CannotResolveWSDLReference", resolver, wsdlLocation, wsdlNamespace); return null; } // end if } // end resolveWSDLDefinition
/** * Resolve a reference to a WSDL, given by a namespace and a location * @param wsdlLocation - a string containing the WSDL location * @param wsdlNamespace - a string containing the WSDL namespace * @param resolver - a model resolver * @param context * @return - a WSDLDefinition object for the referenced WSDL, or null if the WSDL cannot be resolved */ private WSDLDefinition resolveWSDLDefinition( String wsdlLocation, String wsdlNamespace, ModelResolver resolver, ProcessorContext context ) { // Resolve the WSDL definition WSDLDefinition proxy = wsdlFactory.createWSDLDefinition(); proxy.setUnresolved(true); proxy.setNamespace(wsdlNamespace); if (wsdlLocation != null) { proxy.setLocation(URI.create(wsdlLocation)); } WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context); if (resolved != null && !resolved.isUnresolved()) { return resolved; } else { error(context.getMonitor(), "CannotResolveWSDLReference", resolver, wsdlLocation, wsdlNamespace); return null; } // end if } // end resolveWSDLDefinition
proxy.setNamespace(imp.getNamespaceURI()); WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context); if (resolved != null && !resolved.isUnresolved()) { imp.setDefinition(resolved.getDefinition()); if (!model.getImportedDefinitions().contains(resolved)) {
proxy.setNamespace(imp.getNamespaceURI()); WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context); if (resolved != null && !resolved.isUnresolved()) { imp.setDefinition(resolved.getDefinition()); if (!model.getImportedDefinitions().contains(resolved)) {
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(); } } } }
wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI()); WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition, context); if (!resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation());
wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI()); WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition, context); if (!resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation());
if (!resolved.isUnresolved()) { if (resolved.getImportedDefinitions().isEmpty()) { if (resolved.getDefinition().getTargetNamespace().equals(imp.getDefinition().getTargetNamespace())) {
if (!resolved.isUnresolved()) { if (resolved.getImportedDefinitions().isEmpty()) { if (resolved.getDefinition().getTargetNamespace().equals(imp.getDefinition().getTargetNamespace())) {
error(monitor, "ContributionResolveException", wsdlDefinition, ce); if (resolved != null && !resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation());
error(monitor, "ContributionResolveException", wsdlDefinition, ce); if (resolved != null && !resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation());
if (resolved != null && !resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation());
if (resolved != null && !resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation());