Examples of ParameterImpl


Examples of org.apache.axis2.description.ParameterImpl

        LocalTransportReceiver.CONFIG_CONTEXT = new ConfigurationContext(
                config);

        ServiceDescription service = new ServiceDescription(serviceName);
        service.addParameter(
                new ParameterImpl(AbstractMessageReceiver.SERVICE_CLASS,
                        MessageContextEnabledEcho.class.getName()));
        OperationDescription operation = new OperationDescription(
                operationName);
        operation.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
        service.addOperation(operation);
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

    protected void setUp() throws Exception {
        UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
        service = new ServiceDescription(serviceName);
        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(new ParameterImpl(
                        AbstractMessageReceiver.SERVICE_CLASS, EchoSwA.class
                                .getName()));
        OperationDescription axisOp = new OperationDescription(operationName);
        axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
        axisOp.setStyle(WSDLService.STYLE_DOC);
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

    protected void setUp() throws Exception {
        UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
        service = new ServiceDescription(serviceName);
        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(new ParameterImpl(AbstractMessageReceiver.SERVICE_CLASS,
                EchoService.class.getName()));

        OperationDescription axisOp = new OperationDescription(operationName);
        axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
        axisOp.setStyle(WSDLService.STYLE_DOC);
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

            throws DeploymentException {
        while (paramters.hasNext()) {
            //this is to check whether some one has locked the parmter at the top level
            OMElement paramterElement = (OMElement) paramters.next();

            Parameter paramter = new ParameterImpl();
            //setting paramterElement
            paramter.setParameterElement(paramterElement);

            //setting paramter Name
            OMAttribute paraName = paramterElement.getAttribute(
                    new QName(ATTNAME));
            if(paraName == null ){
                throw new DeploymentException(
                        Messages.getMessage(DeploymentErrorMsgs.BAD_PARA_ARGU));
            }
            paramter.setName(paraName.getValue());

            //setting paramter Value (the chiled elemnt of the paramter)
            OMElement paraValue = paramterElement.getFirstElement();
            if(paraValue !=null){
                paramter.setValue(paramterElement);
                paramter.setParamterType(Parameter.DOM_PARAMETER);
            } else {
                String paratestValue = paramterElement.getText();
                paramter.setValue(paratestValue);
                paramter.setParamterType(Parameter.TEXT_PARAMETER);
            }

            //setting locking attribute
            OMAttribute paraLocked = paramterElement.getAttribute(
                    new QName(ATTLOCKED));
            Parameter parentpara = null;
            if (parent !=null) {
                parentpara = parent.getParameter(paramter.getName());
            }
            if (paraLocked !=null) {
                String lockedValue = paraLocked.getValue();
                if("true".equals(lockedValue)){
                    //if the parameter is locked at some levle paramer value replace by that
                    if(parent!=null && parent.isParamterLocked(paramter.getName())){
                        throw new DeploymentException("The paramter " + paramter.getName() + " has" +
                                " locked at top levle can not overide");
                    } else{
                        paramter.setLocked(true);
                    }

                } else {
                    paramter.setLocked(false);
                }
            }
            try {
                if(parent !=null){
                    if(parentpara == null | !parent.isParamterLocked(paramter.getName())){
                        parameterInclude.addParameter(paramter);
                    }
                } else {
                    parameterInclude.addParameter(paramter);
                }
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

                                                         String className,
                                                         QName opName) throws AxisFault {
        ServiceDescription service = new ServiceDescription(serviceName);
        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(
                new ParameterImpl(AbstractMessageReceiver.SERVICE_CLASS,
                        className));

        OperationDescription axisOp = new OperationDescription(opName);
        axisOp.setMessageReceiver(messageReceiver);
        axisOp.setStyle(WSDLService.STYLE_RPC);
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

public class ParamterAddTest extends TestCase {

    private AxisConfiguration reg = new AxisConfigurationImpl();
    public void testAddParamterServiceLockedAtAxisConfig(){
        try {
            Parameter para = new ParameterImpl();
            para.setValue(null);
            para.setName("PARA_NAME");
            para.setLocked(true);
            reg.addParameter(para);

            ServiceDescription service = new ServiceDescription(new QName("Service1"));
            reg.addService(service);
            service.addParameter(para);
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

        }
    }

     public void testAddParamterModuleLockedAtAxisConfig(){
        try {
            Parameter para = new ParameterImpl();
            para.setValue(null);
            para.setName("PARA_NAME");
            para.setLocked(true);
            reg.addParameter(para);
            ModuleDescription module = new ModuleDescription(new QName("Service1"));
            module.setParent(reg);
            module.addParameter(para);
            fail("This should fails with Parmter is locked can not overide");
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

        }
    }

     public void testAddParamterOpeartionlockedByAxisConfig(){
        try {
            Parameter para = new ParameterImpl();
            para.setValue(null);
            para.setName("PARA_NAME");
            para.setLocked(true);
            reg.addParameter(para);

            ServiceDescription service = new ServiceDescription(new QName("Service1"));
            reg.addService(service);
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

        }
    }

     public void testAddParamterOpeartionLockebyService(){
        try {
            Parameter para = new ParameterImpl();
            para.setValue(null);
            para.setName("PARA_NAME");
            para.setLocked(true);

            ServiceDescription service = new ServiceDescription(new QName("Service1"));
            reg.addService(service);
            service.addParameter(para);
View Full Code Here

Examples of org.apache.axis2.description.ParameterImpl

            if(service !=null){
                ArrayList service_para = service.getParameters();
                for (int i = 0; i < service_para.size(); i++) {
                    Parameter parameter = (Parameter) service_para.get(i);
                    String para =  req.getParameter(serviceName + "_" + parameter.getName());
                    service.addParameter(new ParameterImpl(parameter.getName(),para));
                }
                HashMap operation = service.getOperations();
                Collection op_col = operation.values();
                for (Iterator iterator = op_col.iterator(); iterator.hasNext();) {
                    OperationDescription operationDescription =
                            (OperationDescription) iterator.next();
                    String op_name = operationDescription.getName().getLocalPart();
                    ArrayList operation_para = operationDescription.getParameters();
                    for (int i = 0; i < operation_para.size(); i++) {
                        Parameter parameter = (Parameter) operation_para.get(i);
                        String para =  req.getParameter(op_name + "_" + parameter.getName());
                        operationDescription.addParameter(
                                new ParameterImpl(parameter.getName(),para));
                    }
                }
            }
            res.setContentType("text/css");
            PrintWriter out_writer = new PrintWriter(out);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.