internal URTParam(string name, string typeName, string typeNS, string encodedNS, WsdlParser.URTParamType pType, bool bEmbedded, WsdlParser parser, WsdlParser.URTNamespace urtNamespace)
 {
     this._name = name;
     this._typeName = typeName;
     this._typeNS = typeNS;
     this._encodedNS = encodedNS;
     this._pType = pType;
     this._embeddedParam = bEmbedded;
     this._parser = parser;
     this._urtNamespace = urtNamespace;
 }
Exemplo n.º 2
0
            // Resolves internal references
            internal void ResolveTypes(WsdlParser parser){
                Util.Log("URTNamespace.ResolveTypes "+Name); 

                /*
                // Process nested types 
                Hashtable typeTable = new Hashtable(10);
                for (int i=0;i<_URTComplexTypes.Count;i++)
                {
                    // fill up hashtable with types
                    URTComplexType ctype = (URTComplexType)_URTComplexTypes[i];

                    if (ctype.bNestedType)
                    {
                        Util.Log("URTNamespace.ResolveTypes nested type outer type "+ctype.OuterTypeName+" nested type "+ctype.NestedTypeName+" fullNestedTypeName "+ctype.Name);
                        // type is a nested class 
                        URTComplexType outerType = (URTComplexType)typeTable[ctype.OuterTypeName];
                        if (outerType == null)
                        {
                            // place all the URTComplex types in the table, the nested type appears before the outer type in Wsdl
                            for (int j=0;j<_URTComplexTypes.Count;j++)
                            {
                                URTComplexType ctype2 = (URTComplexType)_URTComplexTypes[j];
                                Util.Log("URTNamespace.ResolveTypes miss find all types "+ctype2.Name);
                                typeTable[ctype2.Name] = ctype2;
                            }
                        }
                        outerType = (URTComplexType)typeTable[ctype.OuterTypeName];
                        if (outerType == null)
                        {
                            throw new SUDSParserException(
                                                 String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveNestedType"),
                                                               ctype.Name, ctype.UrlNS));
                        }
                        outerType._nestedTypes.Add(ctype);

                    }
                    else
                    {

                        Util.Log("URTNamespace.ResolveTypes nested place in table "+ctype.Name);
                        typeTable[ctype.Name] = ctype;
                    }
                }
                */


                for (int i=0;i<_URTComplexTypes.Count;i++)
                {
                    if (_URTComplexTypes[i] != null)
                        ((URTComplexType)_URTComplexTypes[i]).ResolveTypes(parser);
                }

                for (int i=0;i<_URTInterfaces.Count;i++)
                    ((URTInterface)_URTInterfaces[i]).ResolveTypes(parser);
            }
Exemplo n.º 3
0
        // Main parser
        internal SUDSParser(TextReader input, String outputDir, ArrayList outCodeStreamList, String locationURL, bool bWrappedProxy, String proxyNamespace)
        {
			Util.Log("SUDSParser.SUDSParser outputDir "+outputDir+" locationURL "+locationURL+" bWrappedProxy "+bWrappedProxy+" proxyNamespace "+proxyNamespace);
            Util.LogInput(ref input);
            wsdlParser = new WsdlParser(input, outputDir, outCodeStreamList, locationURL, bWrappedProxy, proxyNamespace);
        }
Exemplo n.º 4
0
            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;
            }
Exemplo n.º 5
0
 internal static String EncodeInterop(String name, WsdlParser parser)
 {
     String _encodedNS = name;
     if ((parser.ProxyNamespace != null) && parser.ProxyNamespace.Length > 0)
     {
         String countStr = "";
         if (parser.ProxyNamespaceCount > 0)
             countStr = (parser.ProxyNamespaceCount).ToString(CultureInfo.InvariantCulture);
         parser.ProxyNamespaceCount++;
         _encodedNS = parser.ProxyNamespace+countStr;
     }
     else
     {
         int index = name.IndexOf(":");
         if (index > 0)
             _encodedNS = _encodedNS.Substring(index+1);
         if (_encodedNS.StartsWith("//", StringComparison.Ordinal))
             _encodedNS = _encodedNS.Substring(2);
         _encodedNS = _encodedNS.Replace('/', '_');
     }
     Util.Log("URTNamespace.EncodeInterop  encoded "+_encodedNS);
     return _encodedNS;
 }
