Webservice question
-
For some reason it seems that I've got difficulties to understand the logic of the web service: I need that a webpage or an application on client side will validate user's details (username, password). Validation is through db that seats on a server application. I want that the procedure will be: calling a validation method through web service that will use the server's db. I understand how to connect the client or the website to the web service but don't understand how the web service connects to the server to use his db (or to call a function on the server that will do that). Can someone help please? thanks y
-
For some reason it seems that I've got difficulties to understand the logic of the web service: I need that a webpage or an application on client side will validate user's details (username, password). Validation is through db that seats on a server application. I want that the procedure will be: calling a validation method through web service that will use the server's db. I understand how to connect the client or the website to the web service but don't understand how the web service connects to the server to use his db (or to call a function on the server that will do that). Can someone help please? thanks y
IF it's a webpage, use AJAX, you can't call a webservice from the client. Unless you want to do it from the server, of course. The webservice uses a standard mechanism to make requests via HTTP. It's all hidden from you, that's kind of the point.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
For some reason it seems that I've got difficulties to understand the logic of the web service: I need that a webpage or an application on client side will validate user's details (username, password). Validation is through db that seats on a server application. I want that the procedure will be: calling a validation method through web service that will use the server's db. I understand how to connect the client or the website to the web service but don't understand how the web service connects to the server to use his db (or to call a function on the server that will do that). Can someone help please? thanks y
If you don't like my answer, ask more questions so I understand where the problem is.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
IF it's a webpage, use AJAX, you can't call a webservice from the client. Unless you want to do it from the server, of course. The webservice uses a standard mechanism to make requests via HTTP. It's all hidden from you, that's kind of the point.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
thanks Christian, but to sharpen my misunderstanding : if i want to use a function that on my server with an application that seats in the client computer : 1.i need a webrefference to the webservice in my client's application to create an instance of it right? 2. the webservice shld have a method that invokes method on the server so how do i connect to the method on the server with the webservice (using a dll?) sorry if i'm all upside down ...
-
thanks Christian, but to sharpen my misunderstanding : if i want to use a function that on my server with an application that seats in the client computer : 1.i need a webrefference to the webservice in my client's application to create an instance of it right? 2. the webservice shld have a method that invokes method on the server so how do i connect to the method on the server with the webservice (using a dll?) sorry if i'm all upside down ...
johland wrote:
need a webrefference to the webservice in my client's application to create an instance of it right?
Correct.
johland wrote:
the webservice shld have a method that invokes method on the server
Well, every method that is marked as such in the webservice, invokes a method on the server. Automatically. .NET hides those details from you, so you call the method and create class instances as if they were local, and the framework handles the job of making calls to the webservice and getting the result. The only difference is you need to anticipate exceptions that can occur if the framework cannot find the webservice to call.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
If you don't like my answer, ask more questions so I understand where the problem is.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
i think my first problem is phrasing :) do these steps are right? 1.i want to use a method that seats on my server with another application 2.so i'm creating a webservice that call that method this webservice will be part of the server solution so it will have access to the server db. 3.i want the client app to use this webservice so i add webreference to the client app and create instance of it and use its methods. did i get it? .
-
i think my first problem is phrasing :) do these steps are right? 1.i want to use a method that seats on my server with another application 2.so i'm creating a webservice that call that method this webservice will be part of the server solution so it will have access to the server db. 3.i want the client app to use this webservice so i add webreference to the client app and create instance of it and use its methods. did i get it? .
I was commenting on how my response got a 1/bad answer vote. If it wasn't you, then fair enough, but it seemed likely to me that it was. Yes, you got it right. The framework handles all the messy stuff for you.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
I was commenting on how my response got a 1/bad answer vote. If it wasn't you, then fair enough, but it seemed likely to me that it was. Yes, you got it right. The framework handles all the messy stuff for you.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )