Examples of CompilationException


Examples of org.apache.ode.bpel.compiler.api.CompilationException

  }

  private void compileDoXslTransform(FunctionCallExpr c) throws CompilationException {
    List params = c.getParameters();
    if (params.size() < 2 || params.size() % 2 != 0) {
      throw new CompilationException(
          __msgs.errInvalidNumberOfArguments(Constants.EXT_FUNCTION_DOXSLTRANSFORM));
    }

    String xslUri = getLiteralFromExpression((Expr)params.get(0));
    OXslSheet xslSheet = _cctx.compileXslt(xslUri);
    try {
      XslTransformHandler.getInstance().parseXSLSheet(xslSheet.uri, xslSheet.sheetBody,
                      new XslCompileUriResolver(_cctx, _out));
    } catch (Exception e) {
      throw new CompilationException(
          __msgs.errInvalidNumberOfArguments(xslUri));
    }

    _out.xslSheets.put(xslSheet.uri, xslSheet);
  }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

    expr = expr.simplify();

    if (expr instanceof LiteralExpr)
      return ((LiteralExpr)expr).getLiteral();

    throw new CompilationException(__msgs.errLiteralExpected(expr.getText()));
  }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

        try {
            WSDLReader r = _wsdlFactory.newWSDLReader();
            WSDLLocatorImpl locator = new WSDLLocatorImpl(_resourceFinder, from.resolve(wsdlImport));
            def = (Definition4BPEL) r.readWSDL(locator);
        } catch (WSDLException e) {
            recoveredFromError(sloc, new CompilationException(__cmsgs.errWsdlParseError(e
                    .getFaultCode(), e.getLocation(), e.getMessage())));
            throw new CompilationException(__cmsgs.errWsdlImportFailed(wsdlImport.toASCIIString(), e.getFaultCode())
                    .setSource(sloc), e);
        }

        try {
            _wsdlRegistry.addDefinition(def, _resourceFinder, from.resolve(wsdlImport));
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

                xsdStream.close();
            }
            schemas.put(resFrom, data);
            _wsdlRegistry.addSchemas(schemas);
        } catch (XsdException e) {
            CompilationException ce =  new CompilationException(__cmsgs.errInvalidImport(location.toString()));
            recoveredFromError(sloc, ce);
        } catch (MalformedURLException e) {
            CompilationException ce =  new CompilationException(__cmsgs.errInvalidImport(location.toString()));
            recoveredFromError(sloc, ce);
        } catch (IOException e) {
            CompilationException ce =  new CompilationException(__cmsgs.errInvalidImport(location.toString()));
            recoveredFromError(sloc, ce);
        }
    }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

        if (portTypeName == null)
            throw new NullPointerException("Null portTypeName argument!");

        PortType portType = _wsdlRegistry.getPortType(portTypeName);
        if (portType == null)
            throw new CompilationException(__cmsgs.errUndeclaredPortType(portTypeName));
        return portType;
    }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

                ret = ((OFlow) oact).getLocalLink(linkName);
            if (ret != null)
                return ret;
        }

        throw new CompilationException(__cmsgs.errUndeclaredLink(linkName));
    }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

        // A "real" variable couldn't be found, checking if we're dealing with a
        // process custom property
        if (_customProcessProperties != null && _customProcessProperties.get(varName) != null) {

        }
        throw new CompilationException(__cmsgs.errUndeclaredVariable(varName));
    }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

    }

    public OScope.Variable resolveMessageVariable(String inputVar) throws CompilationException {
        OScope.Variable var = resolveVariable(inputVar);
        if (!(var.type instanceof OMessageVarType))
            throw new CompilationException(__cmsgs.errMessageVariableRequired(inputVar));
        return var;
    }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

    }

    public OScope.Variable resolveMessageVariable(String inputVar, QName messageType) throws CompilationException {
        OScope.Variable var = resolveMessageVariable(inputVar);
        if (!((OMessageVarType) var.type).messageType.equals(messageType))
            throw new CompilationException(__cmsgs.errVariableTypeMismatch(var.name, messageType,
                    ((OMessageVarType) var.type).messageType));
        return var;
    }
View Full Code Here

Examples of org.apache.ode.bpel.compiler.api.CompilationException

        for (OProcess.OProperty prop : _oprocess.properties) {
            if (prop.name.equals(name))
                return prop;
        }
        throw new CompilationException(__cmsgs.errUndeclaredProperty(name));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.