/** * Get the type entry for the given qname. * * @param qname * @param wantElementType boolean that indicates type or element (for type= or ref=) * @return */ public TypeEntry getTypeEntry(QName qname, boolean wantElementType) { if (wantElementType) { return getElement(qname); } else { return getType(qname); } } // getTypeEntry
SymbolTable symbolTable = new SymbolTable(btm, true, false, false); symbolTable.populate(null, doc); processSymTabEntries(symbolTable);
/** * Return the current definition. The current definition is * null until run is called. * * @return */ public Definition getCurrentDefinition() { return (symbolTable == null) ? null : symbolTable.getDefinition(); } // getCurrentDefinition
/** * Add the given Definition and Document information to the symbol table (including imported * symbols), populating it with SymTabEntries for each of the top-level symbols. When the * symbol table has been populated, iterate through it, setting the isReferenced flag * appropriately for each entry. * * @param context * @param def * @param doc * @throws IOException * @throws SAXException * @throws WSDLException * @throws ParserConfigurationException */ protected void add(String context, Definition def, Document doc) throws IOException, SAXException, WSDLException, ParserConfigurationException { URL contextURL = (context == null) ? null : getURL(null, context); populate(contextURL, def, doc, null); processTypes(); checkForUndefined(); populateParameters(); setReferences(def, doc); // uses wrapped flag set in populateParameters } // add
/** * Method getDerivedTypes * * @param type * @param types * @param symbolTable */ private static void getDerivedTypes(TypeEntry type, HashSet types, SymbolTable symbolTable) { // If all types are in the set, return if (types.size() == symbolTable.getTypeEntryCount()) { return; } // Search the dictionary for derived types of type for (Iterator it = symbolTable.getTypeIndex().values().iterator(); it.hasNext();) { Type t = (Type) it.next(); if ((t instanceof DefinedType) && (t.getNode() != null) && !types.contains(t) && (((DefinedType) t).getComplexTypeExtensionBase(symbolTable) == type)) { types.add(t); getDerivedTypes(t, types, symbolTable); } } } // getDerivedTypes
symbolTable = new SymbolTable(genFactory.getBaseTypeMapping(), imports, verbose, nowrap); symbolTable.setQuiet(quiet); symbolTable.setWrapArrays(wrapArrays);
Definition def = symbolTable.getDefinition(); symbolTable.dump(System.out); Iterator it = symbolTable.getHashMap().values().iterator();
/** * Use the JOnASServiceWriter instead of default JavaServiceWriter * @param service wsdl:service * @param symbolTable symbol Table * @return Returns the JOnASServiceWriter */ public Generator getGenerator(Service service, SymbolTable symbolTable) { Generator writer = new JOnASEWSServiceWriter(emitter, service, symbolTable); ServiceEntry sEntry = symbolTable.getServiceEntry(service.getQName()); serviceWriters.addStuff(writer, sEntry, symbolTable); return serviceWriters; }
/** * Use the JOnASServiceWriter instead of default JavaServiceWriter * @param binding wsdl:binding * @param symbolTable symbol Table * @return Returns the JOnASJ2eeBindingWriter */ public Generator getGenerator(Binding binding, SymbolTable symbolTable) { Generator writer = new JOnASEWSBindingWriter(emitter, binding, symbolTable); BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName()); bindingWriters.addStuff(writer, bEntry, symbolTable); return bindingWriters; }
BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName()); symbolTable.getPortTypeEntry(binding.getPortType().getQName());
Parameters parms = getOperationParameters(operation, namespace, bEntry); parameters.put(operation, parms);
/** * Constructor which takes the location of the base wsdl file, and begins to * process it * * @param wsdlLocation * - the location of the wsdl file * @throws ParserConfigurationException * @throws WSDLException * @throws IOException * @throws SAXException */ public WSDLParser(String wsdlLocation) throws ParserConfigurationException, WSDLException, IOException, SAXException { this.wsdlLocation = wsdlLocation; // WSIFPluggableProviders.overrideDefaultProvider( // "http://schemas.xmlsoap.org/wsdl/soap/", // new WSIFDynamicProvider_ApacheAxis()); if (!symbolTableMap.containsKey(wsdlLocation)) { SymbolTable symbolTable = new SymbolTable(new NoopFactory() .getBaseTypeMapping(), true, false, false); // Avoid printouts like // {http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl}GetMultipleResourcePropertiesResponse // already exists symbolTable.setQuiet(true); symbolTable.populate(wsdlLocation); symbolTableMap.put(wsdlLocation, symbolTable); operationMap.put(wsdlLocation, determineOperations()); } checkWSRF(); }
Iterator iterator = symbolTable.getElementIndex().entrySet().iterator(); iterator = symbolTable.getTypeIndex().entrySet().iterator();
Iterator it = symbolTable.getHashMap().values().iterator(); PortTypeEntry ptEntry = symbolTable.getPortTypeEntry( bEntry.getBinding().getPortType().getQName()); symbolTable.getBindingEntry(binding.getQName());
PortTypeEntry ptEntry = getPortTypeEntry(portType.getQName()); setPortTypeReferences(ptEntry, entry, def, doc);
SymbolTable symbolTable = new SymbolTable(btm, true, false, false); symbolTable.populateTypes(new URL(inputSchema), doc); processSymTabEntries(symbolTable); } else {
if (symbolTable.isWrapped()) { styleStr = " style=\"" + Style.WRAPPED + "\""; use = Use.LITERAL; Map elementFormDefaults = symbolTable.getElementFormDefaults(); for(Iterator it = elementFormDefaults.entrySet().iterator();it.hasNext();){ Map.Entry entry = (Map.Entry) it.next();
if (getSymbolTable().isWrapped()) { styleStr = " style=\"" + Style.WRAPPED + "\""; use = Use.LITERAL;
/** * Method run */ public void run() { try { symbolTable.populate(wsdlURI, username, password); generate(symbolTable); } catch (Exception e) { failure = e; } } // run
private ArrayTypeDescriptor constructMapType(TypeEntry type) { ArrayTypeDescriptor result = new ArrayTypeDescriptor(); // Method getItemQName() not supported in axis 1.2 used by globus, so replaced with the line below //TypeEntry mapItem = getSymbolTable().getType(type.getItemQName()); TypeEntry mapItem = getSymbolTable().getType(type.getQName()); if (mapItem == null) { mapItem = getSymbolTable().getType( new QName(type.getQName().getNamespaceURI(), "mapItem")); } result.setElementType(constructType(mapItem)); result.setQname(type.getQName()); result.setType(type.getQName().getLocalPart()); return result; }