Examples of OperationDesc


Examples of org.apache.axis.description.OperationDesc

            writer.println(sb.toString());
            ArrayList operations = sd.getOperations();
            if (!operations.isEmpty()) {
                writer.println("<ul>");
                for (Iterator it = operations.iterator(); it.hasNext();) {
                    OperationDesc desc = (OperationDesc) it.next();
                    writer.println("<li>" + desc.getName());
                }
                writer.println("</ul>");
            }
        }
        writer.println("</ul>");
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

            // find the right one.  For each matching operation which has an
            // equal number of "in" parameters, try deserializing.  If we
            // don't succeed for any of the candidates, punt.

            for (int i = 0; i < operations.length; i++) {
                OperationDesc operation = operations[i];
                if (operation.getNumInParams() >= numParams ||
                    elementIsFirstParam ||
                    operation.getStyle() == Style.WRAPPED) {
                    // If the Style is WRAPPED, the numParams may be inflated
                    // as in the following case:
                    //  <getAttractions xmlns="urn:CityBBB">
                    //      <attname>Christmas</attname>
                    //      <attname>Xmas</attname>
                    //   </getAttractions>
                    //
                    //  for getAttractions(String[] attName)
                    //
                    // numParams will be 2 and and operation.getNumInParams=1

                    // Set the operation so the RPCHandler can get at it
                    rpcHandler.setOperation(operation);
                    try {
                        if (elementIsFirstParam && operation.getNumInParams() > 0) {
                            context.pushElementHandler(rpcHandler);
                            context.setCurElement(null);
                        } else {
                            context.pushElementHandler(
                                    new EnvelopeHandler(rpcHandler));
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

        }

        // 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;
            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;
                                }
                            }
                            if (parmsMatch) {
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

        // 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).getName();
        secondParamName = oper.getParameter(1).getName();
    }
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

            log.debug("Enter: RPCProvider.processMessage()");
        }

        SOAPService service = msgContext.getService();
        ServiceDesc serviceDesc = service.getServiceDescription();
        OperationDesc operation = msgContext.getOperation();

        Vector          bodies = reqEnv.getBodyElements();
        if (log.isDebugEnabled()) {
            log.debug(Messages.getMessage("bodyElems00", "" + bodies.size()));
            log.debug(Messages.getMessage("bodyIs00", "" + bodies.get(0)));
        }

        RPCElement   body = null;

        // Find the first "root" body element, which is the RPC call.
        for ( int bNum = 0 ; body == null && bNum < bodies.size() ; bNum++ ) {
            // If this is a regular old SOAPBodyElement, and it's a root,
            // we're probably a non-wrapped doc/lit service.  In this case,
            // we deserialize the element, and create an RPCElement "wrapper"
            // around it which points to the correct method.
            // FIXME : There should be a cleaner way to do this...
            if (!(bodies.get(bNum) instanceof RPCElement)) {
                SOAPBodyElement bodyEl = (SOAPBodyElement)bodies.get(bNum);
                // igors: better check if bodyEl.getID() != null
                // to make sure this loop does not step on SOAP-ENC objects
                // that follow the parameters! FIXME?
                if (bodyEl.isRoot() && operation != null && bodyEl.getID() == null) {
                    ParameterDesc param = operation.getParameter(bNum);
                    // at least do not step on non-existent parameters!
                    if(param != null) {
                        Object val = bodyEl.getValueAsType(param.getTypeQName());
                        body = new RPCElement("",
                                              operation.getName(),
                                              new Object [] { val });
                    }
                }
            } else {
                body = (RPCElement) bodies.get( bNum );
            }
        }

       // special case code for a document style operation with no
       // arguments (which is a strange thing to have, but whatever)
        if (body == null) {
            // throw an error if this isn't a document style service
            if (!serviceDesc.getStyle().equals(Style.DOCUMENT)) {
                throw new Exception(Messages.getMessage("noBody00"));
            }

            // look for a method in the service that has no arguments,
            // use the first one we find.
            ArrayList ops = serviceDesc.getOperations();
            for (Iterator iterator = ops.iterator(); iterator.hasNext();) {
                OperationDesc desc = (OperationDesc) iterator.next();
                if (desc.getNumInParams() == 0) {
                    // found one with no parameters, use it
                    msgContext.setOperation(desc);
                    // create an empty element
                    body = new RPCElement(desc.getName());
                    // stop looking
                    break;
                }
            }
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

     * removeAllParameters MAY throw JAXRPCException...Axis allows modification to
     * the Call object without throwing an exception.
     */
    public void removeAllParameters() {
        //if (parmAndRetReq) {
        operation = new OperationDesc();
        parmAndRetReq = true;
        //}
        //else {
        //throw new JAXRPCException(Messages.getMessage("noParmAndRetReq"));
        //}
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

            SchemaTypeKey key = (SchemaTypeKey) iter.next();
            qNameToKey.put(key.getqName(), key);
        }

        for (Iterator iter = operations.iterator(); iter.hasNext();) {
            OperationDesc operationDesc = (OperationDesc) iter.next();
            ArrayList parameters = new ArrayList(operationDesc.getParameters());
            ParameterDesc returnParameterDesc = operationDesc.getReturnParamDesc();
            if (null != returnParameterDesc.getTypeQName() &&
                    false == returnParameterDesc.getTypeQName().equals(XMLType.AXIS_VOID)) {
                parameters.add(returnParameterDesc);
            }
            for (Iterator iterator = parameters.iterator(); iterator.hasNext();) {
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

     * removeAllParameters MAY throw JAXRPCException...Axis allows modification to
     * the Call object without throwing an exception.
     */
    public void removeAllParameters() {
        //if (parmAndRetReq) {
        operation = new OperationDesc();
        parmAndRetReq = true;
        //}
        //else {
        //throw new JAXRPCException(JavaUtils.getMessage("noParmAndRetReq"));
        //}
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

       
        // 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).getName();
        secondParamName = oper.getParameter(1).getName();
    }
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

        }

        // 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;
            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;
                                }
                            }
                            if (parmsMatch) {
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.