Jump to content
Xtreme .Net Talk

Application that acts as a "communicator" between database and external application


Recommended Posts

Posted

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..

Posted

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

Posted

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

Posted
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.
Posted
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?

Posted (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 by a1jit
  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...