Examples of ParameterDesc


Examples of org.apache.axis.description.ParameterDesc

        // chooses to allow parameters to be added when
        // parmAndRetReq==false.  This does not conflict with
        // JSR 101 which indicates an exception MAY be thrown.

        //if (parmAndRetReq) {
        ParameterDesc param = new ParameterDesc();
        param.setQName( paramName );
        param.setTypeQName( xmlType );
        param.setJavaType( javaType );
        byte mode = ParameterDesc.IN;
        if (parameterMode == ParameterMode.INOUT) {
            mode = ParameterDesc.INOUT;
        } else if (parameterMode == ParameterMode.OUT) {
            mode = ParameterDesc.OUT;
        }
        param.setMode(mode);

        operation.addParameter(param);
        parmAndRetReq = true;
        //}
        //else {
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

        }

        if (operation == null)
            operation = new OperationDesc();

        ParameterDesc param = new ParameterDesc();
        param.setQName(paramName);
        param.setTypeQName(xmlType);
        param.setJavaType(javaType);
        if (parameterMode == ParameterMode.IN) {
            param.setMode(ParameterDesc.IN);
        }
        else if (parameterMode == ParameterMode.INOUT) {
            param.setMode(ParameterDesc.INOUT);
        }
        else if (parameterMode == ParameterMode.OUT) {
            param.setMode(ParameterDesc.OUT);
        }
        if (headerMode == ParameterMode.IN) {
            param.setInHeader(true);
        }
        else if (headerMode == ParameterMode.INOUT) {
            param.setInHeader(true);
            param.setOutHeader(true);
        }
        else if (headerMode == ParameterMode.OUT) {
            param.setOutHeader(true);
        }
        operation.addParameter(param);
        parmAndRetReq = true;
    } // addParameterAsHeader
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

                        for ( int j = 0 ; j < params.size() && match ; j++ ) {
                            RPCParam rpcParam = (RPCParam)params.get(j);
                            Object value = rpcParam.getValue();

                            // first check the type on the paramter
                            ParameterDesc paramDesc = rpcParam.getParamDesc();

                            // if we found some type info try to make sure the value type is
                            // correct.  For instance, if we deserialized a xsd:dateTime in
                            // to a Calendar and the service takes a Date, we need to convert
                            if (paramDesc != null && paramDesc.getJavaType() != null) {

                                // Get the type in the signature (java type or its holder)
                                Class sigType = paramDesc.getJavaType();
                                if(!JavaUtils.isConvertable(value, sigType))
                                    match = false;
                            }
                        }
                        // This is not the right operation, try the next one.
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

        // Search parameters/return to see if any indicate
        // that instance data is contained in the header.
        ArrayList paramDescs = operation.getParameters();
        if (paramDescs != null) {
            for (int j=0; j<paramDescs.size(); j++) {
                ParameterDesc paramDesc =
                    (ParameterDesc) paramDescs.get(j);
                if ((!isResponse && paramDesc.isInHeader()) ||
                    (isResponse && paramDesc.isOutHeader())) {
                    return true;
                }
            }
        }
        if (isResponse &&
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

            // Find parameters that have instance
            // data in the header.
            ArrayList paramDescs = operation.getParameters();
            if (paramDescs != null) {
                for (int j=0; j<paramDescs.size(); j++) {
                    ParameterDesc paramDesc =
                        (ParameterDesc) paramDescs.get(j);
                    if ((!isResponse && paramDesc.isInHeader()) ||
                        (isResponse && paramDesc.isOutHeader())) {
                        // Get the headers that match the parameter's
                        // QName
                        Enumeration headers = ((SOAPEnvelope) envelope).
                            getHeadersByName(
                                 paramDesc.getQName().getNamespaceURI(),
                                 paramDesc.getQName().getLocalPart(),
                                 true);
                        // Publish each of the found elements to the
                        // handler.  The pushElementHandler and
                        // setCurElement calls are necessary to
                        // have the message element recognized as a
                        // child of the RPCElement.
                        while(headers != null &&
                              headers.hasMoreElements()) {
                            context.pushElementHandler(handler);
                            context.setCurElement(null);
                            ((MessageElement) headers.nextElement()).
                                publishToHandler(
                                   (org.xml.sax.ContentHandler)context);
                        }
                    }
                }
            }
           
            // Now do the same processing for the return parameter.
            if (isResponse &&
                operation.getReturnParamDesc() != null &&
                operation.getReturnParamDesc().isOutHeader()) {
                ParameterDesc paramDesc = operation.getReturnParamDesc();
                Enumeration headers =
                    ((SOAPEnvelope) envelope).
                    getHeadersByName(
                        paramDesc.getQName().getNamespaceURI(),
                        paramDesc.getQName().getLocalPart(),
                        true);
                while(headers != null &&
                      headers.hasMoreElements()) {
                    context.pushElementHandler(handler);
                    context.setCurElement(null);
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

     *
     * @param  paramQName  QName of the parameter to return
     * @return XMLType    XMLType of paramQName, or null if not found.
     */
    public QName getParameterTypeByQName(QName paramQName) {
        ParameterDesc param = operation.getParamByQName(paramQName);
        if (param != null) {
            return param.getTypeQName();
        }
        return( null );
    }
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

        Vector result = new Vector();
        int    j = 0 ;
        ArrayList parameters = operation.getParameters();

        for (int i = 0; i < parameters.size(); i++) {
            ParameterDesc param = (ParameterDesc)parameters.get(i);
            if (param.getMode() != ParameterDesc.OUT) {
                QName paramQName = param.getQName();

                // Create an RPCParam if param isn't already an RPCParam.
                RPCParam rpcParam = null;
                Object p = params[j++];
                if(p instanceof RPCParam) {
                    rpcParam = (RPCParam)p;
                } else {
                    rpcParam = new RPCParam(paramQName.getNamespaceURI(),
                                            paramQName.getLocalPart(),
                                            p);
                }
                // Attach the ParameterDescription to the RPCParam
                // so that the serializer can use the (javaType, xmlType)
                // information.
                rpcParam.setParamDesc(param);

                // Add the param to the header or vector depending
                // on whether it belongs in the header or body.
                if (param.isInHeader()) {
                    addHeader(new RPCHeaderParam(rpcParam));
                } else {
                    result.add(rpcParam);
                }
            }
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

                // does not match one of the operation parameters.
                if (findReturnParam) {
                    Iterator it = outParams.keySet().iterator();
                    while (it.hasNext() && findReturnParam) {
                        QName qname = (QName) it.next();
                        ParameterDesc paramDesc =
                            operation.getOutputParamByQName(qname);
                        if (paramDesc == null) {
                            // Doesn't match a paramter, so use this for the return
                            findReturnParam = false;
                            result = outParams.remove(qname);
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

     *
     */
    private Class getJavaTypeForQName(QName name) {
        if (operation == null) return null;

        ParameterDesc param = operation.getOutputParamByQName(name);
        return param == null ? null : param.getJavaType();
    }
View Full Code Here

Examples of org.apache.axis.description.ParameterDesc

        // chooses to allow parameters to be added when
        // parmAndRetReq==false.  This does not conflict with
        // JSR 101 which indicates an exception MAY be thrown.

        //if (parmAndRetReq) {
        ParameterDesc param = new ParameterDesc();
        param.setQName( paramName );
        param.setTypeQName( xmlType );
        param.setJavaType( javaType );
        byte mode = ParameterDesc.IN;
        if (parameterMode == ParameterMode.INOUT) {
            mode = ParameterDesc.INOUT;
        } else if (parameterMode == ParameterMode.OUT) {
            mode = ParameterDesc.OUT;
        }
        param.setMode(mode);

        operation.addParameter(param);
        parmAndRetReq = true;
        //}
        //else {
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.