void BuildMetaData(WebServiceWsdl wsw)
        {
            _Names = new ArrayList();
            _Types = new ArrayList();

            MethodInfo mi = wsw.GetMethodInfo(_wscmd.Service, _wscmd.Operation);

            GetProperties(null, mi.ReturnType);
        }
Exemplo n.º 2
0
        Assembly _WsdlAssembly;                         // Assembly ready for invokation

        static internal WebServiceWsdl GetWebServiceWsdl(string url)
        {
            WebServiceWsdl w = _cache[url] as WebServiceWsdl;

            if (w != null)
            {
                return(w);
            }

            return(new WebServiceWsdl(url));
        }
        void BuildData(WebServiceWsdl wsw)
        {
            _RowData = new ArrayList();

            object result = wsw.Invoke(_wscmd.Service, _wscmd.Operation,
                                       _wscmd.Parameters as DataParameterCollection, _wscmd.CommandTimeout);

            if (result == null)
            {
                _ie = null;
                return;
            }

            int ci = 0;

            object[] row = null;
            GetDataProperties(null, result.GetType(), result, ref ci, ref row);
            _ie = _RowData.GetEnumerator();
        }
        ArrayList _Types;                               // types of the columns

        public WebServiceDataReader(System.Data.CommandBehavior behavior, WebServiceConnection conn, WebServiceCommand cmd)
        {
            _wsconn   = conn;
            _wscmd    = cmd;
            _behavior = behavior;

            WebServiceWsdl wsw = WebServiceWsdl.GetWebServiceWsdl(_wscmd.Url);

            // build the structure of the result
            BuildMetaData(wsw);

            if (_behavior == CommandBehavior.SchemaOnly)
            {
                return;
            }

            // build the array that will hold the data
            BuildData(wsw);
            return;
        }
        void BuildMetaData(WebServiceWsdl wsw)
        {
            _Names = new ArrayList();
            _Types = new ArrayList();

            MethodInfo mi = wsw.GetMethodInfo(_wscmd.Service, _wscmd.Operation);

            GetProperties(null, mi.ReturnType);
        }
        void BuildData(WebServiceWsdl wsw)
        {
            _RowData = new ArrayList();

            object result = wsw.Invoke(_wscmd.Service, _wscmd.Operation,
                _wscmd.Parameters as DataParameterCollection, _wscmd.CommandTimeout);

            if (result == null)
            {
                _ie = null;
                return;
            }

            int ci=0;
            object[] row=null;
            GetDataProperties(null, result.GetType(), result, ref ci, ref row);
            _ie = _RowData.GetEnumerator();
        }