Examples of TypeEntry


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

        try
        {
            Vector restrictionData = type.getEnumerationdata();
            if (restrictionData == null)
                return;
            TypeEntry baseEType = (TypeEntry) restrictionData.firstElement();
            QName baseType = baseEType.getQName();
            if (!CUtils.isSimpleType(baseType))
                return;
            String langTypeName = CUtils.getclass4qname(baseType);
            writer.write("typedef ");
            if ("string".equals(baseType.getLocalPart()))
View Full Code Here

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

            Vector restrictionData = type.getEnumerationdata();
            if (restrictionData == null)
            {
                return;
            }
            TypeEntry baseEType = (TypeEntry) restrictionData.firstElement();
            QName baseType = baseEType.getQName();
            if (!CUtils.isSimpleType(baseType))
            {
                return;
            }
            String langTypeName = CUtils.getclass4qname(baseType);
View Full Code Here

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

     * This method extract the custom complex type info fom the symbol table
     * @return the type map with type info
     */
    private TypeMap getTypeInfo(String targetLanguage)throws WrapperFault {
        Iterator it = symbolTable.getTypeIndex().values().iterator();
        TypeEntry type;
        Iterator elements;
        Type typedata;

        boolean hasElements;
        while (it.hasNext()) {
            type = (TypeEntry) it.next();
            Node node = type.getNode();
            if (node != null) {
          createTypeInfo(type,targetLanguage);

            }
        } //end of type while
View Full Code Here

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

     }
     throw new WrapperFault("the service does not exists");
    }
   
  public Type createTypeInfo(QName typename,String targetLanguage)throws WrapperFault{
    TypeEntry type = symbolTable.getType(typename)
    if(type == null){
      type = symbolTable.getElement(typename);
      if(type == null){
        throw new WrapperFault("["+typename+"]unexpected condition occured " +
          ".. please inform the axis-dev@apache.org mailing list ASAP");
      }
      type.getRefType();
    }
    return createTypeInfo(type,targetLanguage);
  }
