Search in sources :

Example 1 with UncheckedException

use of org.apache.cxf.common.i18n.UncheckedException in project Activiti by Activiti.

the class CxfWSDLImporter method importFrom.

public void importFrom(Import theImport, BpmnParse parse) {
    this.namespace = theImport.getNamespace() == null ? "" : theImport.getNamespace() + ":";
    try {
        final URIResolver uriResolver = new URIResolver(parse.getSourceSystemId(), 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 " + parse.getSourceSystemId()));
        }
        this.transferImportsToParse(parse);
    } catch (final IOException e) {
        throw new UncheckedException(e);
    }
}
Also used : UncheckedException(org.apache.cxf.common.i18n.UncheckedException) URIResolver(org.apache.cxf.resource.URIResolver) IOException(java.io.IOException) ActivitiException(org.activiti.engine.ActivitiException) IOException(java.io.IOException) WSDLException(javax.wsdl.WSDLException) UncheckedException(org.apache.cxf.common.i18n.UncheckedException)

Aggregations

IOException (java.io.IOException)1 WSDLException (javax.wsdl.WSDLException)1 ActivitiException (org.activiti.engine.ActivitiException)1 UncheckedException (org.apache.cxf.common.i18n.UncheckedException)1 URIResolver (org.apache.cxf.resource.URIResolver)1