Search in sources :

Example 1 with SymTabEntry

use of org.apache.axis.wsdl.symbolTable.SymTabEntry in project tdi-studio-se by Talend.

the class DynamicInvoker method getSymTabEntry.

/**
     * Method getSymTabEntry
     * 
     * @param qname
     * @param cls
     * 
     * @return
     */
public SymTabEntry getSymTabEntry(QName qname, Class cls) {
    HashMap map = wsdlParser.getSymbolTable().getHashMap();
    Iterator iterator = map.entrySet().iterator();
    while (iterator.hasNext()) {
        Map.Entry entry = (Map.Entry) iterator.next();
        QName key = (QName) entry.getKey();
        Vector v = (Vector) entry.getValue();
        if ((qname == null) || qname.equals(qname)) {
            for (int i = 0; i < v.size(); ++i) {
                SymTabEntry symTabEntry = (SymTabEntry) v.elementAt(i);
                if (cls.isInstance(symTabEntry)) {
                    return symTabEntry;
                }
            }
        }
    }
    return null;
}
Also used : BindingEntry(org.apache.axis.wsdl.symbolTable.BindingEntry) SymTabEntry(org.apache.axis.wsdl.symbolTable.SymTabEntry) TypeEntry(org.apache.axis.wsdl.symbolTable.TypeEntry) ServiceEntry(org.apache.axis.wsdl.symbolTable.ServiceEntry) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) Iterator(java.util.Iterator) HashMap(java.util.HashMap) Map(java.util.Map) Vector(java.util.Vector) SymTabEntry(org.apache.axis.wsdl.symbolTable.SymTabEntry)

Example 2 with SymTabEntry

use of org.apache.axis.wsdl.symbolTable.SymTabEntry in project Lucee by lucee.

the class Axis1Client method getWSDLService.

public javax.wsdl.Service getWSDLService() throws PageException {
    if (!wsdlExecuted) {
        try {
            parser.run(wsdlUrl);
            wsdlExecuted = true;
        } catch (Throwable t) {
            ExceptionUtil.rethrowIfNecessary(t);
            throw Caster.toPageException(t);
        }
    }
    SymTabEntry symTabEntry = null;
    Map.Entry entry = null;
    Vector v = null;
    Iterator<Map.Entry> it = parser.getSymbolTable().getHashMap().entrySet().iterator();
    while (it.hasNext()) {
        entry = it.next();
        v = (Vector) entry.getValue();
        for (int i = 0; i < v.size(); i++) {
            if (!(org.apache.axis.wsdl.symbolTable.ServiceEntry.class).isInstance(v.elementAt(i)))
                continue;
            symTabEntry = (SymTabEntry) v.elementAt(i);
        // break;
        }
    }
    if (symTabEntry == null)
        throw new RPCException("Can't locate service entry in WSDL");
    return ((ServiceEntry) symTabEntry).getService();
}
Also used : Entry(java.util.Map.Entry) ServiceEntry(org.apache.axis.wsdl.symbolTable.ServiceEntry) BindingEntry(org.apache.axis.wsdl.symbolTable.BindingEntry) Entry(java.util.Map.Entry) SymTabEntry(org.apache.axis.wsdl.symbolTable.SymTabEntry) TypeEntry(org.apache.axis.wsdl.symbolTable.TypeEntry) ServiceEntry(org.apache.axis.wsdl.symbolTable.ServiceEntry) RPCException(lucee.runtime.net.rpc.RPCException) SymTabEntry(org.apache.axis.wsdl.symbolTable.SymTabEntry) Map(java.util.Map) Vector(java.util.Vector)

Aggregations

Map (java.util.Map)2 Vector (java.util.Vector)2 BindingEntry (org.apache.axis.wsdl.symbolTable.BindingEntry)2 ServiceEntry (org.apache.axis.wsdl.symbolTable.ServiceEntry)2 SymTabEntry (org.apache.axis.wsdl.symbolTable.SymTabEntry)2 TypeEntry (org.apache.axis.wsdl.symbolTable.TypeEntry)2 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Entry (java.util.Map.Entry)1 QName (javax.xml.namespace.QName)1 RPCException (lucee.runtime.net.rpc.RPCException)1