All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.makefault-mediator.edit-mediator.jsp Maven / Gradle / Ivy

There is a newer version: 4.7.219
Show newest version

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@ page import="org.wso2.carbon.mediator.fault.FaultMediator" %>
<%@ page import="org.wso2.carbon.mediator.fault.ui.util.FaultUtil" %>
<%@ page import="org.wso2.carbon.mediator.service.ui.Mediator" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.SequenceEditorHelper" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.ns.NameSpacesRegistrar" %>
<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
<%@ page import="org.apache.axiom.om.OMElement" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>

<%
    Mediator mediator = SequenceEditorHelper.getEditingMediator(request, session);
    if (!(mediator instanceof FaultMediator)) {
        CarbonUIMessage.sendCarbonUIMessage("Unable to edit the mediator", CarbonUIMessage.ERROR, request);
%>

<%
        return;
    }

    FaultMediator faultMediator = (FaultMediator) mediator;

    // Getting the fault code option to set it selected
    String faultcodeOption;
    if (faultMediator.getFaultCodeValue() != null && faultMediator.getFaultCodeValue().getLocalPart() != null) {
        faultcodeOption = faultMediator.getFaultCodeValue().getLocalPart();
    } else {
        faultcodeOption = "undefined";
    }

%>




style="display:none; "<% } %>> style="display:none;" <% } %> > style="display:none;" <% } %> > style="display:none;" <% } %> >
<% if (faultMediator.getSoapVersion() == 1 || faultMediator.getSoapVersion() == 0) { %> SOAP 1.1 SOAP 1.2 POX <% } else if (faultMediator.getSoapVersion() == 2) { %> SOAP 1.1 SOAP 1.2 POX <% } else if (faultMediator.getSoapVersion() == 3){ %> SOAP 1.1 SOAP 1.2 POX <%}%>
*
*
style="display:none;" <% } %> > * style="display:none;" <% } %> > * <% if (faultMediator.getFaultReasonValue() != null) { %> value expression <% } else if (faultMediator.getFaultReasonExpr() != null) { %> value expression <% } else { %> value expression <% } %>
<% boolean isNSEditorRequired = false; NameSpacesRegistrar nameSpacesRegistrar = NameSpacesRegistrar.getInstance(); nameSpacesRegistrar.registerNameSpaces(faultMediator.getFaultReasonExpr(), "name_space", session); if (faultMediator.getFaultReasonExpr() != null && faultMediator.getFaultReasonExpr().getRootExpr() != null && faultMediator.getFaultReasonExpr().getRootExpr().getText() != null) { isNSEditorRequired = true; //TODO: why do we need to set the expression as followings, the comment line //FaultUtil.repalceDoubleQuotation(faultMediator.getFaultReasonExpr().getRootExpr().getText()); // setting the expression as below would be enough %> <% } else if (faultMediator.getFaultReasonValue() != null) { %> <% } else { %> <% } %>

style="display:none;" <% } %> > style="display:none;" <% } %> > <% if (faultMediator.getFaultRole() == null) { %> <% } else { %> <% } %>
<% if (faultMediator.getFaultNode() == null) { %> <% } else { %> <% } %>
<% if (faultMediator.getFaultDetail() != null) { %> value expression <% } else if (faultMediator.getFaultDetailExpr() != null) { %> value expression <% } else { %> value expression <% } %>
<% boolean isNSEditorRequiredForDetail = false; NameSpacesRegistrar nameSpacesRegistrarForDetail = NameSpacesRegistrar.getInstance(); nameSpacesRegistrarForDetail.registerNameSpaces(faultMediator.getFaultDetailExpr(), "detail", session); if (faultMediator.getFaultDetailExpr() != null && faultMediator.getFaultDetailExpr().getRootExpr() != null && faultMediator.getFaultDetailExpr().getRootExpr().getText() != null) { isNSEditorRequiredForDetail = true; String detailXPathString = FaultUtil.repalceDoubleQuotation(faultMediator.getFaultDetailExpr().toString()); //TODO: why do we need to set the expression as followings, the comment line //FaultUtil.repalceDoubleQuotation(faultMediator.getFaultReasonExpr().getRootExpr().getText()); // setting the expression as below would be enough %> <% } else if (faultMediator.getFaultDetail() == null && faultMediator.getFaultDetailElements().size() == 0) { %> <% } else if (faultMediator.getFaultDetailElements().size() > 0) { String detail = ""; for (OMElement e : faultMediator.getFaultDetailElements()) { detail += e.toString(); } %> ' <% } %>





© 2015 - 2025 Weber Informatics LLC | Privacy Policy