Exemplo n.º 6
0
 internal URTSimpleType(String name, String urlNS, String ns, String encodedNS, bool bAnonymous, WsdlParser parser)
 : base(name, urlNS, ns, encodedNS)
 {
     Util.Log("URTSimpleType.URTSimpleType name "+name+" ns "+ns+" encodedNS "+encodedNS+" bAnonymous "+bAnonymous);
     _baseTypeName = null;
     _baseTypeXmlNS = null;
     _baseType = null;
     _fieldString = null;
     _facets = new ArrayList();
     _bEnum = false;
     _bAnonymous = bAnonymous;
     _encoding = null;
     _parser = parser;
 }
Exemplo n.º 7
0
            internal void Implements(String iFaceName, String iFaceNS, WsdlParser parser)
            {
                Util.Log("URTComplexType.Implements IFaceName "+iFaceName+" iFaceNS "+iFaceNS);
                _implIFaceNames.Add(iFaceName);
                _implIFaceNames.Add(iFaceNS);
                // Urt namespace will not have schema, they need to be recorded.
                URTNamespace parsingNamespace = parser.AddNewNamespace(iFaceNS);
                /*
                if (parsingNamespace == null)
                {
                    parsingNamespace = new URTNamespace(iFaceNS, parser);
                }
                */

                URTInterface parsingInterface = parsingNamespace.LookupInterface(iFaceName);            
                if (parsingInterface == null)
                {
                    parsingInterface = new URTInterface(iFaceName, parsingNamespace.Name, parsingNamespace.Namespace, parsingNamespace.EncodedNS, _parser);                    
                    parsingNamespace.AddInterface(parsingInterface);
                }
            }
 internal static WsdlParser.WriterStream GetWriterStream(ref WsdlParser.WriterStream outputStreams, string outputDir, string fileName, ref string completeFileName)
 {
     WsdlParser.WriterStream stream;
     for (stream = outputStreams; stream != null; stream = stream._next)
     {
         if (stream._fileName == fileName)
         {
             return stream;
         }
     }
     string str = fileName;
     if (str.EndsWith(".exe", StringComparison.Ordinal) || str.EndsWith(".dll", StringComparison.Ordinal))
     {
         str = str.Substring(0, str.Length - 4);
     }
     string path = outputDir + str + ".cs";
     completeFileName = path;
     TextWriter writer = new StreamWriter(path, false, new UTF8Encoding(false));
     stream = new WsdlParser.WriterStream(fileName, writer) {
         _next = outputStreams
     };
     outputStreams = stream;
     return stream;
 }
Exemplo n.º 9
0
 // This method is called when the parsing is complete
 // and is useful for derived types
 internal abstract void ResolveTypes(WsdlParser parser);
 internal static void Close(WsdlParser.WriterStream outputStreams)
 {
     for (WsdlParser.WriterStream stream = outputStreams; stream != null; stream = stream._next)
     {
         stream._writer.Close();
     }
 }
 internal static void Flush(WsdlParser.WriterStream writerStream)
 {
     while (writerStream != null)
     {
         writerStream._writer.Flush();
         writerStream = writerStream._next;
     }
 }
 internal override WsdlParser.MethodFlags GetMethodFlags(WsdlParser.URTMethod method)
 {
     return WsdlParser.MethodFlags.None;
 }
 internal void AddFacet(WsdlParser.SchemaFacet facet)
 {
     this._facets.Add(facet);
 }
 internal URTSimpleType(string name, string urlNS, string ns, string encodedNS, bool bAnonymous, WsdlParser parser) : base(name, urlNS, ns, encodedNS)
 {
     this._baseTypeName = null;
     this._baseTypeXmlNS = null;
     this._baseType = null;
     this._fieldString = null;
     this._facets = new ArrayList();
     this._bEnum = false;
     this._bAnonymous = bAnonymous;
     this._encoding = null;
     this._parser = parser;
 }
Exemplo n.º 15
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;
            }
