a1jit Posted February 17, 2006 Posted February 17, 2006 Application that acts as a "communicator" between database and external application Hi Guys, I have a question, i wish to design an application that acts as a "glue" between database and a window based application The main reason why i want to do this is that the database im using is oracle and we cant afford to have oracle client installed on each and every machine to support the window based application. So one possible solution is to have the oracle client installed on a machine that interects between the external application and database This means sending the relevant HTTP requests and and then, we get the response back maybe in some format like XML. So meaning i might just send some address from my external window based application like "http://20.10.20.10/dbnames/names.asp?action=get_name=myname,yourname" Then this middle application will process this http request and send back the results in certain format through webpage (In XML Format maybe) appreciate if someone has some good reference/guidance or any example/tutorial which can help me to understand furhter on this. Thanks.. Quote
Administrators PlausiblyDamp Posted February 17, 2006 Administrators Posted February 17, 2006 Have you looked at using a WebService for this middle tier? What you describe is pretty much a WebService. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
a1jit Posted February 17, 2006 Author Posted February 17, 2006 thanks for the reply, I have no had a look at web service.. So in web service, do i have the possibity to perform the following operation I issue a URL which includes the asp PageName, Columns in database, and data like the following "http://20.10.20.10/dbnames/names.asp?action=get_name=myname,yourname" names.asp = asp page name get_name = parameter (maybe one of the column in database) myname,yourname = 2 data (separated by comma) So is it possible to detect the list of parameter and to retrieve data in XML Format and display it in the asp page? Because in asp i might use Request.form("rule_name"); to retrieve the parameter. Do i have the capability to retrieve this information usng web service asp.net? thanks for the reply Quote
a1jit Posted February 17, 2006 Author Posted February 17, 2006 Hi, i did some reading on web services..it really meets my needs, but im not so sure on this.. Can a .NET Web Service be called from any type of application designed for example a java window application? Or it can only be called from .NET Application?.. Because i need something which is really robust and can actually be called from a number of External Application designed using various programming languages like java and etc Quote
Administrators PlausiblyDamp Posted February 17, 2006 Administrators Posted February 17, 2006 Webservices are an open standard and can be called from any language or toolset that follows the standards. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Mister E Posted February 17, 2006 Posted February 17, 2006 A Web Service would suit you fine (and be easy and cheap) but it really boils down to your specific needs. You must remember that web service calls are extremely verbose and bulky. If you are sending large data sets (and lots of them) back from the middle tier you might run into problems. If this is a risk you should consider developing your own light weight communications protocol. Quote
a1jit Posted February 18, 2006 Author Posted February 18, 2006 Webservices are an open standard and can be called from any language or toolset that follows the standards. Hi Guys, Thanks for the input, since it meets my need, i think i will give a try.. Just a problem. I was doing some tutorials and found something i wish to do .. I followed a tutorial in http://abstractvb.com/code.asp?A=1006 Everything worked fine. Only One problem.. Once i typed in the program in http://abstractvb.com/code.asp?A=1006 , i compiled it, and run it, it brough me to a page where i can select which function i wish to execute. Then i click the link, and now i have been brought to another page where i key in the list of parameters in the text fields.. Can i skip this two process (selecting function and then keying in the parameters) by just keying in a specific URL in the web browser? Meaning i send the function name and parameter list in the URL itself .. Can i do this in the browser? Quote
Mister E Posted February 18, 2006 Posted February 18, 2006 You need to reference the WSDL file (the "Service Description"). Quote
a1jit Posted February 19, 2006 Author Posted February 19, 2006 (edited) You need to reference the WSDL file (the "Service Description"). Hi, You mean something like this for the code below? /Service1/Service1.asmx/SayHello?strMyName=something Found it at http://www.west-wind.com/presentations/dotnetwebservices/DotNetWebServices.asp namespace HelloService { [WebService( Namespace="http://abstractvb.com/", Name="Hello Web Service in C#", Description="My Description")] public class HelloService : System.Web.Services.WebService { public HelloService() { //CODEGEN: This call is required by the ASP.NET Web Services Designer InitializeComponent(); } [WebMethod] public string SayHello(String strMyName) { return "Hello " + strMyName; } [WebMethod] public string SayGoodBye() { return "Goodby!"; } } } Just another small question, i see the results being displayed is in xml format.. Can i control the format? meaning in the return keyword, i define my own xml format.. Because some results which is processed needs a more complex way of representing the output, for an example the xml might have a few levels of data. So if this is the case, would i be able to define the output format that would be displayed? Meaning im retrieving data on books, so i might have a few levels, like book Type-> Authors -> Tiltle -> Date Published and etc So would i be able to construct my own type of XML Format (maybe into a string variable) , then i just put the "string variable name" into the return statement..Is this possible? Edited February 19, 2006 by a1jit Quote
Administrators PlausiblyDamp Posted February 19, 2006 Administrators Posted February 19, 2006 The results will always need to be valid SOAP in terms of the format - however this does give you quite a good amount of customisation. If you are trying to work with a predefined XML structure then I would suggest you have a look at XML Schemas (XSDs) as these will allow you to define your data structures. Also if you are using your own classes etc. then the attributes found under System.XML.Serialization may help. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.