I am trying to setup some web services on an existing database which will be consumed by a Flex app. I have created stored procedures in the database which generate the XML I want (via a select ... FOR XML ). I have also setup a web service which is running just fine. I can also consume my webserive fine in Flex. What I don't know how to do is get the data from the stored procedure in my database to my class in my web service. Can anyone post a quick example? I have posted below what I have figured out so far. The stored procedures returns the XML I want perfectly in SQL management studio. I just don't know how to get that out from my webservice and return it.
public string getMainView()
SqlConnection myCon = new SqlConnection(this.conString);
SqlCommand comm = new SqlCommand("EXEC dbo.select_main_search_view_XML",myCon);
SqlDataReader myReader = comm.ExecuteReader();
string result = null;
//??? What here?!