/** * 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
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(); } } } }
if (!resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation()); wsdlDefinition.setURI(resolved.getURI()); wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
if (!resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); wsdlDefinition.setLocation(resolved.getLocation()); wsdlDefinition.setURI(resolved.getURI()); wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
WSDLDefinition wsdlDefinition = factory.createWSDLDefinition(); wsdlDefinition.setUnresolved(true); wsdlDefinition.setLocation(doc.toURI());
WSDLDefinition wsdlDefinition = factory.createWSDLDefinition(); wsdlDefinition.setUnresolved(true); wsdlDefinition.setLocation(doc.toURI());
wsdlDefinition.setLocation(new URI(xmlString.getBaseURI()));
wsdlDefinition.setLocation(new URI(imp.getDefinition().getDocumentBaseURI()));
wsdlDefinition.setNamespace("nonamespace"); wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation()); wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation())); } else { wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(), artifact.getLocation()); wsdlDefinition.setLocation(new URI(artifact.getLocation())); break;
wsdlDefinition.setNamespace("nonamespace"); wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation()); wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation())); } else { wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(), artifact.getLocation()); wsdlDefinition.setLocation(new URI(artifact.getLocation())); break;
wsdlDefinition.setLocation(new URI(imp.getDefinition().getDocumentBaseURI()));
wsdlDefinition.setLocation(resolved.getLocation()); wsdlDefinition.setURI(resolved.getURI()); wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
wsdlDefinition.setLocation(resolved.getLocation()); wsdlDefinition.setURI(resolved.getURI()); wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
wsdlDefinition.setLocation(resolved.getLocation()); wsdlDefinition.setURI(resolved.getURI()); wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
wsdlDefinition.setLocation(resolved.getLocation()); wsdlDefinition.setURI(resolved.getURI()); wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());