View Full Code Here

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

      //Note in a array the parameter type is stored as under the name item all the time 
      else {
        // get all extended types
        Vector extendList = new Vector();
        extendList.add(type);
        TypeEntry parent = SchemaUtils.getComplexElementExtensionBase(
                            type.getNode(),symbolTable);
        while(parent != null) {
          extendList.add(parent);
          parent = SchemaUtils.getComplexElementExtensionBase(
                        parent.getNode(),symbolTable);
        }
   
        // Now generate a list of names and types starting with
        // the oldest parent.  (Attrs are considered before elements).
        for (int i=extendList.size()-1; i >= 0; i--) {
          TypeEntry te = (TypeEntry) extendList.elementAt(i);
   
         
          //TODO the code require the attributes name at extension base types
          //different, the WSDL2Ws do not support it having same name at up and below.
         
          // The names of the inherited parms are mangled
          // in case they interfere with local parms.
          String mangle = "";
          //if (i > 0) {
          //  mangle = "_" +
          //    Utils.xmlNameToJava(te.getQName().getLocalPart()) +
          //    "_";
          //}
         
          // Process the attributes
          Vector attributes = SchemaUtils.getContainedAttributeTypes(
            te.getNode(), symbolTable);
          if (attributes != null) {
            for (int j=0; j<attributes.size(); j+=2) {
              typedata.setTypeForAttributeName(
                ((QName)attributes.get(j + 1)).getLocalPart(),
              createTypeInfo(((TypeEntry) attributes.get(j)).getQName(),targetLanguage));
            }
          }
          // Process the elements
          Vector elements = SchemaUtils.getContainedElementDeclarations(
                      te.getNode(), symbolTable);
          if (elements != null) {
            for (int j=0; j<elements.size(); j++) {
              ElementInfo eleinfo = null;
              ElementDecl elem = (ElementDecl)elements.get(j);
              if (elem.getAnyElement()){
View Full Code Here

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

    QName qname = part.getTypeName();
    if(qname == null){
      Element element = symbolTable.getElement(part.getElementName());
      qname = element.getRefType().getQName();
    }
    TypeEntry tentry = symbolTable.getType(qname);   
    Type type = this.typeMap.getType(qname);
    if(type == null)
      throw new WrapperFault("unregisterd type "+qname+" refered");
    ParameterInfo parainfo =
      new ParameterInfo(type,part.getName());
View Full Code Here

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

        // Walk the type/element entries in the symbol table and
        // add each one to the list of processed types.  This prevents
        // the types from being duplicated.
        Vector v = symbolTable.getTypes();
        for (int i=0; i < v.size(); i++) {
            TypeEntry te = (TypeEntry) v.elementAt(i);
            if (te instanceof org.apache.axis.wsdl.symbolTable.Element) {
                addToElementsList(te.getQName());
            } else if (te instanceof Type) {
                addToTypesList(te.getQName());
            }
        }
    }
View Full Code Here

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

            // Walk the type/element entries in the symbol table and
            // add each one to the list of processed types.  This prevents
            // the types from being duplicated.
            Vector v = symbolTable.getTypes();
            for (int i=0; i < v.size(); i++) {
                TypeEntry te = (TypeEntry) v.elementAt(i);
                if (te instanceof org.apache.axis.wsdl.symbolTable.Element) {
                    addToElementsList(te.getQName());
                } else if (te instanceof Type) {
                    addToTypesList(te.getQName());
                }
            }
        } else {
            // If not, we'll just bail out... perhaps we should log a warning
            // or throw an exception?
View Full Code Here

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

            boolean wroteFieldType = false;
            pw.println("    static {");

            if (attributes != null) {
                for (int i = 0; i < attributes.size(); i += 2) {
                    TypeEntry te = (TypeEntry) attributes.get(i);
                    QName attrName = (QName) attributes.get(i + 1);
                    String attrLocalName = attrName.getLocalPart();
                    String fieldName = Utils.xmlNameToJava(attrLocalName);
                    fieldName = getAsFieldName(fieldName);
                    QName attrXmlType = te.getQName();
                    pw.print("        ");
                    if (!wroteFieldType) {
                        pw.print("org.apache.axis.description.FieldDesc ");
                        wroteFieldType = true;
                    }
                    pw.println("field = new org.apache.axis.description.AttributeDesc();");
                    pw.println("        field.setFieldName(\"" + fieldName + "\");");
                    pw.println("        field.setXmlName(" + Utils.getNewQName(attrName) + ");");
                    if (attrXmlType != null) {
                        pw.println("        field.setXmlType(" + Utils.getNewQName(attrXmlType) + ");");
                    }
                    pw.println("        typeDesc.addFieldDesc(field);");
                }
            }

            if (elementMetaData != null) {
                for (int i=0; i<elementMetaData.size(); i++) {
                    ElementDecl elem = (ElementDecl) elementMetaData.elementAt(i);

                    if (elem.getAnyElement()) {
                        continue;
                    }

                    String elemLocalName = elem.getName().getLocalPart();
                    String fieldName = Utils.xmlNameToJava(elemLocalName);
                    fieldName = getAsFieldName(fieldName);
                    QName xmlName = elem.getName();
                   
                    // Some special handling for arrays
                    TypeEntry elemType = elem.getType();
                    while (elemType.getRefType() != null) {
                        elemType = elemType.getRefType();
                    }
                    QName xmlType = elemType.getQName();
                    if (xmlType != null && xmlType.getLocalPart().indexOf("[") > 0) {
                        // Skip array types, because they are special
                        xmlType = null;
                    }
                   
View Full Code Here

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

     */
    protected void writeFullConstructor() {
        // The constructor needs to consider all extended types
        Vector extendList = new Vector();
        extendList.add(type);
        TypeEntry parent = extendType;
        while(parent != null) {
            extendList.add(parent);
            parent = SchemaUtils.getComplexElementExtensionBase(
                parent.getNode(),
                emitter.getSymbolTable());
        }

        // Now generate a list of names and types starting with
        // the oldest parent.  (Attrs are considered before elements).
        Vector paramTypes = new Vector();
        Vector paramNames = new Vector();
        for (int i=extendList.size()-1; i >= 0; i--) {
            TypeEntry te = (TypeEntry) extendList.elementAt(i);

            // The names of the inherited parms are mangled
            // in case they interfere with local parms.
            String mangle = "";
            if (i > 0) {
                mangle = "_" +
                    Utils.xmlNameToJava(te.getQName().getLocalPart()) +
                    "_";
            }
            // Process the attributes
            Vector attributes = SchemaUtils.getContainedAttributeTypes(
                te.getNode(), emitter.getSymbolTable());
            if (attributes != null) {
                for (int j=0; j<attributes.size(); j+=2) {
                    paramTypes.add(((TypeEntry) attributes.get(j)).getName());
                    String name = ((QName)attributes.get(j + 1)).getLocalPart();
                    paramNames.add(mangle + Utils.xmlNameToJava(name));
                }
            }
            // Process the elements
            Vector elements = SchemaUtils.getContainedElementDeclarations(
                te.getNode(), emitter.getSymbolTable());
            if (elements != null) {
                for (int j=0; j<elements.size(); j++) {
                    ElementDecl elem = (ElementDecl)elements.get(j);
                    paramTypes.add(elem.getType().getName());
                    paramNames.add(mangle +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.