internal void ResolveTypes(WsdlParser parser) { Util.Log("URTComplexType.ResolveTypes "+Name+" _baseTypeName "+_baseTypeName+" IsSUDSType "+IsSUDSType); String baseTypeNS = null; String baseTypeAssemName = null; if (IsArray()) { ResolveArray(); return; } if (IsSUDSType) { // BaseType == null; if (_sudsType == SUDSType.None) { if (_parser._bWrappedProxy) _sudsType = SUDSType.ClientProxy; else _sudsType = SUDSType.MarshalByRef; } } if (_baseTypeName != null) { Util.Log("URTComplexType.ResolveTypes 1 "); UrtType urtType = parser.IsURTExportedType(_baseTypeXmlNS, out baseTypeNS, out baseTypeAssemName); if (urtType == UrtType.UrtSystem || baseTypeNS.StartsWith("System", StringComparison.Ordinal)) { _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName); } else { URTNamespace ns = parser.LookupNamespace(_baseTypeXmlNS); if (ns == null) { throw new SUDSParserException( String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"), _baseTypeXmlNS, _baseTypeName)); } _baseType = ns.LookupComplexType(_baseTypeName); if (_baseType == null) { _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName); /* throw new SUDSParserException( String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"), _baseTypeName, _baseTypeXmlNS)); */ } } } // Top of inheritance hiearchy for a Wrapped proxy is RemotingClientProxy if (IsSUDSType) { if (_parser._bWrappedProxy) { if (_baseTypeName == null || _baseType is SystemType) { _baseTypeName = "RemotingClientProxy"; //<STRIP>_baseTypeXmlNS = "http://schemas.microsoft.com/urt/NSAssem/System.Runtime.Remoting/System.Runtime.Remoting";</STRIP> _baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System.Runtime.Remoting","System.Runtime.Remoting"); baseTypeNS = "System.Runtime.Remoting.Services"; baseTypeAssemName = "System.Runtime.Remoting"; _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName); } } else if (_baseTypeName == null) { _baseTypeName = "MarshalByRefObject"; //<STRIP>_baseTypeXmlNS = "http://schemas.microsoft.com/urt/NS/System";</STRIP> _baseTypeXmlNS = SoapServices.CodeXmlNamespaceForClrTypeNamespace("System", null); baseTypeNS = "System"; baseTypeAssemName = null; _baseType = new SystemType(_baseTypeName, _baseTypeXmlNS, baseTypeNS, baseTypeAssemName); } } else if (_baseType == null) { Util.Log("URTComplexType.ResolveTypes 5 "); _baseType = new SystemType("Object", SoapServices.CodeXmlNamespaceForClrTypeNamespace("System", null), "System", null); } for (int i=0;i<_implIFaceNames.Count;i=i+2) { String implIFaceName = (String) _implIFaceNames[i]; String implIFaceXmlNS = (String) _implIFaceNames[i+1]; String implIFaceNS, implIFaceAssemName; BaseInterface iFace; UrtType iType = parser.IsURTExportedType(implIFaceXmlNS, out implIFaceNS, out implIFaceAssemName); if (iType == UrtType.UrtSystem)// && implIFaceNS.StartsWith("System", StringComparison.Ordinal)) { iFace = new SystemInterface(implIFaceName, implIFaceXmlNS, implIFaceNS, parser, implIFaceAssemName); } else { URTNamespace ns = parser.LookupNamespace(implIFaceXmlNS); if (ns == null) { throw new SUDSParserException( String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"), implIFaceXmlNS, implIFaceName)); } iFace = ns.LookupInterface(implIFaceName); if (iFace == null) { throw new SUDSParserException( String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"), implIFaceName, implIFaceXmlNS)); } } _implIFaces.Add(iFace); } for (int i=0;i<_methods.Count;i++) ((URTMethod) _methods[i]).ResolveTypes(parser); }
internal bool Resolve(WsdlParser parser){ Util.Log("ElementDecl.Resolve "+TypeName+" "+TypeNS); // Return immediately for element declaration of primitive types if (_bPrimitive) return true; // Lookup the type from the element declaration URTNamespace typeNS = parser.LookupNamespace(TypeNS); if (typeNS == null) { throw new SUDSParserException( String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"), TypeNS, TypeName)); } BaseType type = typeNS.LookupType(TypeName); if (type == null) { // Because there might be multiple bindings and some not soap, there can be failures in the non soap bindings. return false; /* throw new SUDSParserException( String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"), TypeName, TypeNS)); */ } type.ElementName = Name; type.ElementNS = Namespace; return true; }
internal void ResolveTypes(WsdlParser parser) { Util.Log("URTInterface.ResolveTypes "+Name); for (int i=0;i<_baseIFaceNames.Count;i=i+2) { String baseIFaceName = (String) _baseIFaceNames[i]; String baseIFaceXmlNS = (String) _baseIFaceNames[i+1]; String baseIFaceNS, baseIFaceAssemName; BaseInterface iFace; UrtType iType = parser.IsURTExportedType(baseIFaceXmlNS, out baseIFaceNS, out baseIFaceAssemName); Util.Log("URTInterface.ResolveTypes Is System "+Name+" iType "+((Enum)iType).ToString()+" baseIFaceNS "+baseIFaceNS); if ((iType != UrtType.Interop) && baseIFaceNS.StartsWith("System", StringComparison.Ordinal)) { iFace = new SystemInterface(baseIFaceName, baseIFaceXmlNS, baseIFaceNS, _parser, baseIFaceAssemName); } else { URTNamespace ns = parser.LookupNamespace(baseIFaceXmlNS); if (ns == null) { throw new SUDSParserException( String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"), baseIFaceXmlNS, baseIFaceName)); } iFace = ns.LookupInterface(baseIFaceName); if (iFace == null) { throw new SUDSParserException( String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"), baseIFaceName, baseIFaceXmlNS)); } } _baseIFaces.Add(iFace); } for (int i=0;i<_methods.Count;i++) ((URTMethod) _methods[i]).ResolveTypes(parser); }