Package org.apache.axis.wsdl.symbolTable

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


        Vector outNames = new Vector();

        // Input types and names
        Vector inNames = new Vector();
        Vector inTypes = new Vector();
        SymbolTable symbolTable = wsdlParser.getSymbolTable();
        BindingEntry bEntry =
                symbolTable.getBindingEntry(binding.getQName());
        Parameters parameters = null;
        Iterator i = bEntry.getParameters().keySet().iterator();

        while (i.hasNext()) {
            Operation o = (Operation) i.next();
View Full Code Here


                    } else {
                        return JavaUtils.getTextClassName(cls.getName());
                    }
                }
            };
            SymbolTable symbolTable = new SymbolTable(btm, true, false, false);

            symbolTable.populateTypes(new URL(inputSchema), doc);
            processSymTabEntries(symbolTable);
        } else {

            // If not, we'll just bail out... perhaps we should log a warning
            // or throw an exception?
View Full Code Here

                } else {
                    return JavaUtils.getTextClassName(cls.getName());
                }
            }
        };
        SymbolTable symbolTable = new SymbolTable(btm, true, false, false);

        symbolTable.populate(null, doc);
        processSymTabEntries(symbolTable);
    }
View Full Code Here

    public void testCPWebServicesWSDL() throws Exception {
        String url = new test.wsdl.xsd.CPWSImplServiceLocator().getCPWebServicesAddress();
        Parser wsdlParser = new Parser();
        System.out.println("Reading WSDL document from '" + url + "?WSDL'");
        wsdlParser.run(url + "?WSDL");
        SymbolTable symbolTable = wsdlParser.getSymbolTable();
        Vector v = symbolTable.getSymbols(new QName("http://datatypes.cs.amdocs.com", "CSText"));
        DefinedType type = (DefinedType) v.get(0);
        assertNotNull(type);
        Vector v2 = SchemaUtils.getContainedElementDeclarations(
                type.getNode(), symbolTable);
        ElementDecl element = (ElementDecl) v2.get(0);
View Full Code Here

   
    Binding binding = port.getBinding();
       
        Parameters parameters = null;
    Parameter p = null;
    SymbolTable symbolTable = parser.getSymbolTable();
    BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
   
    Iterator itr = bEntry.getParameters().keySet().iterator();
    Operation tmpOp = null;
    Operation operation = null;
    while(itr.hasNext())  {
View Full Code Here

        Binding binding = port.getBinding();
       
    
        //Parameters parameters = null;
        //Parameter p = null;
        SymbolTable symbolTable = parser.getSymbolTable();
        BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
        Iterator itr = bEntry.getParameters().keySet().iterator();
        Operation tmpOp = null;
        //Operation operation = null;
        while(itr.hasNext())  {
            tmpOp = (Operation)itr.next();
View Full Code Here

        return new KeyIterator(new Collection.Key[0]);
      }
     
        Binding binding = port.getBinding();
       
        SymbolTable symbolTable = parser.getSymbolTable();
        BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
        Iterator itr = bEntry.getParameters().keySet().iterator();
        Operation tmpOp = null;
        //Operation operation = null;
        while(itr.hasNext())  {
            tmpOp = (Operation)itr.next();
View Full Code Here

                }
            }
        }

        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
            QName paramType = Utils.getXSIType(p);
            this.addParameter( p.getQName(), paramType, modes[p.getMode()]);
        }

        Map faultMap = bEntry.getFaults();
        // Get the list of faults for this operation
        ArrayList faults = (ArrayList) faultMap.get(bop);

        // check for no faults
        if (faults == null) {
            return;
        }
        // For each fault, register its information
        for (Iterator faultIt = faults.iterator(); faultIt.hasNext();) {
            FaultInfo info = (FaultInfo) faultIt.next();
            QName qname = info.getQName();
            info.getMessage();

            // if no parts in fault, skip it!
            if (qname == null) {
                continue;
            }

            QName xmlType = info.getXMLType();
            Class clazz = getTypeMapping().getClassForQName(xmlType);
            if (clazz != null) {
                addFault(qname, clazz, xmlType, true);
            } else {
                //we cannot map from the info to a java class
                //In Axis1.1 and before this was silently swallowed. Now we log it

                log.debug(Messages.getMessage("clientNoTypemapping", xmlType.toString()));
            }
        }

        // set output type
        if (parameters.returnParam != null) {
            // Get the QName for the return Type
            QName returnType = Utils.getXSIType(parameters.returnParam);
            QName returnQName = parameters.returnParam.getQName();

            // Get the javaType
            String javaType = null;
            if (parameters.returnParam.getMIMEInfo() != null) {
                javaType = "javax.activation.DataHandler";
            }
            else {
                javaType = parameters.returnParam.getType().getName();
            }
            if (javaType == null) {
                javaType = "";
            }
            else {
                javaType = javaType + ".class";
            }
            this.setReturnType(returnType);
            try {
                Class clazz = ClassUtils.forName(javaType);
                this.setReturnClass(clazz);
            } catch (ClassNotFoundException swallowedException) {
                //log that this lookup failed,
                log.debug(Messages.getMessage("clientNoReturnClass",
                        javaType));
            }
            this.setReturnQName(returnQName);
        }
        else {
            this.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
        }

        boolean hasMIME = Utils.hasMIME(bEntry, bop);
        Use use = bEntry.getInputBodyType(bop.getOperation());
        setOperationUse(use);
        if (use == Use.LITERAL) {
            // Turn off encoding
            setEncodingStyle(null);
            // turn off XSI types
            setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
        }
        if (hasMIME || use == Use.LITERAL) {
            // If it is literal, turn off multirefs.
            //
            // If there are any MIME types, turn off multirefs.
            // I don't know enough about the guts to know why
            // attachments don't work with multirefs, but they don't.
            setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
        }

        Style style = Style.getStyle(opStyle, bEntry.getBindingStyle());
        if (style == Style.DOCUMENT && symbolTable.isWrapped()) {
            style = Style.WRAPPED;
        }
        setOperationStyle(style);

        // Operation name
View Full Code Here

        if (getFactory() == null) {
            setFactory(new NoopFactory());
        }

        symbolTable = new SymbolTable(genFactory.getBaseTypeMapping(), imports,
                verbose, nowrap);
        symbolTable.setQuiet(quiet);
        symbolTable.setWrapArrays(wrapArrays);

        // We run the actual Emitter in a thread that we can kill
View Full Code Here

        if (getFactory() == null) {
            setFactory(new NoopFactory());
        }

        symbolTable = new SymbolTable(genFactory.getBaseTypeMapping(), imports,
                verbose, nowrap);

        symbolTable.populate(context, doc);
        generate(symbolTable);
    }    // run
View Full Code Here

TOP

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

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.