473,406 Members | 2,707 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,406 software developers and data experts.

XML Web Services Walkthrough

I am trying to get through the XML Web Services Walkthrough at this location:

http://msdn.microsoft.com/library/de...anagedcode.asp

Everything seems to work fine. Here’s the code from Service1.asmx.cs :

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;

namespace TempConvert1
{
/// <summary>
/// Summary description for Service1.
/// </summary>

[System.Web.Services.WebService(Namespace="http://Walkthrough/XmlWebServices/",
Description="A temperature conversion service.")]

public class Service1 : System.Web.Services.WebService
{
public Service1()
{
//CODEGEN: This call is required by the ASP.NET Web
Services Designer
InitializeComponent();
}

#region Component Designer generated code
//Required by the Web Services Designer

private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>

private void InitializeComponent()
{
}

/// <summary>
/// Clean up any resources being used.
/// </summary>

protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

#endregion

// WEB SERVICE EXAMPLE
// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build
the project
// To test this web service, press F5

[WebMethod(Description="This method converts a temperature in " +
"degrees Fahrenheit to a temperature in degrees Celsius.")]
public double ConvertTemperature(double dFahrenheit)
{
return ((dFahrenheit - 32) * 5) / 9;
}
}
}

It’s a simple application that allows you to enter a value in degrees
Fahrenheit and it converts the value to Celsius.

Well, when I run it, it opens an IE window with the function
“ConvertTemperature” as a link. I click on the link and it goes to another
page where it gives me a box with an “Invoke” button that allows me to enter
a value for the dFahrenheit value. But when I press “Invoke”, another IE
Window pops up and it gives me the HTTP “Page not found” error. The http
address this window uses looks like this:

http://amrit/TempConvert1/Service1.a...ertTemperature

where “amrit” is the server name, TempConvert1 is the name of the solution,
and Service1.asmx is the code file. There is no file “ConvertTemperature”
under Service1.asmx, which is probably why it’s giving me a Page Not Found
error. I assume that it should be calling the ConvertTemperature function
instead of trying to display the page itself, but I could be wrong.

Do you have any idea why this is happening?

Thanks so much if you can help me. I appreciate it.

Amrit

----

Amrit Kohli

am***@wayne.edu

Nov 21 '05 #1
0 2021

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

Similar topics

3
by: Deltones | last post by:
Hi all, I'm just getting into Python/wxPython/Pythoncard and I'm trying the tutorial from this page: http://pythoncard.sourceforge.net/walkthrough1.html Is it me who's totally dense or...
1
by: GaryDotNet | last post by:
Hi, I am trying to go thru the Dist. App. walk through and cannot create the project. Due to company restrictions, I cannot install IIS on my machine. I downloaded and installed Cassini to...
5
by: Dan | last post by:
I'm trying to use the Google Web APIs from a VC++ DLL, I've added a web ref, etc, etc, I just don't know how to reference the class. I have included the appropriate headers and added a "using...
3
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
9
by: dennist685 | last post by:
Walkthrough: Creating a Web Page to Display Access Database Data I've started the above walkthrough. However, near the beginning it gives the following instructions To set permissions in the...
0
by: Peter Ordal | last post by:
I'm trying to follow the walkthrough in the documentation that is bundled with Visual Web Developer 2005 Beta 2 to create a simple temperature conversion web service. Basically all I've done is...
7
by: michael sorens | last post by:
(1) I tried to use what seems like a standard line (from Walkthrough: Creating a Windows Service Application in the Component Designer at http://msdn2.microsoft.com/en-us/library/zt39148a.aspx): ...
7
by: John D'oh | last post by:
Hello, I have been going through the MSDN Walkthrough: Creating a Windows Forms Control That Takes Advantage of Visual Studio Design-Time Features. Everything was going fine and I was able to...
5
by: Sourcerer | last post by:
I've started my first practice windows service project in C#, and I'm already stuck. Let's say I'm trying to make a simple service (and useless, but good for practice). It is supposed to listen...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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 projectplanning, coding, testing,...

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.