Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement


     * @return uri       - ERI of the GET request
     * @throws AxisFault - if the SOAP infoset cannot be converted in to the GET URL-encoded format
     */
    public static String getURI(MessageContext messageContext, String address) throws AxisFault {

        OMElement firstElement;
        address = address.substring(address.indexOf("//") + 2);
        address = address.substring(address.indexOf("/"));
        String queryParameterSeparator = (String) messageContext
                .getProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR);
        // In case queryParameterSeparator is null we better use the default value

        if (queryParameterSeparator == null) {
            queryParameterSeparator = WSDL20DefaultValueHolder
                    .getDefaultValue(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR);
        }

        firstElement = messageContext.getEnvelope().getBody().getFirstElement();
        String params = "";
        if (firstElement != null) {
            // first element corresponds to the operation name
            address = address + "/" + firstElement.getLocalName();
        } else {
            firstElement = messageContext.getEnvelope().getBody();
        }

        Iterator iter = firstElement.getChildElements();

        String legalCharacters = WSDL2Constants
                .LEGAL_CHARACTERS_IN_QUERY.replaceAll(queryParameterSeparator, "");
        StringBuffer buff = new StringBuffer(params);

        // iterate through the child elements and find the request parameters
        while (iter.hasNext()) {
            OMElement element = (OMElement) iter.next();
            try {
                buff.append(URIEncoderDecoder.quoteIllegal(element.getLocalName(),
                        legalCharacters)).append("=").append(URIEncoderDecoder.quoteIllegal(element.getText(),
                        legalCharacters)).append(queryParameterSeparator);
            } catch (UnsupportedEncodingException e) {
                throw new AxisFault("URI Encoding error : " + element.getLocalName()
                        + "=" + element.getText(), e);
            }
        }

        params = buff.toString();
        if (params.trim().length() != 0) {
View Full Code Here


        org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface endActivity = null;
        if (omElement != null) {
            org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
            Iterator iterator = omElement.getChildElements();
            while (iterator.hasNext()) {
                OMElement tmpElement = (OMElement) iterator.next();

                if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ASSIGN_START_TAG) && isIncludeAssigns()) {
                    activity = new AssignImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.CATCHALL_START_TAG)) {
                    activity = new CatchAllImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.CATCH_START_TAG)) {
                    activity = new CatchImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATESCOPE_START_TAG)) {
                    activity = new CompensateScopeImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATE_START_TAG)) {
                    activity = new CompensateImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.COMPENSATIONHANDLER_START_TAG)) {
                    activity = new CompensationHandlerImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ELSEIF_START_TAG)) {
                    activity = new ElseIfImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ELSE_START_TAG)) {
                    activity = new ElseImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.EVENTHANDLER_START_TAG)) {
                    activity = new EventHandlerImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.EXIT_START_TAG)) {
                    activity = new ExitImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FAULTHANDLER_START_TAG)) {
                    activity = new FaultHandlerImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FLOW_START_TAG)) {
                    activity = new FlowImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.FOREACH_START_TAG)) {
                    activity = new ForEachImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.IF_START_TAG)) {
                    activity = new IfImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.INVOKE_START_TAG)) {
                    activity = new InvokeImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONALARM_START_TAG)) {
                    activity = new OnAlarmImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONEVENT_START_TAG)) {
                    activity = new OnEventImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.ONMESSAGE_START_TAG)) {
                    activity = new OnMessageImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.PICK_START_TAG)) {
                    activity = new PickImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.PROCESS_START_TAG)) {
                    activity = new ProcessImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.RECEIVE_START_TAG)) {
                    activity = new ReceiveImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.REPEATUNTIL_START_TAG)) {
                    activity = new RepeatUntilImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.REPLY_START_TAG)) {
                    activity = new ReplyImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.RETHROW_START_TAG)) {
                    activity = new ReThrowImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SCOPE_START_TAG)) {
                    activity = new ScopeImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SEQUENCE_START_TAG)) {
                    activity = new SequenceImpl(tmpElement, this);
/*                   
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SOURCE_START_TAG)) {
                    activity = new SourceImpl(tmpElement, this);//source;
                    if (activity.getAttributes().get(0).getAttribute().equals("linkName")) {
                        if (links.containsKey(activity.getAttributes().get(0).getValue())) {    //if a entry for the particular link name already exists
                            links.get(activity.getAttributes().get(0).getValue()).setSource(this.parent);
                        }
                        else {
                            Link link = new Link();
                            link.setSource(this.parent);
                            links.put(activity.getAttributes().get(0).getValue(), link);
                        }
                        sources.add(this.parent);
                    }
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.SOURCES_START_TAG)) {
                    activity = new SourcesImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TARGET_START_TAG)) {
                    activity = new TargetImpl(tmpElement, this);//target;
                    if (activity.getAttributes().get(0).getAttribute().equals("linkName")) {
                        if (links.containsKey(activity.getAttributes().get(0).getValue())) {
                            links.get(activity.getAttributes().get(0).getValue()).setTarget(this.parent);
                        }
                        else {
                            Link link = new Link();
                            link.setTarget(this.parent);
                            links.put(activity.getAttributes().get(0).getValue(), link);
                        }
                        targets.add(this.parent);
                    }
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TARGETS_START_TAG)) {
                    activity = new TargetsImpl(tmpElement, this);
*/
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.TERMINATIONHANDLER_START_TAG)) {
                    activity = new TerminationHandlerImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.THROW_START_TAG)) {
                    activity = new ThrowImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.WAIT_START_TAG)) {
                    activity = new WaitImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.WHILE_START_TAG)) {
                    activity = new WhileImpl(tmpElement, this);
                } else if (tmpElement.getLocalName().equals(getEndTag())) {
                    break;
                } else {
                    continue;
                }

                activity.setLinkProperties(links, sources, targets);
                subActivities.add(activity);

                if (tmpElement.getChildElements().hasNext()) {
                    org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface replyActivity = activity.processSubActivities(tmpElement);
                    if (replyActivity != null) {
                        subActivities.add(replyActivity);
                    }
                }
                if (tmpElement.getLocalName().equals(org.wso2.carbon.bpel.ui.bpel2svg.BPEL2SVGFactory.PROCESS_START_TAG)) {
                    break;
                }
            }
        }
        return endActivity;
