Package org.apache.axis2.description

Examples of org.apache.axis2.description.ParameterImpl


                                                  MessageReceiver messageReceiver, String className, QName opName)
            throws AxisFault {
        AxisService service = new AxisService(serviceName.getLocalPart());

        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(new ParameterImpl(AbstractMessageReceiver.SERVICE_CLASS, className));

        // todo I assumed in-out mep , this has to be imroved : Deepal
        AxisOperation axisOp = new InOutAxisOperation(opName);

        axisOp.setMessageReceiver(messageReceiver);
View Full Code Here


                                                           QName opName)
            throws AxisFault {
        AxisService service = new AxisService(serviceName.getLocalPart());

        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(new ParameterImpl(AbstractMessageReceiver.SERVICE_CLASS, className));

        // todo I assumed in-out mep , this has to be imroved : Deepal
        AxisOperation axisOp = new OutInAxisOperation(opName);

        axisOp.setMessageReceiver(messageReceiver);
View Full Code Here

                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();) {
                    AxisOperation axisOperation = (AxisOperation) iterator.next();
                    String op_name = axisOperation.getName().getLocalPart();
                    ArrayList operation_para = axisOperation.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());

                        axisOperation.addParameter(new ParameterImpl(parameter.getName(), para));
                    }
                }
            }

            res.setContentType("text/css");
View Full Code Here

        super(testName);
    }

    protected void setUp() throws Exception {
        UtilServer.start();
        Parameter parameter = new ParameterImpl(
                Constants.Configuration.ENABLE_REST, "true");
        UtilServer.getConfigurationContext()
                .getAxisConfiguration().addParameter(parameter);
        service =
                Utils.createSimpleService(serviceName,
View Full Code Here

        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

    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

    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

            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

                                                         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

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

TOP

Related Classes of org.apache.axis2.description.ParameterImpl

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.