Package org.apache.axis.wsdl.symbolTable

Examples of org.apache.axis.wsdl.symbolTable.Parameters


        }

        Service service = this.getService();
        SymbolTable symbolTable = service.getWSDLParser().getSymbolTable();
        BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
        Parameters parameters = bEntry.getParameters(bop.getOperation());

        // loop over paramters and set up in/out params
        for (int j = 0; j < parameters.list.size(); ++j) {
            Parameter p = (Parameter) parameters.list.get(j);
            // Get the QName representing the parameter type
View Full Code Here


        Iterator ops = portType.getOperations().iterator();

        while (ops.hasNext()) {
            Operation op = (Operation) ops.next();
            OperationType type = op.getStyle();
            Parameters params = bEntry.getParameters(op);

            // did we emit a constructor that throws?
            BooleanHolder bThrow = new BooleanHolder(false);

            // These operation types are not supported.  The signature
View Full Code Here

        for (int i = 0; i < operations.size(); ++i) {
            BindingOperation operation = (BindingOperation) operations.get(i);
            Operation ptOperation = operation.getOperation();
            OperationType type = ptOperation.getStyle();
            Parameters parameters =
                    bEntry.getParameters(operation.getOperation());

            // These operation types are not supported.  The signature
            // will be a string stating that fact.
            if ((type == OperationType.NOTIFICATION)
View Full Code Here

            if ((type == OperationType.NOTIFICATION)
                    || (type == OperationType.SOLICIT_RESPONSE)) {
                continue;
            }

            Parameters parameters =
                    bEntry.getParameters(bindingOper.getOperation());

            if (parameters != null) {

                // The invoked java name of the bindingOper is stored.
                String opName = bindingOper.getOperation().getName();
                String javaOpName = Utils.xmlNameToJava(opName);

                pw.println(
                        "        _params = new org.apache.axis.description.ParameterDesc [] {");

                for (int j = 0; j < parameters.list.size(); j++) {
                    Parameter p = (Parameter) parameters.list.get(j);
                    String modeStr;

                    switch (p.getMode()) {

                        case Parameter.IN:
                            modeStr =
                                    "org.apache.axis.description.ParameterDesc.IN";
                            break;

                        case Parameter.OUT:
                            modeStr =
                                    "org.apache.axis.description.ParameterDesc.OUT";
                            break;

                        case Parameter.INOUT:
                            modeStr =
                                    "org.apache.axis.description.ParameterDesc.INOUT";
                            break;

                        default :
                            throw new IOException(
                                    Messages.getMessage(
                                            "badParmMode00",
                                            (new Byte(p.getMode())).toString()));
                    }

                    // Get the QNames representing the parameter name and type
                    QName paramName = p.getQName();
                    QName paramType = Utils.getXSIType(p);

                    // Is this parameter a header?
                    String inHeader = p.isInHeader()
                            ? "true"
                            : "false";
                    String outHeader = p.isOutHeader()
                            ? "true"
                            : "false";

                    pw.println(
                            "            "
                            + "new org.apache.axis.description.ParameterDesc("
                            + Utils.getNewQName(paramName) + ", " + modeStr + ", "
                            + Utils.getNewQName(paramType) + ", "
                            + Utils.getParameterTypeName(p) + ".class" + ", "
                            + inHeader + ", " + outHeader + "), ");
                }

                pw.println("        };");

                // Get the return name QName and type
                QName retName = null;
                QName retType = null;

                if (parameters.returnParam != null) {
                    retName = parameters.returnParam.getQName();
                    retType = Utils.getXSIType(parameters.returnParam);
                }
               
                String returnStr;

                if (retName != null) {
                    returnStr = Utils.getNewQNameWithLastLocalPart(retName);
                } else {
                    returnStr = "null";
                }

                pw.println(
                        "        _oper = new org.apache.axis.description.OperationDesc(\""
                        + javaOpName + "\", _params, " + returnStr + ");");

                if (retType != null) {
                    pw.println("        _oper.setReturnType("
                            + Utils.getNewQName(retType) + ");");

                    if ((parameters.returnParam != null)
                            && parameters.returnParam.isOutHeader()) {
                        pw.println("        _oper.setReturnHeader(true);");
                    }
                }

                // If we need to know the QName (if we have a namespace or
                // the actual method name doesn't match the XML we expect),
                // record it in the OperationDesc
                QName elementQName = Utils.getOperationQName(bindingOper,
                        bEntry, symbolTable);

                if (elementQName != null) {
                    pw.println("        _oper.setElementQName("
                            + Utils.getNewQName(elementQName) + ");");
                }

                // Find the SOAPAction.
                String action = Utils.getOperationSOAPAction(bindingOper);
                if (action != null) {
                    pw.println("        _oper.setSoapAction(\"" + action + "\");");
                }

                pw.println("        _myOperationsList.add(_oper);");
                pw.println("        if (_myOperations.get(\"" + javaOpName
                        + "\") == null) {");
                pw.println("            _myOperations.put(\"" + javaOpName
                        + "\", new java.util.ArrayList());");
                pw.println("        }");
                pw.println("        ((java.util.List)_myOperations.get(\""
                        + javaOpName + "\")).add(_oper);");
            }

            // Now generate FaultDesc
            if (bEntry.getFaults() != null) {
                ArrayList faults =
                        (ArrayList) bEntry.getFaults().get(bindingOper);

                if (faults != null) {

                    // Operation was not created if there were no parameters
                    if (parameters == null) {
                        String opName =
                                bindingOper.getOperation().getName();
                        String javaOpName = Utils.xmlNameToJava(opName);

                        pw.println(
                                "        _oper = "
                                + "new org.apache.axis.description.OperationDesc();");
                        pw.println("        _oper.setName(\"" + javaOpName
                                + "\");");
                    }

                    // Create FaultDesc items for each fault
                    Iterator it = faults.iterator();

                    while (it.hasNext()) {
                        FaultInfo faultInfo = (FaultInfo) it.next();
                        QName faultQName = faultInfo.getQName();
                        QName faultXMLType = faultInfo.getXMLType();
                        String faultName = faultInfo.getName();
                        String className =
                                Utils.getFullExceptionName(faultInfo.getMessage(),
                                        symbolTable);

                        pw.println(
                                "        _fault = "
                                + "new org.apache.axis.description.FaultDesc();");

                        if (faultName != null) {
                            pw.println("        _fault.setName(\"" + faultName
                                    + "\");");
                        }

                        if (faultQName != null) {
                            pw.println("        _fault.setQName("
                                    + Utils.getNewQName(faultQName) + ");");
                        }

                        if (className != null) {
                            pw.println("        _fault.setClassName(\""
                                    + className + "\");");
                        }

                        if (faultXMLType != null) {
                            pw.println("        _fault.setXmlType("
                                    + Utils.getNewQName(faultXMLType)
                                    + ");");
                        }

                        pw.println("        _oper.addFault(_fault);");
                    }
                }
            }
        }

        pw.println("    }");
        pw.println();

        // Skeleton constructors
        pw.println("    public " + className + "() {");

    // Use custom implementation class if available.
    String implementationClassName = emitter.getImplementationClassName();
    if ( implementationClassName == null)
      implementationClassName = bEntry.getName() + "Impl";
        pw.println("        this.impl = new " + implementationClassName + "();");
        pw.println("    }");
       
        pw.println();
        pw.println("    public " + className + "(" + implType + ") {");
        pw.println("        this.impl = impl;");
        pw.println("    }");

        // Now write each of the operation methods
        for (int i = 0; i < operations.size(); ++i) {
            BindingOperation operation = (BindingOperation) operations.get(i);
            Parameters parameters =
                    bEntry.getParameters(operation.getOperation());

            // Get the soapAction from the <soap:operation>
            String soapAction = "";
            Iterator operationExtensibilityIterator =
View Full Code Here

                allowedMethods.add(javaOperName);

                // We pass "" as the namespace argument because we're just
                // interested in the return type for now.
                Parameters params =
                        symbolTable.getOperationParameters(operation, "", bEntry);

                if (params != null) {
                    // TODO: Should really construct a FaultDesc here and
                    // TODO: pass it to writeOperation, but this will take
View Full Code Here

        List operations = binding.getBindingOperations();

        for (int i = 0; i < operations.size(); ++i) {
            BindingOperation operation = (BindingOperation) operations.get(i);
            Parameters parameters =
                    bEntry.getParameters(operation.getOperation());

            // Get the soapAction from the <soap:operation>
            String soapAction = "";
            String opStyle = null;
View Full Code Here

                pw.println(
                        "        org.apache.axis.description.OperationDesc oper;");
            }

            BindingOperation operation = (BindingOperation) operations.get(i);
            Parameters parameters =
                    bEntry.getParameters(operation.getOperation());

            // Get the soapAction from the <soap:operation>
            String opStyle = null;
            Iterator operationExtensibilityIterator =
View Full Code Here

     */
    private HashSet getTypesInOperation(Operation operation) {

        HashSet types = new HashSet();
        Vector v = new Vector();
        Parameters params = bEntry.getParameters(operation);

        // Loop over parameter types for this operation
        for (int i = 0; i < params.list.size(); i++) {
            Parameter p = (Parameter) params.list.get(i);

View Full Code Here

                        String javaOpName = getOperationJavaNameHook(bEntry, wsdlOpName);      // for derived class
                        if (javaOpName == null) {
                            javaOpName = operation.getName();
                        }

                        Parameters parameters =
                                bEntry.getParameters(operation);

                        if (type == OperationType.SOLICIT_RESPONSE) {
                            parameters.signature =
                                    "    // "
View Full Code Here

                    // symbolTable.getPortTypeEntry(bEntry.getBinding().getPortType().getQName());
                    Iterator operations =
                            bEntry.getParameters().values().iterator();

                    while (operations.hasNext()) {
                        Parameters parms = (Parameters) operations.next();

                        for (int j = 0; j < parms.list.size(); ++j) {
                            Parameter p = (Parameter) parms.list.get(j);

                            // If the given parameter is an inout or out parameter, then
View Full Code Here

TOP

Related Classes of org.apache.axis.wsdl.symbolTable.Parameters

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.