Package org.apache.axis.description

Examples of org.apache.axis.description.OperationDesc


     * @param proxyParams proxyParameters
     */
    private void callOutputParams2proxyParams(Object[] proxyParams)
        throws JavaUtils.HolderException
    {
        OperationDesc operationDesc = call.getOperation();
        if (operationDesc == null)
        {
            // we don't know which parameters are IN, OUT or INOUT
            // let's suppose they are all in
            return;
        }

        Map outputParams = call.getOutputParams();

        for (int i = 0; i < operationDesc.getNumParams();i++)
        {
            Object param = proxyParams[i];
            ParameterDesc paramDesc = operationDesc.getParameter(i);
            if ((paramDesc.getMode() == ParameterDesc.INOUT) ||
                (paramDesc.getMode() == ParameterDesc.OUT)) {

                  JavaUtils.setHolderValue((Holder)param,
                      outputParams.get(paramDesc.getQName()));
View Full Code Here


        // Add the port and binding operations.
        ArrayList operations = serviceDesc.getOperations();

        for (Iterator i = operations.iterator(); i.hasNext();) {
            OperationDesc thisOper = (OperationDesc) i.next();
            BindingOperation bindingOper = writeOperation(def, binding,
                    thisOper);
            Operation oper = bindingOper.getOperation();
            OperationDesc messageOper = thisOper;

            // add the documentation to oper
            if (messageOper.getDocumentation() != null) {
                Element element = docHolder.createElement("documentation");
                Text textNode =
                        docHolder.createTextNode(messageOper.getDocumentation());

                element.appendChild(textNode);
                oper.setDocumentationElement(element);
            }

            if (serviceDesc2 != null) {

                // If a serviceDesc containing an impl class is provided,
                // try and locate the corresponding operation
                // (same name, same parm types and modes).  If a
                // corresponding operation is found, it is sent
                // to the writeMessages method so that its parameter
                // names will be used in the wsdl file.
                OperationDesc[] operArray =
                        serviceDesc2.getOperationsByName(thisOper.getName());
                boolean found = false;

                if (operArray != null) {
                    for (int j = 0; (j < operArray.length) && !found; j++) {
                        OperationDesc tryOper = operArray[j];

                        if (tryOper.getParameters().size()
                                == thisOper.getParameters().size()) {
                            boolean parmsMatch = true;

                            for (int k =
                                    0; (k < thisOper.getParameters().size())
                                    && parmsMatch; k++) {
                                if ((tryOper.getParameter(
                                        k).getMode() != thisOper.getParameter(
                                                k).getMode())
                                        || (!tryOper.getParameter(
                                                k).getJavaType().equals(
                                                        thisOper.getParameter(
                                                                k).getJavaType()))) {
                                    parmsMatch = false;
                                }
View Full Code Here

                       
        // Look up this element in our faultMap
        // if we find a match, this element is the fault data
        MessageContext msgContext = context.getMessageContext();
        SOAPConstants soapConstants = msgContext.getSOAPConstants();
        OperationDesc op = msgContext.getOperation();
        Class faultClass = null;
        QName faultXmlType = null;
        if (op != null) {
            FaultDesc faultDesc = null;
            // allow fault type to be denoted in xsi:type
            faultXmlType = context.getTypeFromAttributes(namespace,
                                                         name,
                                                         attributes);
            if (faultXmlType != null) {
                faultDesc = op.getFaultByXmlType(faultXmlType);
            }

            // If we didn't get type information, look up QName of fault
            if (faultDesc == null) {
                faultDesc = op.getFaultByQName(qn);
                if ((faultXmlType == null) && (faultDesc != null)) {
                    faultXmlType = faultDesc.getXmlType();
                }
            }
View Full Code Here

        // Now we've got the service description loaded up.  We're going to
        // be testing parameter dispatch by name, so if debug info isn't
        // compiled into the Service class, the names are going to be "in0",
        // etc.  Make sure they match.
        OperationDesc oper = desc.getOperationByName("concatenate");
        assertNotNull(oper);

        firstParamName = oper.getParameter(0).getQName();
        secondParamName = oper.getParameter(1).getQName();
    }
View Full Code Here

     *
     * @param operationStyle
     */
    public void setOperationStyle(Style operationStyle) {
        if (operation == null) {
            operation = new OperationDesc();
        }

        operation.setStyle(operationStyle);

        // If no one has explicitly set the use, we should track
View Full Code Here

     */
    public void setOperationUse(Use operationUse) {
        useExplicitlySet = true;

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

        operation.setUse(operationUse);
        if (!encodingStyleExplicitlySet) {
            String encStyle = "";
View Full Code Here

            throw new RuntimeException(
                    Messages.getMessage("operationAlreadySet"));
        }

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

        // In order to allow any Call to be re-used, Axis
        // chooses to allow parameters to be added when
        // parmAndRetReq==false.  This does not conflict with
        // JSR 101 which indicates an exception MAY be thrown.
View Full Code Here

            throw new RuntimeException(
                    Messages.getMessage("operationAlreadySet"));
        }

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

        ParameterDesc param = new ParameterDesc();
        param.setQName(paramName);
        param.setTypeQName(xmlType);
        param.setJavaType(javaType);
View Full Code Here

            throw new RuntimeException(
                    Messages.getMessage("operationAlreadySet"));
        }

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

        // In order to allow any Call to be re-used, Axis
        // chooses to allow setReturnType to be changed when
        // parmAndRetReq==false.  This does not conflict with
        // JSR 101 which indicates an exception MAY be thrown.
View Full Code Here

            throw new RuntimeException(
                    Messages.getMessage("operationAlreadySet"));
        }

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

        operation.setReturnQName(qname);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis.description.OperationDesc

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.