示例#1
0
        private void ParseWsdlBindingSuds(WsdlBindingSuds suds)
        {
            Util.Log("WsdlParser.ParseWsdlBindingSuds");            
            int curDepth = _XMLReader.Depth; 
            ReadNextXmlElement();               
            while (_XMLReader.Depth > curDepth)
            {
                String elementName = _XMLReader.LocalName;

                if (MatchingStrings(elementName, s_implementsString) ||
                    MatchingStrings(elementName, s_extendsString))
                {
                    WsdlBindingSudsImplements impl = new WsdlBindingSudsImplements();
                    impl.typeName = LookupAttribute(s_typeString, null, true);
                    impl.ns = ParseQName(ref impl.typeName);
                    suds.implements.Add(impl);
                    ReadNextXmlElement();
                    continue;                   
                }
                else if (MatchingStrings(elementName, s_nestedTypeString))
                {
                    WsdlBindingSudsNestedType nestedType = new WsdlBindingSudsNestedType();
                    nestedType.name = LookupAttribute(s_nameString, null, true);
                    nestedType.typeName = LookupAttribute(s_typeString, null, true);
                    nestedType.ns = ParseQName(ref nestedType.typeName);
                    suds.nestedTypes.Add(nestedType);
                    ReadNextXmlElement();
                    continue;                   
                }


                // Ignore others elements such as annotations
                SkipXmlElement();
            }
        }
 private void ParseWsdlBindingSuds(WsdlBindingSuds suds)
 {
     int depth = this._XMLReader.Depth;
     this.ReadNextXmlElement();
     while (this._XMLReader.Depth > depth)
     {
         string localName = this._XMLReader.LocalName;
         if (MatchingStrings(localName, s_implementsString) || MatchingStrings(localName, s_extendsString))
         {
             WsdlBindingSudsImplements implements;
             implements = new WsdlBindingSudsImplements {
                 typeName = this.LookupAttribute(s_typeString, null, true),
                 ns = this.ParseQName(ref implements.typeName)
             };
             suds.implements.Add(implements);
             this.ReadNextXmlElement();
         }
         else if (MatchingStrings(localName, s_nestedTypeString))
         {
             WsdlBindingSudsNestedType type;
             type = new WsdlBindingSudsNestedType {
                 name = this.LookupAttribute(s_nameString, null, true),
                 typeName = this.LookupAttribute(s_typeString, null, true),
                 ns = this.ParseQName(ref type.typeName)
             };
             suds.nestedTypes.Add(type);
             this.ReadNextXmlElement();
         }
         else
         {
             this.SkipXmlElement();
         }
     }
 }