Exemplo n.º 16
0
            // Helper method used by Resolve
            protected void ResolveWsdlParams(WsdlParser parser, String targetNS, String targetName,
                                             bool bRequest, WsdlMethodInfo wsdlMethodInfo)
            {
                Util.Log("URTMethod.ResolveWsdlParams targetName "+targetName+" targetNS "+targetNS+" bRequest "+bRequest+" wsdlMethodInfo "+wsdlMethodInfo);                               
                _wsdlMethodInfo = wsdlMethodInfo;
                _paramNamesOrder = _wsdlMethodInfo.paramNamesOrder;

                int length;
                if (_wsdlMethodInfo.bProperty)
                    length = 1;
                else if (bRequest)
                    length = wsdlMethodInfo.inputNames.Length;
                else
                    length = wsdlMethodInfo.outputNames.Length;

                for (int i=0; i<length; i++)
                {
                    String element = null;
                    String elementNs = null;
                    String name = null;
                    String nameNs = null;
                    String typeName = null;;
                    String typeNameNs = null;;
                    URTParamType pType;
                    if (_wsdlMethodInfo.bProperty)
                    {
                        typeName = wsdlMethodInfo.propertyType;
                        typeNameNs = wsdlMethodInfo.propertyNs;
                        pType = URTParamType.OUT;
                    }
                    else if (bRequest && !_wsdlMethodInfo.bProperty)
                    {
                        element = wsdlMethodInfo.inputElements[i];
                        elementNs = wsdlMethodInfo.inputElementsNs[i];
                        name = wsdlMethodInfo.inputNames[i];
                        nameNs = wsdlMethodInfo.inputNamesNs[i];
                        typeName = wsdlMethodInfo.inputTypes[i];
                        typeNameNs = wsdlMethodInfo.inputTypesNs[i];

                        pType = URTParamType.IN;
                    }
                    else
                    {
                        element = wsdlMethodInfo.outputElements[i];
                        elementNs = wsdlMethodInfo.outputElementsNs[i];
                        name = wsdlMethodInfo.outputNames[i];
                        nameNs = wsdlMethodInfo.outputNamesNs[i];
                        typeName = wsdlMethodInfo.outputTypes[i];
                        typeNameNs = wsdlMethodInfo.outputTypesNs[i];
                        pType = URTParamType.OUT;
                    }

                    String actualType;
                    String actualTypeNs;
                    if ((element == null) || element.Length == 0)
                    {
                        actualType = typeName;
                        actualTypeNs = typeNameNs;
                    }
                    else
                    {
                        actualType = element;
                        actualTypeNs = elementNs;
                    }

                    Util.Log("URTMethod.ResolveWsdlParams actualType "+actualType+" actualTypeNs "+actualTypeNs);
                    URTNamespace ns = parser.LookupNamespace(actualTypeNs);
                    if (ns == null)
                    {
                        throw new SUDSParserException(
                                                     String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_CantResolveSchemaNS"),
                                                                   actualTypeNs, actualType));
                    }

                    URTComplexType ct = ns.LookupComplexType(actualType);

                    if (ct != null && ct.IsArray())
                    {
                        if (ct.GetArray() == null)
                            ct.ResolveArray();
                        String arrayName = ct.GetArray();
                        URTNamespace arrayNS = ct.GetArrayNS();
                        AddParam(new URTParam(name, arrayName, arrayNS.Name, arrayNS.EncodedNS, pType, true, parser, arrayNS));
                    }
                    else
                    {
                        Util.Log("URTMethod.ResolveWsdlParams actualType 2 UrtType "+((Enum)ns.UrtType).ToString());
                        if (ns.UrtType == UrtType.Xsd)
                        {
                            String clrtypeName = parser.MapSchemaTypesToCSharpTypes(actualType);
                            AddParam(new URTParam(name, clrtypeName, ns.Namespace, ns.EncodedNS, pType, true, parser, ns));
                        }
                        else
                        {
                            String foundTypeName = null;
                            if (ct != null)
                            {
                                foundTypeName = ct.Name;
                            }
                            else
                            {
                                URTSimpleType stype = ns.LookupSimpleType(actualType);
                                if (stype != null)
                                {
                                    foundTypeName = stype.Name;
                                }
                                else
                                {
                                    foundTypeName = actualType; 

                                    /*
                                    throw new SUDSParserException(
                                        String.Format(CoreChannel.GetResourceString("Remoting_Suds_CantResolveTypeInNS"),
                                                      actualType, ns.Name));
                                                      */
                                }
                            }
                            //typeNS.RemoveComplexType(type);
                            AddParam(new URTParam(name, foundTypeName, ns.Namespace, ns.EncodedNS, pType, true, parser, ns));
                        }
                    }
                }
            }
