Package org.wso2.carbon.mediator.service

Examples of org.wso2.carbon.mediator.service.MediatorException


        if (remoteServiceUrl != null) {
          oauthService.addAttribute(fac.createOMAttribute("remoteServiceUrl", nullNS,
                    remoteServiceUrl));
        } else {
            throw new MediatorException(
                    "Invalid Entitlement mediator.OAuth service epr required");
        }

        saveTracingState(oauthService, this);
View Full Code Here


        OMAttribute attRemoteServiceUri = elem.getAttribute(PROP_NAME_SERVICE_EPR);

        if (attRemoteServiceUri != null) {
            remoteServiceUrl = attRemoteServiceUri.getAttributeValue();
        } else {
            throw new MediatorException(
                    "The 'remoteServiceUrl' attribute is required for the Entitlement mediator");
        }
    }
View Full Code Here

        if (expression != null) {
            SynapseXPathSerializer.serializeXPath(
                    expression, routeElem, "expression");
        } else {
            throw new MediatorException("Incomplete route has been found in the " +
                    "serialization of the RouterMediator");
        }

        if (match != null) {
            routeElem.addAttribute(
View Full Code Here

            try {
                expression =
                        SynapseXPathFactory.getSynapseXPath(elem, ATT_EXPRN);
            } catch (JaxenException e) {
                throw new MediatorException("Couldn't build the xpath from the expression : "
                        + expressionAttr.getAttributeValue());
            }
        } else {

            throw new MediatorException("Route without an expression attribute has been found, " +
                    "but it is required to have an expression for all routes");
        }

        if (matchAttr != null && matchAttr.getAttributeValue() != null) {
            match = Pattern.compile(matchAttr.getAttributeValue());
View Full Code Here

    /**
     * @param exceptionMsg
     */
    private void handleException(String exceptionMsg) {
        throw new MediatorException(exceptionMsg);
    }
View Full Code Here

    /**
     * @param exceptionMsg
     */
    private void handleException(String exceptionMsg) {
        throw new MediatorException(exceptionMsg);
    }
View Full Code Here

                    case Types.TIMESTAMP: {
                        paramElt.addAttribute(fac.createOMAttribute("type", nullNS, "TIMESTAMP"));
                        break;
                    }
                    default: {
                        throw new MediatorException("Unknown or unsupported JDBC type : " +
                            param.getType());
                    }
                }

                stmntElt.addChild(paramElt);
View Full Code Here

                    if (xpath != null) {
                        try {
                            xp = SynapseXPathFactory.getSynapseXPath(paramElt, ATT_EXPRN);

                        } catch (JaxenException e) {
                            throw new MediatorException("Invalid XPath specified for the source attribute : " +
                                    xpath);
                        }
                    }
                    statement.addParameter(
                            value,
View Full Code Here

                createCustomDataSource(pool);

            } else if (pool.getFirstChildWithName(DSNAME_Q) != null) {
                lookupDataSource(pool);
            } else {
                throw new MediatorException("The DataSource connection information must be specified for " +
                        "using a custom DataSource connection pool or for a JNDI lookup");
            }

        } catch (JaxenException e) {
            throw new MediatorException("Error looking up DataSource connection information");
        }
    }
View Full Code Here

        if (mediator != null) {
            clazz.addAttribute(fac.createOMAttribute(
                "name", nullNS, mediator));
        } else {
            throw new MediatorException("Invalid class mediator. The class name is required");
        }

        Iterator itr = properties.keySet().iterator();
        while(itr.hasNext()) {
            String propName = (String) itr.next();
View Full Code Here

TOP

Related Classes of org.wso2.carbon.mediator.service.MediatorException

Copyright © 2018 www.massapicom. 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.