Package org.apache.axis2.om

Examples of org.apache.axis2.om.OMAttribute


        Iterator msgRecives = messageReceivers.getChildrenWithName(new QName(TAG_MESSAGE_RECEIVER));
        while (msgRecives.hasNext()) {
            OMElement msgRev = (OMElement) msgRecives.next();
            MessageReceiver msgrecivere =
                    loadMessageReceiver(Thread.currentThread().getContextClassLoader(), msgRev);
            OMAttribute mepAtt = msgRev.getAttribute(new QName(TAG_MEP));
            mr_mep.put(mepAtt.getAttributeValue(), msgrecivere);
        }
        return mr_mep;
    }
View Full Code Here


        Iterator iterator = element.getChildrenWithName(new QName(TAG_MESSAGE_RECEIVER));
        while (iterator.hasNext()) {
            OMElement receiverElement = (OMElement) iterator.next();
            MessageReceiver receiver =
                    loadMessageReceiver(loader, receiverElement);
            OMAttribute mepAtt = receiverElement.getAttribute(new QName(TAG_MEP));
            meps.put(mepAtt.getAttributeValue(), receiver);
        }
        return meps;
    }
View Full Code Here

        return meps;
    }

    protected MessageReceiver loadMessageReceiver(ClassLoader loader, OMElement element)
            throws DeploymentException {
        OMAttribute receiverName = element.getAttribute(new QName(TAG_CLASS_NAME));
        String className = receiverName.getAttributeValue();
        MessageReceiver receiver = null;

        try {
            Class messageReceiver;
View Full Code Here

    protected HandlerDescription processHandler(OMElement handler_element, ParameterInclude parent)
            throws DeploymentException {
        HandlerDescription handler = new HandlerDescription();

        // Setting Handler name
        OMAttribute name_attribute = handler_element.getAttribute(new QName(ATTRIBUTE_NAME));

        if (name_attribute == null) {
            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.INVALID_HANDLER,
                    "Name missing"));
        } else {
            handler.setName(new QName(name_attribute.getAttributeValue()));
        }

        // Setting Handler Class name
        OMAttribute class_attribute = handler_element.getAttribute(new QName(TAG_CLASS_NAME));

        if (class_attribute == null) {
            throw new DeploymentException((Messages.getMessage(DeploymentErrorMsgs.INVALID_HANDLER,
                    "class name is missing")));
        } else {
            handler.setClassName(class_attribute.getAttributeValue());
        }

        // processing phase Rules (order)
        OMElement order_element = handler_element.getFirstChildWithName(new QName(TAG_ORDER));

        if (order_element == null) {
            throw new DeploymentException((Messages.getMessage(DeploymentErrorMsgs.INVALID_HANDLER,
                    "phase rule has not been specified")));
        } else {
            Iterator order_itr = order_element.getAllAttributes();

            while (order_itr.hasNext()) {
                OMAttribute orderAttribute = (OMAttribute) order_itr.next();
                String name = orderAttribute.getQName().getLocalPart();
                String value = orderAttribute.getAttributeValue();

                if (TAG_AFTER.equals(name)) {
                    handler.getRules().setAfter(value);
                } else if (TAG_BEFORE.equals(name)) {
                    handler.getRules().setBefore(value);
View Full Code Here

    protected void processOperationModuleRefs(Iterator moduleRefs, AxisOperation operation)
            throws DeploymentException {
        try {
            while (moduleRefs.hasNext()) {
                OMElement moduleref = (OMElement) moduleRefs.next();
                OMAttribute moduleRefAttribute = moduleref.getAttribute(new QName(TAG_REFERENCE));

                if (moduleRefAttribute != null) {
                    String refName = moduleRefAttribute.getAttributeValue();

                    if (axisConfig.getModule(new QName(refName)) == null) {
                        throw new DeploymentException(
                                Messages.getMessage(DeploymentErrorMsgs.MODULE_NOT_FOUND, refName));
                    } else {
View Full Code Here

            // setting parameterElement
            parameter.setParameterElement(parameterElement);

            // setting parameter Name
            OMAttribute paramName = parameterElement.getAttribute(new QName(ATTRIBUTE_NAME));

            if (paramName == null) {
                throw new DeploymentException(
                        Messages.getMessage(DeploymentErrorMsgs.BAD_PARAMETER_ARGUMENT));
            }

            parameter.setName(paramName.getAttributeValue());

            // setting parameter Value (the chiled elemnt of the parameter)
            OMElement paramValue = parameterElement.getFirstElement();

            if (paramValue != null) {
                parameter.setValue(parameterElement);
                parameter.setParameterType(Parameter.OM_PARAMETER);
            } else {
                String paratextValue = parameterElement.getText();

                parameter.setValue(paratextValue);
                parameter.setParameterType(Parameter.TEXT_PARAMETER);
            }

            // setting locking attribute
            OMAttribute paramLocked = parameterElement.getAttribute(new QName(ATTRIBUTE_LOCKED));
            Parameter parentParam = null;

            if (parent != null) {
                parentParam = parent.getParameter(parameter.getName());
            }

            if (paramLocked != null) {
                String lockedValue = paramLocked.getAttributeValue();

                if (BOOLEAN_TRUE.equals(lockedValue)) {

                    // if the parameter is locked at some level parameter value replace by that
                    if ((parent != null) && parent.isParameterLocked(parameter.getName())) {
View Full Code Here

                    service.setServiceDescription(writer.toString());
                } else {
                    service.setServiceDescription(descriptionElement.getText());
                }
            } else {
                OMAttribute serviceNameatt = service_element.getAttribute(new QName(ATTRIBUTE_NAME));

                if (serviceNameatt != null) {
                    service.setServiceDescription(serviceNameatt.getAttributeValue());
                }
            }

            // setting the PolicyInclude
View Full Code Here

    private void processMessages(Iterator messages, AxisOperation operation)
            throws DeploymentException {
        while (messages.hasNext()) {
            OMElement messageElement = (OMElement) messages.next();
            OMAttribute lable = messageElement.getAttribute(new QName(TAG_LABEL));

            if (lable == null) {
                throw new DeploymentException("message lebel can not be null");
            }

            AxisMessage message = operation.getMessage(lable.getAttributeValue());

            Iterator parameters = messageElement.getChildrenWithName(new QName(TAG_PARAMETER));

            // setting the PolicyInclude
//            PolicyInclude policyInclude = message.getPolicyInclude();
View Full Code Here

     */
    protected void processModuleRefs(Iterator moduleRefs) throws DeploymentException {
        try {
            while (moduleRefs.hasNext()) {
                OMElement moduleref = (OMElement) moduleRefs.next();
                OMAttribute moduleRefAttribute = moduleref.getAttribute(new QName(TAG_REFERENCE));

                if (moduleRefAttribute != null) {
                    String refName = moduleRefAttribute.getAttributeValue();

                    if (axisConfig.getModule(new QName(refName)) == null) {
                        throw new DeploymentException(
                                Messages.getMessage(DeploymentErrorMsgs.MODULE_NOT_FOUND, refName));
                    } else {
View Full Code Here

    protected void processOperationModuleConfig(Iterator moduleConfigs, ParameterInclude parent,
                                                AxisOperation operation)
            throws DeploymentException {
        while (moduleConfigs.hasNext()) {
            OMElement moduleConfig = (OMElement) moduleConfigs.next();
            OMAttribute moduleName_att = moduleConfig.getAttribute(new QName(ATTRIBUTE_NAME));

            if (moduleName_att == null) {
                throw new DeploymentException(
                        Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
            } else {
                String module = moduleName_att.getAttributeValue();
                ModuleConfiguration moduleConfiguration =
                        new ModuleConfiguration(new QName(module), parent);
                Iterator parameters = moduleConfig.getChildrenWithName(new QName(TAG_PARAMETER));

                processParameters(parameters, moduleConfiguration, parent);
View Full Code Here

TOP

Related Classes of org.apache.axis2.om.OMAttribute

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.