Exemplo n.º 17
0
 internal virtual void ResolveTypes(WsdlParser parser)
 {
 }
Exemplo n.º 18
0
            // Resolves the method
            internal override void ResolveTypes(WsdlParser parser)
            {
                Util.Log("OnewayMethod.ResolveTypes name "+ _messageElementName);
                ResolveWsdlParams(parser, _messageElementNS, _messageElementName, true, _wsdlMethodInfo);
                if (_paramNamesOrder != null)
                {
                    // reorder parameters if there is a parameter order
                    Object[] paramsInOrder = new Object[_params.Count];
                    for (int i=0; i<_params.Count; i++)
                    {
                        paramsInOrder[(int)_paramPosition[i]] = _params[i];
                    }
                    _params =  new ArrayList(paramsInOrder);
                }

                ResolveMethodAttributes(); //Needs to be after param order

                return;
            }
Exemplo n.º 19
0
            internal URTComplexType(String name, String urlNS, String ns, String encodedNS,
                                    SchemaBlockType blockDefault, bool bSUDSType, bool bAnonymous, WsdlParser parser, URTNamespace xns)
            : base(name, urlNS, ns, encodedNS)
            {
                Util.Log("URTComplexType.URTComplexType name "+this.GetHashCode()+" "+name+" urlNS "+urlNS+" ns "+ns+" encodedNS "+encodedNS+" bSUDStype "+bSUDSType+" bAnonymous "+bAnonymous);
                _baseTypeName = null;
                _baseTypeXmlNS = null;
                _baseType = null;
                _connectURLs = null;
                _bStruct = !bSUDSType;
                _blockType = blockDefault;
                _bSUDSType = bSUDSType;
                _bAnonymous = bAnonymous;
                Debug.Assert(bAnonymous == false || _bSUDSType == false);
                _fieldString = null;
                _fields = new ArrayList();
                _methods = new ArrayList();
                _implIFaces = new ArrayList();
                _implIFaceNames = new ArrayList();
                _sudsType = SUDSType.None;              
                _parser = parser;

                int index = name.IndexOf('+');
                if (index > 0)
                {
                    // Nested type see if outer type has been added to namespace
                    String outerType = parser.Atomize(name.Substring(0,index));
                    URTComplexType cs = xns.LookupComplexType(outerType);
                    if (cs == null)
                    {
                        URTComplexType newCs = new URTComplexType(outerType, urlNS, ns, encodedNS, blockDefault, bSUDSType, bAnonymous, parser, xns);
                        Util.Log("URTComplexType.URTComplexType add outerType to namespace "+outerType+" nestedname "+name);
                        xns.AddComplexType(newCs);
                    }
                }


                if (xns.UrtType == UrtType.Interop)
                {
                    // Interop class names can have '.', replace these with '_', and set wire name to original type name.
                    index = name.LastIndexOf('.');
                    if (index > -1)
                    {
                        // class names can't have '.' so replace with '$'. Use xmlType attribute to send original name on wire.
                        _wireType = name;
                        Name = name.Replace(".", "_");
                        SearchName = name;
                    }
                }

            }
Exemplo n.º 20
0
 internal BaseInterface(String name, String urlNS, String ns, String encodedNS, WsdlParser parser)
 {
     Util.Log("BaseInterface.BaseInterface");
     _name = name;
     _urlNS = urlNS;
     _namespace = ns;
     _encodedNS = encodedNS;
     _parser = parser;
 }
Exemplo n.º 21
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);
            }
