473,659 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling a webservice via ASP.Net

Hi,
I am trying to write my first web service. I have the following code:
Imports System.Web.Serv ices
Public Class Service1
Inherits System.Web.Serv ices.WebService
Private _ErrorText As String
<WebMethod()> Public Function Verify(ByVal UserName As String,
ByVal Password As String) As Boolean
'Do user verification stuff here.
End Function
<WebMethod()> Public Function ErrorMsg() As String
Return _ErrorText
End Function
End Class
This works fine. I am trying to write an ASP.Net application in
notepad. How do I go about calling the webservice? Also, is there a way

to have public readonly properties that are accessable via an ASP.Net
page in the webservice.
Thanks

Nov 23 '05 #1
5 1032
hi,

In order to use your web service within another application without using
VS, you need to generate the corresponding class with WSDL tool or DISCO

"unwantedsp am" wrote:
Hi,
I am trying to write my first web service. I have the following code:
Imports System.Web.Serv ices
Public Class Service1
Inherits System.Web.Serv ices.WebService
Private _ErrorText As String
<WebMethod()> Public Function Verify(ByVal UserName As String,
ByVal Password As String) As Boolean
'Do user verification stuff here.
End Function
<WebMethod()> Public Function ErrorMsg() As String
Return _ErrorText
End Function
End Class
This works fine. I am trying to write an ASP.Net application in
notepad. How do I go about calling the webservice? Also, is there a way

to have public readonly properties that are accessable via an ASP.Net
page in the webservice.
Thanks

Nov 23 '05 #2
You cannot expose properties via webservices in the manner you suggest.

R. Hein

Nov 23 '05 #4
Thank you for the response and link.

Nov 23 '05 #5
OK. I made a .VB file using the wsdl application. So how do I go about
calling the service?

Thanks again for your help.

Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1726
by: Rob Kellow | last post by:
Hello, I'm working on an application for use within my company on our intranet that will be used to gather some information and store some of the info in a SQL Server database and the rest of the information will be used to initiate either a MS Word or MS Excel document. The applications (Word & Excel) reside on the users local system but the database is on the server. Since it is for internal company use I'm not too concerned about...
1
6729
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name this WebService1. (using Apache Axis 1.1) Scenario 1: -----------
3
3556
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it looks like the data is not transferred to the asp page from the web service. just after going to internet option -> security -> Custom level -> Access data sources across domains -> and check the enable radio -> the problem is fixed. I need a...
7
4977
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type Parameter. I can call the first Method without Problems, the Parameter can be deserialized by the WebService. But if I want to call the second Method and give it an Array of Parameters, then the following exception is thrown by the WebService:...
3
12880
by: Henrik | last post by:
Hi all,,, I need to get a refferece to a XML-webservice, and get some data from it.... But I can't add it like an web-refference... What options does I else have?? I've been told that i've to use SOAP, to connect to it, but how?? Are there any good documentation for that?? all the examples that i've found, is using web-refference.. Thanks
3
9077
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. If the web service is taking a long time to complete, the aspx page returns a ‘The operation has timed-out.’ Message to the web browser after 100 seconds. I’ve added: <httpRuntime executionTimeout="300" /> to the web.config files
1
4032
by: jens Jensen | last post by:
Hello , i'm calling a webservice generated with oracle webservice java tools. I'm not able to add a web reference to a .net client the usual way with visual studio 2005. I was therefore provided with a set of Dll that implement the proxy needed to consume this web service. I'm now wrapping these dlls in a .Net webservice that can be consumed with Visual studio the familliar way.
0
1746
by: =?Utf-8?B?QWRhbUM=?= | last post by:
Hi, I'm wondering if you can help. We have a classic asp application that creates and posts some XML using the SOAP format to a .NET WebService. The WebService and the asp are on the same IIS server , which is IIS6.0. On first calling the WebService the asp page either hangs or returns Active Server Pages error 'ASP 0113' Script timed out /adminw/logon/DeleteUser.asp
0
1199
by: cataztrophe | last post by:
I have an ASP.NET/VB.NET program. There is a webservice does processing in a separate project which does not return any values. The webservice is executed upon clicking the run button on a certain page, however I would like the webservice to be executed in the background while the next line of code is processed on the client in concurently. I had seen the solution for a similar post that utilized the: <WebMethod(),...
0
1154
by: vineetbindal | last post by:
Hi, I have a webservice which i am calling on button click event. this webservice is serving twi methods, my problem is that allthough this service will call both the methods but one of them sometimes does not run i cant understant why? void Page_Loaded(object sender, RoutedEventArgs e) { Search.Click += new RoutedEventHandler(Search_Click); }
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8539
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2759
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.