View Full Code Here

        if (body.getFirstElement() == null && HTTPConstants.HTTP_METHOD_POST.equals(httpMethod) &&
                messageContext.getProperty(Constants.REQUEST_PARAMETER_MAP) != null) {
            MultipleEntryHashMap map = (MultipleEntryHashMap) messageContext
                    .getProperty(Constants.REQUEST_PARAMETER_MAP);
            SOAPFactory soapFactory = getSOAPFactory(messageContext);
            OMElement bodyFirstChild = soapFactory
                    .createOMElement(XFORM_FIRST_ELEMENT, body);
            BuilderUtil.createSOAPMessageWithoutSchema(soapFactory, bodyFirstChild, map);
        }
        return soapEnv;
    }
View Full Code Here

    }

    public OMElement serializeEndpoint(Endpoint epr) {
        TemplateEndpoint endpoints = (TemplateEndpoint) epr;

        OMElement endpointElement = fac.createOMElement(
                new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "endpoint"));

        if (endpoints.getName() != null) {
            endpointElement.addAttribute(
                    fac.createOMAttribute("name", nullNS, endpoints.getName()));
        }

        endpointElement.addAttribute(fac.createOMAttribute("template", nullNS, endpoints.getTemplate()));

        Map<String, String> parameters = endpoints.getParameters();
        for (Map.Entry<String, String> entry : parameters.entrySet()) {
            if (entry.getKey().equals("name")) {
                endpointElement.addAttribute(fac.createOMAttribute("name", nullNS, entry.getValue()));
            } else if (entry.getKey().equals("uri")) {
                endpointElement.addAttribute(fac.createOMAttribute("uri", nullNS, entry.getValue()));
            } else {
                OMElement paramElement = fac.createOMElement(
                    new QName(SynapseConstants.SYNAPSE_NAMESPACE, "parameter"));

                endpointElement.addChild(paramElement);
                paramElement.addAttribute(fac.createOMAttribute("name", nullNS, entry.getKey()));
                paramElement.addAttribute(fac.createOMAttribute("value", nullNS, entry.getValue()));
            }
        }

        return endpointElement;
    }
