Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 9th, 2007, 04:29 PM
Authorized User
 
Join Date: May 2006
Location: fayetteville, Arkansas, USA.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to notrosh
Default Web Service Newbie

Hi Everyone,

I have a general question. I am trying to incorporate a webservice into a windows application. I would like to display the current weather from www.weather.com. I am not quite sure how to perform this operation. any help would be greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old January 9th, 2007, 08:38 PM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Hi Notrosh,
You need to know the address of the web service.
In your windows project right click web references in your project explorer window and then click 'add web reference'
You will be provided with a dialogue that asks you to enter the address of the web service.
Provide a name for the web service and you are away.

This creates a proxy in your project that hanbdles all the details of SOAP, but you dont need to worry about that.

In your code you create a new instance of your proxy object by usaing the name you gave the web service when adding the reference.
MyWebService myservice = new MyWebService();
Then you can call any method provided by the service from the newly instanciated object myservice.
myservice.getTheWeatherMan();


======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Service Consuming another web service CraigWhitfield EJB 0 January 10th, 2008 08:38 AM
Web Service ankesh13 ADO.NET 1 March 8th, 2007 11:12 AM
Web Service kumanan ASP.NET 1.0 and 1.1 Basics 0 December 7th, 2006 10:26 AM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
Service Oriented Web Service aldwinenriquez .NET Web Services 2 September 15th, 2005 03:25 AM



All times are GMT -4. The time now is 01:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.