Package org.wso2.carbon.rulecep.commons

Examples of org.wso2.carbon.rulecep.commons.LoggedRuntimeException


        if (o instanceof Float) {
            return (Float) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToFloat((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + " Can not select" +
                    " a float from the value : " + o, log);
        }
    }
View Full Code Here


        if (o instanceof Date) {
            return (Date) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToDate((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + " Can not select" +
                    " a date from the value : " + o, log);
        }
    }
View Full Code Here

        if (o instanceof Long) {
            return (Long) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToLong((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + " Can not select" +
                    " a long from the value : " + o, log);
        }
    }
View Full Code Here

        if (o instanceof Boolean) {
            return (Boolean) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToBoolean((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + " Can not select" +
                    " a boolean from the value : " + o, log);
        }
    }
View Full Code Here

            AXIOMXPath axiomxPath = new AXIOMXPath(xpath);
            OMElement xml = (OMElement) messageInterceptor.extractEnvelope(message).getValue();
            axiomxPath.addNamespaces(xml);
            return XPathHelper.evaluate(xml, axiomxPath);
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Error creating XPath " + xpath, log);
        }
    }
View Full Code Here

            }
            try {
                ResourceAdapter fac = (ResourceAdapter) c.newInstance();
                adaptersMap.put(fac.getType(), (OutputAdaptable) fac);
            } catch (Exception e) {
                throw new LoggedRuntimeException("Error instantiating " + c.getName(), e, log);
            }
        }
    }
View Full Code Here

     *                           value which is used as the class name of teh adapter
     */
    public void addOutputAdapter(ResourceDescription adapterDescription) {

        if (adapterDescription == null) {
            throw new LoggedRuntimeException("the given " +
                    "adapter description is null :", log);
        }
        String type = adapterDescription.getType();
        if (type == null || "".equals(type.trim())) {
            throw new LoggedRuntimeException("Cannot find a adapter type form the given " +
                    "adapter description :" + adapterDescription, log);
        }

        String className = (String) adapterDescription.getValue();

        OutputAdaptable resourceAdapter = (OutputAdaptable) ClassHelper.createInstance(className);
        if (resourceAdapter == null) {
            throw new LoggedRuntimeException("Cannot create an adapter from the : " +
                    adapterDescription, log);
        }
        adaptersMap.put(type, resourceAdapter);
    }
View Full Code Here

            setParentElementQName(facts, elementQName);
            inMessage.setElementQName(elementQName);
            service.addMessageElementQNameToOperationMapping(methodSchemaType.getQName(),
                    axisOperation);
        } catch (Exception e) {
            throw new LoggedRuntimeException("Error when preparing in-message " +
                    "of operation : " + axisOperation.getName(), e, log);
        }
    }
View Full Code Here

                                List<ResourceDescription> results,
                                OutputAdapterFactory factory) {
        try {
            ResourceDescription firstDescription = results.get(0);
            if (!OMElementResourceAdapter.TYPE.equals(firstDescription.getType())) {
                throw new LoggedRuntimeException("Invalid result !! result type is invalid", log);
            }
            String methodName = axisOperation.getName().getLocalPart();
            String partQName = methodName + RESPONSE;
            AxisMessage outMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
            outMessage.setName(partQName);
            XmlSchemaSequence sequence = generateSchema(firstDescription.getChildResources(),
                    partQName, factory.getOutputAdapters(), "item");
             XmlSchemaComplexType methodSchemaType =
                    createSchemaTypeForMethodPart(partQName);
            if(sequence != null){
                methodSchemaType.setParticle(sequence);
            }
            QName elementQName = typeTable.getQNamefortheType(partQName);
            setParentElementQName((List)results.get(0).getChildResources(), elementQName);
            outMessage.setElementQName(elementQName);
            firstDescription.setElementQName(elementQName);
            service.addMessageElementQNameToOperationMapping(methodSchemaType.getQName(),
                    axisOperation);
        } catch (Exception e) {
            throw new LoggedRuntimeException("Error when preparing out-message " +
                    "of operation : " + axisOperation.getName(), e, log);
        }
    }
View Full Code Here

            for (Object typeName : map.keySet()) {
                typeTable.addComplexSchema((String) typeName, (QName) map.get(typeName));
            }
            mergeTwoSchemaTypes(schemaGenerator.getSchemaMap());
        } catch (Exception e) {
            throw new LoggedRuntimeException("Error generating schema", e, log);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.rulecep.commons.LoggedRuntimeException

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.