473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

web services and ajax

I have created a web service on my local machine and left if alone
(HelloWorld) (vb.net)
Below is the code for the declarative portion:

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="WebService.asmx"
/>
</Services>
</asp:ScriptManager>
<div>
<input id="Button1" onclick="GetMe()" type="button"
value="button" />
</div>
</form>

Following is the code for the javascript and the onclick

<script type="text/javascript">
function GetMe()
{
alert(WebService.HelloWorld());
}
</script>

When I run this program it aborts with the message WebService is undefined.
Would like some advice as to what is missing.

thanks
Feb 13 '07 #1
1 1041
Have found the answer you must have the following to describe your web service

<WebService(Namespace:="http://tempuri.org/")_
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicPr ofile1_1)_
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
<Script.Services.ScriptService()_

"barry" wrote:
I have created a web service on my local machine and left if alone
(HelloWorld) (vb.net)
Below is the code for the declarative portion:

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="WebService.asmx"
/>
</Services>
</asp:ScriptManager>
<div>
<input id="Button1" onclick="GetMe()" type="button"
value="button" />
</div>
</form>

Following is the code for the javascript and the onclick

<script type="text/javascript">
function GetMe()
{
alert(WebService.HelloWorld());
}
</script>

When I run this program it aborts with the message WebService is undefined.
Would like some advice as to what is missing.

thanks
Feb 13 '07 #2

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

Similar topics

2
by: Brendan Reynolds | last post by:
When I run FxCop on an ASP.NET app that has a reference to the reporting services web reference, I get a very long list of 'errors' that are not in my code, but in the web service. As there isn't...
1
by: Kirk Allen Evans | last post by:
I wanted to let you know about a fantastic webcast series focusing on web services technologies. From ASMX 2.0 to WSE 3.0 to WCF, there are some great sessions that you will want to check out. ...
1
by: Nate | last post by:
Is it possible to run WSE enabled web services and unsecured web services side-by-side? The issue is that my web server contains various WSE enabled web services subscribed to by smart client...
3
by: hufaunder | last post by:
I am going to write a smart client application. This application will be used both on an intranet as well as over the internet. Among other things, the application needs to be able to tell the...
6
by: Simon Harvey | last post by:
Hi everyone, We have a need to make a Windows Forms (2.0) client application that will be installed on our clients site. The data that the application uses needs to be centrally available to a...
0
by: tg | last post by:
Hello, This is more of a design question. I am trying to understand how to use async web service invocation for asp.net 2.0 web parts with an Ajax style update / data rendering. I have a web...
3
by: Blasting Cap | last post by:
I'm using VS 2005, SQL 2005 reporting services. SQL reporting services is working, and I have it both on my local computer, as well as on a server. I've created a report in the SQL Business...
1
balabaster
by: balabaster | last post by:
Does anyone have experience integrating LINQ into SOA architecture. I've spent all night trawling through documents and books regarding this and I've come to the conclusion that I'm going about...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.