Package org.apache.axis.wsdl.symbolTable

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


    protected void setAllReferencesToTrue() {
        Iterator it = symbolTable.getHashMap().values().iterator();
        while (it.hasNext()) {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
                if (entry instanceof BindingEntry &&
                        ((BindingEntry) entry).getBindingType() !=
                        BindingEntry.TYPE_SOAP) {
                    entry.setIsReferenced(false);
                }
                else {
                    entry.setIsReferenced(true);
                }
            }
        }
    } // setAllReferencesToTrue
View Full Code Here


        Iterator it = symbolTable.getHashMap().values().iterator();
        while (it.hasNext()) {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
                if (entry instanceof BindingEntry) {
                    BindingEntry bEntry = (BindingEntry) entry;
                    Binding binding = bEntry.getBinding();
                    PortType portType = binding.getPortType();
                    PortTypeEntry ptEntry =
View Full Code Here

    protected void constructSignatures(SymbolTable symbolTable) {
        Iterator it = symbolTable.getHashMap().values().iterator();
        while (it.hasNext()) {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
                if (entry instanceof BindingEntry) {
                    BindingEntry bEntry = (BindingEntry) entry;
                    Binding binding = bEntry.getBinding();
                    PortTypeEntry ptEntry =
                            symbolTable.getPortTypeEntry(binding.getPortType().getQName());
View Full Code Here

        while (it.hasNext())
        {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i)
            {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);

                if (entry instanceof ServiceEntry)
                {
                    return (ServiceEntry) entry;
                }
View Full Code Here

        {
            Map.Entry<?, ?> entry = (Map.Entry<?, ?>)it.next();
            Vector<?> v = (Vector<?>)entry.getValue();
            for (Iterator<?> it2 = v.iterator(); it2.hasNext();)
            {
                SymTabEntry e = (SymTabEntry)it2.next();
                if (ServiceEntry.class.isInstance(e))
                {
                    entries.add(entry.getKey());
                }
            }
View Full Code Here

        while (it.hasNext())
        {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i)
            {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);

                if (entry instanceof ServiceEntry)
                {
                    return (ServiceEntry) entry;
                }
View Full Code Here

        Iterator it = symbolTable.getHashMap().values().iterator();
        while (it.hasNext()) {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
                Generator gen = null;
                if (entry instanceof MessageEntry) {
                    gen = genFactory.getGenerator(
                            ((MessageEntry) entry).getMessage(), symbolTable);
                }
View Full Code Here

    protected void sanityCheck(SymbolTable symbolTable) {
        Iterator it = symbolTable.getHashMap().values().iterator();
        while (it.hasNext()) {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
                String namespace = entry.getQName().getNamespaceURI();
                String packageName =
                        org.apache.axis.wsdl.toJava.Utils.makePackageName(namespace);
                String localName = entry.getQName().getLocalPart();
                if (localName.equals(packageName) &&
                        packageName.equals(namespaces.getCreate(namespace))) {
                    packageName += "_pkg";
                    namespaces.put(namespace, packageName);
                }
View Full Code Here

        HashMap anonQNames = new HashMap();
        Iterator it = symbolTable.getHashMap().values().iterator();
        while (it.hasNext()) {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
                 if(entry.getName() != null)
                    continue;

                // Use the type or the referenced type's QName to generate the java name.
                if (entry instanceof TypeEntry) {
                    TypeEntry tEntry = (TypeEntry) entry;
                    String dims = tEntry.getDimensions();
                    TypeEntry refType = tEntry.getRefType();
                    while (refType != null) {
                        tEntry = refType;
                        dims += tEntry.getDimensions();
                        refType = tEntry.getRefType();
                    }


                    // Need to javify the ref'd TypeEntry if it was not
                    // already processed
                    if (tEntry.getName() == null) {
                        // Get the QName of the ref'd TypeEntry, which
                        // is will be used to javify the name
                        QName typeQName = tEntry.getQName();
                        if ((typeQName.getLocalPart().
                             indexOf(SymbolTable.ANON_TOKEN) < 0)) {
                            // Normal Case: The ref'd type is not anonymous
                            // Simply construct the java name from
                            // the qName
                            tEntry.setName(emitter.getJavaName(typeQName));
                        } else {
                            // This is an anonymous type name.
                            // Axis uses '>' as a nesting token to generate
                            // unique qnames for anonymous types.
                            // Only consider the localName after the last '>'
                            // when generating the java name
                           
                           
//                            String localName = typeQName.getLocalPart();
//                            localName =
//                                localName.substring(
//                                    localName.lastIndexOf(
//                                        SymbolTable.ANON_TOKEN)+1);
//                            typeQName = new QName(typeQName.getNamespaceURI(),
//                                                  localName);
                                                 
                           String localName = typeQName.getLocalPart();

                           // Check to see if this is an anonymous type,
                           // if it is, replace Axis' ANON_TOKEN with
                           // an underscore to make sure we don't run
                           // into name collisions with similarly named
                           // non-anonymous types
                           StringBuffer sb = new StringBuffer(localName);
                           int aidx = -1;
                           while (
                             (aidx = sb.toString().indexOf(
                               SymbolTable.ANON_TOKEN)) > -1) {
                                 sb.replace(aidx, aidx+SymbolTable.ANON_TOKEN.length(), "_");
                           }
                           localName = sb.toString();

                           typeQName = new QName(typeQName.getNamespaceURI(),
                                                 localName);

                            // If there is already an existing type,
                            // there will be a collision. 
                            // If there is an existing anon type,
                            // there will be a  collision. 
                            // In both cases, mangle the name.
                            symbolTable.getType(typeQName);
                            if (anonQNames.get(typeQName) != null) {
                                localName += "Type" + uniqueNum++;
                                typeQName =
                                    new QName(typeQName.getNamespaceURI(),
                                              localName);
                            }
                            anonQNames.put(typeQName, typeQName);

                            // Now set the name with the constructed qname
                            tEntry.setName(emitter.getJavaName(typeQName));
                        }
                    }
                    // Set the entry with the same name as the ref'd entry
                    // but add the appropriate amount of dimensions
                    entry.setName(tEntry.getName() + dims);
                }

                // If it is not a type, then use this entry's QName to
                // generate its name.
                else {
                    entry.setName(emitter.getJavaName(entry.getQName()));  
                }
            }
        }
    } // javifyNames
View Full Code Here

    private void setFaultContext(SymbolTable symbolTable) {
        Iterator it = symbolTable.getHashMap().values().iterator();
        while (it.hasNext()) {
            Vector v = (Vector) it.next();
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
                // Inspect each BindingEntry in the Symbol Table
                if (entry instanceof BindingEntry) {
                    BindingEntry bEntry = (BindingEntry) entry;
                    HashMap allOpFaults = bEntry.getFaults();
                    Iterator ops = allOpFaults.values().iterator();
View Full Code Here

TOP

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

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.