internal void ResolveTypes(WsdlParser parser) { for (int i = 0; i < this._baseIFaceNames.Count; i += 2) { string str3; string str4; WsdlParser.BaseInterface interface2; string name = (string) this._baseIFaceNames[i]; string str2 = (string) this._baseIFaceNames[i + 1]; if ((parser.IsURTExportedType(str2, out str3, out str4) != UrtType.Interop) && str3.StartsWith("System", StringComparison.Ordinal)) { interface2 = new WsdlParser.SystemInterface(name, str2, str3, this._parser, str4); } else { WsdlParser.URTNamespace namespace2 = parser.LookupNamespace(str2); if (namespace2 == null) { throw new SUDSParserException(string.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"), new object[] { str2, name })); } interface2 = namespace2.LookupInterface(name); if (interface2 == null) { throw new SUDSParserException(string.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"), new object[] { name, str2 })); } } this._baseIFaces.Add(interface2); } for (int j = 0; j < this._methods.Count; j++) { ((WsdlParser.URTMethod) this._methods[j]).ResolveTypes(parser); } }
internal void ResolveTypes(WsdlParser parser) { string ns = null; string assemName = null; if (this.IsArray()) { this.ResolveArray(); } else { if (this.IsSUDSType && (this._sudsType == System.Runtime.Remoting.MetadataServices.SUDSType.None)) { if (this._parser._bWrappedProxy) { this._sudsType = System.Runtime.Remoting.MetadataServices.SUDSType.ClientProxy; } else { this._sudsType = System.Runtime.Remoting.MetadataServices.SUDSType.MarshalByRef; } } if (this._baseTypeName != null) { if ((parser.IsURTExportedType(this._baseTypeXmlNS, out ns, out assemName) == UrtType.UrtSystem) || ns.StartsWith("System", StringComparison.Ordinal)) { this._baseType = new WsdlParser.SystemType(this._baseTypeName, this._baseTypeXmlNS, ns, assemName); } else { WsdlParser.URTNamespace namespace2 = parser.LookupNamespace(this._baseTypeXmlNS); if (namespace2 == null) { throw new SUDSParserException(string.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"), new object[] { this._baseTypeXmlNS, this._baseTypeName })); } this._baseType = namespace2.LookupComplexType(this._baseTypeName); if (this._baseType == null) { this._baseType = new WsdlParser.SystemType(this._baseTypeName, this._baseTypeXmlNS, ns, assemName); } } } if (this.IsSUDSType) { if (this._parser._bWrappedProxy) { if ((this._baseTypeName == null) || (this._baseType is WsdlParser.SystemType)) { this._baseTypeName = "RemotingClientProxy"; this._baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System.Runtime.Remoting", "System.Runtime.Remoting"); ns = "System.Runtime.Remoting.Services"; assemName = "System.Runtime.Remoting"; this._baseType = new WsdlParser.SystemType(this._baseTypeName, this._baseTypeXmlNS, ns, assemName); } } else if (this._baseTypeName == null) { this._baseTypeName = "MarshalByRefObject"; this._baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System", null); ns = "System"; assemName = null; this._baseType = new WsdlParser.SystemType(this._baseTypeName, this._baseTypeXmlNS, ns, assemName); } } else if (this._baseType == null) { this._baseType = new WsdlParser.SystemType("Object", SoapServices.CodeXmlNamespaceForClrTypeNamespace("System", null), "System", null); } for (int i = 0; i < this._implIFaceNames.Count; i += 2) { string str5; string str6; WsdlParser.BaseInterface interface2; string name = (string) this._implIFaceNames[i]; string str4 = (string) this._implIFaceNames[i + 1]; if (parser.IsURTExportedType(str4, out str5, out str6) == UrtType.UrtSystem) { interface2 = new WsdlParser.SystemInterface(name, str4, str5, parser, str6); } else { WsdlParser.URTNamespace namespace3 = parser.LookupNamespace(str4); if (namespace3 == null) { throw new SUDSParserException(string.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"), new object[] { str4, name })); } interface2 = namespace3.LookupInterface(name); if (interface2 == null) { throw new SUDSParserException(string.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"), new object[] { name, str4 })); } } this._implIFaces.Add(interface2); } for (int j = 0; j < this._methods.Count; j++) { ((WsdlParser.URTMethod) this._methods[j]).ResolveTypes(parser); } } }