View Full Code Here

        if (!(endpoint instanceof AddressEndpoint)) {
            handleException("Invalid endpoint type.");
        }

        fac = OMAbstractFactory.getOMFactory();
        OMElement endpointElement
                = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);

        AddressEndpoint addressEndpoint = (AddressEndpoint) endpoint;

        // serialize the properties
        serializeProperties(addressEndpoint, endpointElement);
        //serialize attributes
        serializeCommonAttributes(endpoint, endpointElement);

        EndpointDefinition epAddress = addressEndpoint.getDefinition();
        OMElement addressElement = serializeEndpointDefinition(epAddress);
        endpointElement.addChild(addressElement);

        return endpointElement;
    }
View Full Code Here

    }

    @Override
    public OMElement serializeEndpointDefinition(EndpointDefinition endpointDefinition) {

        OMElement element = fac.createOMElement("address", SynapseConstants.SYNAPSE_OMNAMESPACE);

        if (endpointDefinition.getAddress() != null) {
            element.addAttribute(
                    fac.createOMAttribute("uri", null, endpointDefinition.getAddress()));
        } else {
            handleException("Invalid Endpoint. Address is required");
        }
View Full Code Here

        if (!(endpoint instanceof WSDLEndpoint)) {
            handleException("Invalid endpoint type.");
        }

        fac = OMAbstractFactory.getOMFactory();
        OMElement endpointElement
                = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
       
        WSDLEndpoint wsdlEndpoint = (WSDLEndpoint) endpoint;

        // serialize the parameters
        serializeProperties(wsdlEndpoint, endpointElement);

        serializeCommonAttributes(endpoint,endpointElement);
       

        OMElement wsdlElement = fac.createOMElement("wsdl", SynapseConstants.SYNAPSE_OMNAMESPACE);
        String serviceName = wsdlEndpoint.getServiceName();
        if (serviceName != null) {
            wsdlElement.addAttribute("service", serviceName, null);
        }

        String portName = wsdlEndpoint.getPortName();
        if (portName != null) {
            wsdlElement.addAttribute("port", portName, null);
        }

        String uri = wsdlEndpoint.getWsdlURI();
        if (uri != null) {
            wsdlElement.addAttribute("uri", uri, null);
        }

        OMElement wsdlDoc = wsdlEndpoint.getWsdlDoc();
        if (wsdlDoc != null) {
            wsdlElement.addChild(wsdlDoc);
        }

        // currently, we have to get QOS information from the endpoint definition and set them as
View Full Code Here

     * @return XML format of the serialized endpoint
     */
    public static OMElement getElementFromEndpoint(Endpoint endpoint) {

        EndpointSerializer endpointSerializer = getEndpointSerializer(endpoint);
        OMElement elem = endpointSerializer.serializeEndpoint(endpoint);

        OMElement descriptionElem = endpointSerializer.getSerializedDescription(endpoint);
        if (descriptionElem != null) {
            elem.addChild(descriptionElem);
        }
        return elem;
    }
View Full Code Here

     */
    protected abstract OMElement serializeEndpoint(Endpoint endpoint);

    private OMElement getSerializedDescription(Endpoint endpoint) {

        OMElement descriptionElem = fac.createOMElement(
                new QName(SynapseConstants.SYNAPSE_NAMESPACE, "description"));

        if (endpoint.getDescription() != null) {
            descriptionElem.setText(endpoint.getDescription());
            return descriptionElem;
        } else {
            return null;
        }
    }
View Full Code Here

            element.addAttribute(fac.createOMAttribute(
                    "encoding", null, endpointDefinition.getCharSetEncoding()));
        }

        if (endpointDefinition.isAddressingOn()) {
            OMElement addressing = fac.createOMElement(
                    "enableAddressing", SynapseConstants.SYNAPSE_OMNAMESPACE);

            if (endpointDefinition.getAddressingVersion() != null) {
                addressing.addAttribute(fac.createOMAttribute(
                        "version", null, endpointDefinition.getAddressingVersion()));
            }

            if (endpointDefinition.isUseSeparateListener()) {
                addressing.addAttribute(fac.createOMAttribute("separateListener", null, "true"));
            }
            element.addChild(addressing);
        }

        if (endpointDefinition.isReliableMessagingOn()) {
            OMElement rm = fac.createOMElement("enableRM", SynapseConstants.SYNAPSE_OMNAMESPACE);

            if (endpointDefinition.getWsRMPolicyKey() != null) {
                rm.addAttribute(fac.createOMAttribute(
                        "policy", null, endpointDefinition.getWsRMPolicyKey()));
            }
            element.addChild(rm);
        }

        if (endpointDefinition.isSecurityOn()) {
            OMElement sec = fac.createOMElement("enableSec", SynapseConstants.SYNAPSE_OMNAMESPACE);

            if (endpointDefinition.getWsSecPolicyKey() != null) {
                sec.addAttribute(fac.createOMAttribute(
                        "policy", null, endpointDefinition.getWsSecPolicyKey()));
            } else {
                if (endpointDefinition.getInboundWsSecPolicyKey() != null) {
                    sec.addAttribute(fac.createOMAttribute(
                            "inboundPolicy", null, endpointDefinition.getInboundWsSecPolicyKey()));
                }
                if (endpointDefinition.getOutboundWsSecPolicyKey() != null) {
                    sec.addAttribute(fac.createOMAttribute("outboundPolicy",
                            null, endpointDefinition.getOutboundWsSecPolicyKey()));
                }
            }
            element.addChild(sec);
        }

        if (endpointDefinition.getTimeoutAction() != SynapseConstants.NONE ||
                endpointDefinition.getTimeoutDuration() > 0) {

            OMElement timeout = fac.createOMElement(
                    "timeout", SynapseConstants.SYNAPSE_OMNAMESPACE);
            element.addChild(timeout);

            OMElement duration = fac.createOMElement(
                    "duration", SynapseConstants.SYNAPSE_OMNAMESPACE);
            duration.setText(Long.toString(endpointDefinition.getTimeoutDuration()));
            timeout.addChild(duration);

            OMElement action = fac.createOMElement("responseAction", SynapseConstants.SYNAPSE_OMNAMESPACE);
            if (endpointDefinition.getTimeoutAction() == SynapseConstants.DISCARD) {
                action.setText("discard");
                timeout.addChild(action);
            } else if (endpointDefinition.getTimeoutAction()
                    == SynapseConstants.DISCARD_AND_FAULT) {
                action.setText("fault");
                timeout.addChild(action);
            } else if (endpointDefinition.getTimeoutAction()
                    == SynapseConstants.NONE) {
                // if the action is not given, it is set to fault
                action.setText("fault");
                timeout.addChild(action);
            }
        }

        if (endpointDefinition.getInitialSuspendDuration() != -1 ||
            !endpointDefinition.getSuspendErrorCodes().isEmpty()) {

            OMElement suspendOnFailure = fac.createOMElement(
                org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_ON_FAILURE,
                SynapseConstants.SYNAPSE_OMNAMESPACE);

            if (!endpointDefinition.getSuspendErrorCodes().isEmpty()) {
                OMElement errorCodes = fac.createOMElement(
                    org.apache.synapse.config.xml.XMLConfigConstants.ERROR_CODES,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                errorCodes.setText(endpointDefinition.getSuspendErrorCodes().
                    toString().replaceAll("[\\[\\] ]", ""));
                suspendOnFailure.addChild(errorCodes);
            }

            if (endpointDefinition.getInitialSuspendDuration() != -1) {
                OMElement initialDuration = fac.createOMElement(
                    org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_INITIAL_DURATION,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                initialDuration.setText(Long.toString(endpointDefinition.getInitialSuspendDuration()));
                suspendOnFailure.addChild(initialDuration);
            }

            if (endpointDefinition.getSuspendProgressionFactor() != -1) {
                OMElement progressionFactor = fac.createOMElement(
                    org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_PROGRESSION_FACTOR,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                progressionFactor.setText(Float.toString(endpointDefinition.getSuspendProgressionFactor()));
                suspendOnFailure.addChild(progressionFactor);
            }

            if (endpointDefinition.getSuspendMaximumDuration() != -1 &&
                    endpointDefinition.getSuspendMaximumDuration() != Long.MAX_VALUE) {
                OMElement suspendMaximum = fac.createOMElement(
                    org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_MAXIMUM_DURATION,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                suspendMaximum.setText(Long.toString(endpointDefinition.getSuspendMaximumDuration()));
                suspendOnFailure.addChild(suspendMaximum);
            }

            element.addChild(suspendOnFailure);
        }

        if (endpointDefinition.getRetryDurationOnTimeout() > 0 ||
            !endpointDefinition.getTimeoutErrorCodes().isEmpty()) {

            OMElement markAsTimedout = fac.createOMElement(
                org.apache.synapse.config.xml.XMLConfigConstants.MARK_FOR_SUSPENSION,
                SynapseConstants.SYNAPSE_OMNAMESPACE);

            if (!endpointDefinition.getTimeoutErrorCodes().isEmpty()) {
                OMElement errorCodes = fac.createOMElement(
                    org.apache.synapse.config.xml.XMLConfigConstants.ERROR_CODES,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                errorCodes.setText(endpointDefinition.getTimeoutErrorCodes().
                    toString().replaceAll("[\\[\\] ]", ""));
                markAsTimedout.addChild(errorCodes);
            }

            if (endpointDefinition.getRetriesOnTimeoutBeforeSuspend() > 0) {
                OMElement retries = fac.createOMElement(
                    org.apache.synapse.config.xml.XMLConfigConstants.RETRIES_BEFORE_SUSPENSION,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                retries.setText(Long.toString(endpointDefinition.getRetriesOnTimeoutBeforeSuspend()));
                markAsTimedout.addChild(retries);
            }

            if (endpointDefinition.getRetryDurationOnTimeout() > 0) {
                OMElement retryDelay = fac.createOMElement(
                    org.apache.synapse.config.xml.XMLConfigConstants.RETRY_DELAY,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                retryDelay.setText(Long.toString(endpointDefinition.getRetryDurationOnTimeout()));
                markAsTimedout.addChild(retryDelay);
            }

            element.addChild(markAsTimedout);
        }

         if (!endpointDefinition.getRetryDisabledErrorCodes().isEmpty()) {
            OMElement retryConfig = fac.createOMElement(XMLConfigConstants.RETRY_CONFIG,
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
            OMElement errorCodes = fac.createOMElement("disabledErrorCodes",
                    SynapseConstants.SYNAPSE_OMNAMESPACE);
                errorCodes.setText(endpointDefinition.getRetryDisabledErrorCodes().
                        toString().replaceAll("[\\[\\] ]", ""));
                retryConfig.addChild(errorCodes);
            element.addChild(retryConfig);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.OMElement

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.