Java Code Examples for org.apache.cxf.resource.URIResolver#getURL()
The following examples show how to use
org.apache.cxf.resource.URIResolver#getURL() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CxfWSDLImporter.java From activiti6-boot2 with Apache License 2.0 | 6 votes |
public void importFrom(Import theImport, String sourceSystemId) { this.namespace = theImport.getNamespace() == null ? "" : theImport.getNamespace() + ":"; try { final URIResolver uriResolver = new URIResolver(sourceSystemId, theImport.getLocation()); if (uriResolver.isResolved()) { if (uriResolver.getURI() != null) { this.importFrom(uriResolver.getURI().toString()); } else if (uriResolver.isFile()) { this.importFrom(uriResolver.getFile().getAbsolutePath()); } else if (uriResolver.getURL() != null) { this.importFrom(uriResolver.getURL().toString()); } } else { throw new UncheckedException(new Exception("Unresolved import against " + sourceSystemId)); } } catch (final IOException e) { throw new UncheckedException(e); } }
Example 2
Source File: CxfWSDLImporter.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void importFrom(Import theImport, String sourceSystemId) { this.namespace = theImport.getNamespace() == null ? "" : theImport.getNamespace() + ":"; try { final URIResolver uriResolver = this.createUriResolver(sourceSystemId, theImport); if (uriResolver.isResolved()) { if (uriResolver.getURI() != null) { this.importFrom(uriResolver.getURI().toString()); } else if (uriResolver.isFile()) { this.importFrom(uriResolver.getFile().getAbsolutePath()); } else if (uriResolver.getURL() != null) { this.importFrom(uriResolver.getURL().toString()); } } else { throw new UncheckedException(new Exception("Unresolved import against " + sourceSystemId)); } } catch (final IOException e) { throw new UncheckedException(e); } }