473,545 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

USING WEBSERVICE

hello,

i try´d to use an webservice like
Global Weather http://www.webservicex.net/globalweather.asmx?WSDL

i have add a reference to my asp.net-website and write the follwing
code(button1_cl ick)

Dim ProxyWeather As New Weather.GlobalW eather()

Label1.Text = ProxyWeather.Ge tWeather("munic h", "germany")

and i get an error, "connection is refused and closed"

what i am doing wrong??? any suggestions?

best regards

tommy
Nov 18 '05 #1
4 2591
Add a reference to the webservice to your project and rename it
GlobalWeatherSv c

Add a button and a label named lblResult

The following code should do the trick. It produced a weather report for
me.

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim MyWeather As New GlobalWeatherSv c.GlobalWeather
Dim Results As IAsyncResult = MyWeather.Begin GetWeather("Mun ich",
"Germany", Nothing, Nothing)
Dim Result As String
Result = MyWeather.EndGe tWeather(Result s)
Me.lblResult.Te xt = Result
End Sub

"Tommy" <th***********@ hannover-leasing.de> wrote in message
news:u5******** ******@TK2MSFTN GP09.phx.gbl...
hello,

i try´d to use an webservice like
Global Weather http://www.webservicex.net/globalweather.asmx?WSDL

i have add a reference to my asp.net-website and write the follwing
code(button1_cl ick)

Dim ProxyWeather As New Weather.GlobalW eather()

Label1.Text = ProxyWeather.Ge tWeather("munic h", "germany")

and i get an error, "connection is refused and closed"

what i am doing wrong??? any suggestions?

best regards

tommy

Nov 18 '05 #2
hello william,

thanks for reply....

i changed my code like yours... but the failure is the same

The underlying connection was closed: The connection with the remote
server cannot be made.
maybe i have to fix some security-reasons???
any suggestion?

best regards

tommy

----------------------------------------
HangulHanjaFast Conversion-Eigenschaft

True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
----------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
did you check your http proxy setting?
Some companies or organizations require outgoing connections to be made
through a proxy server.

[One indication that this is the case for you is if IE has a proxy server
setting. Within IE:
Tools > Internet Options > Connections > LAN Settings

....check to see if the proxy server is checked.

If so then you probably need to set a proxy server on the webservice client
proxy. ]

Note, here I am using proxy to refer to 2 distinct entities. The
webservice client proxy in your code is called ProxyWeather. The other
proxy is a network proxy server; I am suggesting one may be in use on your
network.

In your app, something like

Dim ProxyWeather As New Weather.GlobalW eather()
ProxyWeather.Pr oxy= New WebProxy("http://MyProxyServer:8 0", true)

....where MyProxyServer is the thing used by IE (above), or otherwise
communicated to you by your network admin.

-D

"RASTA" <th***********@ hannover-NOSPAM-leasing.de> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
hello william,

thanks for reply....

i changed my code like yours... but the failure is the same

The underlying connection was closed: The connection with the remote
server cannot be made.
maybe i have to fix some security-reasons???
any suggestion?

best regards

tommy

----------------------------------------
HangulHanjaFast Conversion-Eigenschaft

True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
----------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4
DINO!!!!!

YOU ARE REALLY GOOD!!

THATS IT!

NOW IT WORKS FINE!!

Thank You Very Much

Best Regard
Tommy

----------------------------------------
HangulHanjaFast Conversion-Eigenschaft

True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
----------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5

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

Similar topics

0
6188
by: Nalla | last post by:
Hi, I have a requirement to call webservices from my old C++ application.So first I tried with Vc++.net as follows.....There are 2 approach Dotnet frame work and soaptoolkit 3.0 I am not able to interact with webservice thru c++.I think ther is a bug in MS implementation for c++ to interact with webservice because I am able to connect to the...
4
11166
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. What I would like to do is make the serial port accessible via a web service. The web service and the legacy application would be running on the...
18
44638
by: A.M | last post by:
Hi, Is there any way to call a WSS web service method by using browser and see the XML result in browser as well? I have been told that there is query string syntax for calling webservices.
5
3783
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains about one of the object wanting to extend MarshalByRefObject object, and I get an error SDL1030. I can use the webservice in a C# project just fine...
5
10379
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said they need to consume this web service using HTTP. The developer's IDE is Notepad. Yeah, weird I know. How is this done? I guess if I can get it to...
0
1397
by: batista | last post by:
Hello all, I am using a webpage having a grid and im calling a webservice method(using webservice.htc) which after 5 seconds updates the content of the grid, uptil now everything is working fine. But now I want to use it with https so now what should i Do.. I actually have many confusions regarding this issue...
0
1576
by: nhaughton | last post by:
I have writtten a webservice in .Net 1.1 using C#, that exposes an existing COM+ application as a webservice to remote web applications. The COM+ application works fine under Win 2000, XP amd 2003. and the webservice works fine under Win2000 and XP. However I have been unable to get the webservice working with our COM+ application on a...
0
2668
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols;
4
1966
by: =?Utf-8?B?ZmFpcnl2b2ljZQ==?= | last post by:
Hi, i create an asp.net webservice, then reference this webservice in another project in the same machine, it works well when using "localhost" to locate the webservice but fails when using the ip address of my machine (neither does using the hostname), it says "downloading webservice error because of the destination machine rejecting..." It...
0
7425
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...
0
7935
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7780
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5351
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5069
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3479
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...
1
1911
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
1
1037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
734
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...

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.