Exemplo n.º 22
0
            internal SystemInterface(String name, String urlNS, String ns, WsdlParser parser, String assemName)
            : base(name, urlNS, ns, ns, parser)
            {
                Util.Log("SystemInterface.SystemInterface");                
                Debug.Assert(ns.StartsWith("System", StringComparison.Ordinal), "Invalid System type");
                String fullName = ns + '.' + name;

                Assembly assem = null;
                if (assemName == null)
                    assem = typeof(string).Assembly;
                else
#pragma warning disable 618
                    assem = Assembly.LoadWithPartialName(assemName, null);
#pragma warning restore 618

                if (assem == null)
                    throw new SUDSParserException(String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Suds_AssemblyNotFound"), assemName));

                _type = assem.GetType(fullName, true);
            }
Exemplo n.º 23
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);
 }
Exemplo n.º 24
0
 internal URTInterface(String name, String urlNS, String ns, String encodedNS, WsdlParser parser)
 : base(name, urlNS, ns, encodedNS, parser)
 {
     Util.Log("URTInterface.URTInterface name "+name+" ns "+ns+" encodedNS "+encodedNS);                                             
     _baseIFaces = new ArrayList();
     _baseIFaceNames = new ArrayList();
     _extendsInterface = new ArrayList();
     _methods = new ArrayList();
     _parser = parser;
 }
Exemplo n.º 25
0
            // Resolve element references
            internal void ResolveElements(WsdlParser parser){
                Util.Log("URTNamespace.ResolveElements "+Name);

                for (int i=0;i<_elmDecls.Count;i++)
                {
                    ((ElementDecl) _elmDecls[i]).Resolve(parser);
                }
            }
Exemplo n.º 26
0
            internal void Extends(String baseName, String baseNS, WsdlParser parser)
            {
                Util.Log("URTInterface.Extends baseName "+baseName+" baseNSf "+baseNS);
                _baseIFaceNames.Add(baseName);
                _baseIFaceNames.Add(baseNS);
                // Urt namespace will not have schema, they need to be recorded.
                URTNamespace parsingNamespace = parser.AddNewNamespace(baseNS);
                /*
                if (parsingNamespace == null)
                {
                    parsingNamespace = new URTNamespace(baseNS, parser);
                }
                */

                URTInterface parsingInterface = parsingNamespace.LookupInterface(baseName);         
                if (parsingInterface == null)
                {
                    parsingInterface = new URTInterface(baseName, parsingNamespace.Name, parsingNamespace.Namespace, parsingNamespace.EncodedNS, parser);                  
                    parsingNamespace.AddInterface(parsingInterface);
                }
                _extendsInterface.Add(parsingInterface);
            }
 internal SUDSParser(TextReader input, string outputDir, ArrayList outCodeStreamList, string locationURL, bool bWrappedProxy, string proxyNamespace)
 {
     this.wsdlParser = new WsdlParser(input, outputDir, outCodeStreamList, locationURL, bWrappedProxy, proxyNamespace);
 }
Exemplo n.º 28
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);
            }
Exemplo n.º 29
0
            internal URTParam(String name, String typeName, String typeNS, String encodedNS,
                              URTParamType pType, bool bEmbedded, WsdlParser parser, URTNamespace urtNamespace)
            {
                Util.Log("URTParam.URTParam name "+name+" typeName "+typeName+" typeNS "+typeNS+" ecodedNS "+encodedNS+" pType "+pType+" bEmbedded "+bEmbedded);
                _name = name;
                _typeName = typeName;
                _typeNS = typeNS;
                _encodedNS = encodedNS;
                _pType = pType;
                _embeddedParam = bEmbedded;
                _parser = parser;
                _urtNamespace = urtNamespace;

            }
 internal void ResolveTypes(WsdlParser parser)
 {
     for (int i = 0; i < this._URTComplexTypes.Count; i++)
     {
         if (this._URTComplexTypes[i] != null)
         {
             ((WsdlParser.URTComplexType) this._URTComplexTypes[i]).ResolveTypes(parser);
         }
     }
     for (int j = 0; j < this._URTInterfaces.Count; j++)
     {
         ((WsdlParser.URTInterface) this._URTInterfaces[j]).ResolveTypes(parser);
     }
 }