IsURTExportedType() приватный Метод

private IsURTExportedType ( String name, String &ns, String &assemName ) : UrtType
name String
ns String
assemName String
Результат UrtType
Пример #1
0
 // Constructor
 internal URTNamespace(String name, WsdlParser parser)
 {
     Util.Log("URTNamespace.URTNamespace Enter name "+name);
     _name = name;
     _parser = parser;
     _nsType = parser.IsURTExportedType(name, out _namespace, out _assemName);
     if (_nsType == UrtType.Interop)
     {
         _encodedNS = EncodeInterop(_namespace, parser);
     }
     else
         _encodedNS = _namespace;
     _elmDecls = new ArrayList();
     _URTComplexTypes = new ArrayList();
     _numURTComplexTypes = 0;
     _URTSimpleTypes = new ArrayList();
     _numURTSimpleTypes = 0;
     _URTInterfaces = new ArrayList();
     _anonymousSeqNum = 0;
     parser.AddNamespace(this);
     Util.Log("URTNamespace.URTNamespace Exit name "+this.GetHashCode()+" "+name+" _namespace "+_namespace+" _assemName "+_assemName+" _encodedNS "+_encodedNS);
 }
Пример #2
0
            internal URTField(String name, String typeName, String xmlNS, WsdlParser parser,
                              bool bPrimitive, bool bEmbedded, bool bAttribute, bool bOptional,
                              bool bArray, String arraySize, URTNamespace urtNamespace)
            {
                Util.Log("URTField.URTField "+name+" typeName "+typeName+" xmlNS "+xmlNS+" bPrimitive "+bPrimitive+" bEmbedded "+bEmbedded+" bAttribute "+bAttribute);
                _name = name;
                _typeName = typeName;
                _parser = parser;
                String typeAssemName;

                UrtType urtType = parser.IsURTExportedType(xmlNS, out _typeNS, out typeAssemName);
                if (urtType == UrtType.Interop)
                    _encodedNS = urtNamespace.EncodedNS;
                else
                    _encodedNS = _typeNS;
                _primitiveField = bPrimitive;
                _embeddedField = bEmbedded;
                _attributeField = bAttribute;
                _optionalField = bOptional;
                _arrayField = bArray;
                _arraySize = arraySize;
                _urtNamespace = urtNamespace;
            }
Пример #3
0
            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";
                            _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";
                        _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);
            }
Пример #4
0
            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);
            }
 internal URTNamespace(string name, WsdlParser parser)
 {
     this._name = name;
     this._parser = parser;
     this._nsType = parser.IsURTExportedType(name, out this._namespace, out this._assemName);
     if (this._nsType == System.Runtime.Remoting.MetadataServices.UrtType.Interop)
     {
         this._encodedNS = EncodeInterop(this._namespace, parser);
     }
     else
     {
         this._encodedNS = this._namespace;
     }
     this._elmDecls = new ArrayList();
     this._URTComplexTypes = new ArrayList();
     this._numURTComplexTypes = 0;
     this._URTSimpleTypes = new ArrayList();
     this._numURTSimpleTypes = 0;
     this._URTInterfaces = new ArrayList();
     this._anonymousSeqNum = 0;
     parser.AddNamespace(this);
 }
 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 URTField(string name, string typeName, string xmlNS, WsdlParser parser, bool bPrimitive, bool bEmbedded, bool bAttribute, bool bOptional, bool bArray, string arraySize, WsdlParser.URTNamespace urtNamespace)
 {
     string str;
     this._name = name;
     this._typeName = typeName;
     this._parser = parser;
     if (parser.IsURTExportedType(xmlNS, out this._typeNS, out str) == UrtType.Interop)
     {
         this._encodedNS = urtNamespace.EncodedNS;
     }
     else
     {
         this._encodedNS = this._typeNS;
     }
     this._primitiveField = bPrimitive;
     this._embeddedField = bEmbedded;
     this._attributeField = bAttribute;
     this._optionalField = bOptional;
     this._arrayField = bArray;
     this._arraySize = arraySize;
     this._urtNamespace = urtNamespace;
 }
 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);
         }
     }
 }