Someone help me please.
I've tried to write an asynchronous method, but it didn't call my web
service, do I need to do something in my webservice project to make it
work?
or if there is something wrong with the code that I have below.
Thanks..
The following are my two methods where one is calling web service and
second one is the delegate for callback method when asynchronous call
completed.
what I found is that it never went to the second sub that I created
when asynchornous finishes. weird... :(
sub CallWS()
Dim service As New CLWebService.se rvice
service.Url = "http://localhost:2751/ws/Service.asmx"
'Add our callback function to the event handler
AddHandler service.GetCons ultantsComplete d, AddressOf
GetConsultantsC allBack
'Call the Web service asynchronously
service.GetCons ultantsAsync(#1/1/2005#, #1/5/2005#)
End Sub
Private Sub GetConsultantsC allBack(ByVal sender As Object, ByVal args
As CLWebService.Ge tConsultantsCom pletedEventArgs )
Dim consultants() As CLWebService.Co nsultant = args.Result
Dim i As Integer = 1
For Each con As CLWebService.Co nsultant In consultants
Console.WriteLi ne(i.ToString & ". " & con.Name.Trim & " "
& con.Email.Trim)
i = i + 1
Next
End sub 1 1926
kkao77 a écrit :
Someone help me please.
I've tried to write an asynchronous method, but it didn't call my web
service, do I need to do something in my webservice project to make it
work?
or if there is something wrong with the code that I have below.
Thanks..
The following are my two methods where one is calling web service and
second one is the delegate for callback method when asynchronous call
completed.
what I found is that it never went to the second sub that I created
when asynchornous finishes. weird... :(
sub CallWS()
Dim service As New CLWebService.se rvice
service.Url = "http://localhost:2751/ws/Service.asmx"
'Add our callback function to the event handler
AddHandler service.GetCons ultantsComplete d, AddressOf
GetConsultantsC allBack
'Call the Web service asynchronously
service.GetCons ultantsAsync(#1/1/2005#, #1/5/2005#)
End Sub
Private Sub GetConsultantsC allBack(ByVal sender As Object, ByVal args
As CLWebService.Ge tConsultantsCom pletedEventArgs )
Dim consultants() As CLWebService.Co nsultant = args.Result
Dim i As Integer = 1
For Each con As CLWebService.Co nsultant In consultants
Console.WriteLi ne(i.ToString & ". " & con.Name.Trim & " "
& con.Email.Trim)
i = i + 1
Next
End sub
Hello,
At first I would check that calling synchronously the WebService works.
Did you check the the service.Url is correct ? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Natalia DeBow |
last post by:
Hi,
I am working on a Windows-based client-server application. I am involved in
the development of the remote client modules. I am using asynchronous
delegates to obtain information from remote server and display this info on
the UI.
From doing some research, I know that the way my implementation works today
is not thread-safe, because essentially my worker thread updates the UI,
which is BAD. So, here I am trying to figure out how...
|
by: Jonathan Trevor |
last post by:
Hi,
I've found what appears to be a bug with ASP.NET web service method
invocation - making it impossible to invoke and get the result of a
synchronous web call after an asynchronous call has been made if both are
using sessions.
Heres an example for two calls in the web service, the first is expected to
be executed asynchronously by the client and the second to get the progress
of the first while it is executing:
|
by: TC |
last post by:
Hello,
I am making an asynchronous call to a webservice and trying to update the
web page with the results.
The page is not updating.
Does anybody know why???
Below is my code:
|
by: usenetaccount |
last post by:
In a newly created test app, to maximize client performance I tried to
make two SOAP method calls in tandem (the soap methods execute some
specified query), as each call includes a large amount of idle time by
the client as it waits for a query to execute and return a dataset.
As a test, I initially wrote two versions:
' // Sequential & Synchronous
Dim webobj As com.mycompany.webobject
Dim ds1 As System.Data.DataSet
Dim ds2 As...
|
by: taskswap |
last post by:
I have a legacy application written in C that I'm trying to convert to
C#. It processes a very large amount of data from many clients
(actually, upstream servers - this is a mux) simultaneously.
I've read through what must be dozens of ways to do socket
communication in C#, and it seems they all devolve into three basic
options - Socket.Select, IOCP through a native interface, and
Asynchronous callbacks. I'm fine using Asynchronous...
| |
by: Siv |
last post by:
Hi,
I have a stored procedure that I want to execute and then wait in a loop
showing a timer whilst it completes and then carry on once I get
notification that it has completed. The main reason for this being to stop
the user thinking the application has frozen when in fact it is just waiting
for a long SP to complete. Another reason for doing it like this is that I
also have had a problem in the past where the SP takes longer than the...
|
by: dba123 |
last post by:
I need to perform Asynchronous Inserts using DAAB. So far I have a method
which does an insert but how can I do this Asyncronously so that it does not
affect the load on our public production website? This question is wide open
but make sure you give me some ideas in context with DAAB syntax. Some
thoughts are threading, ATLAS, etc. but I have no clue how to even approach
an Asynchronous Insert or any techniques at this point. Also, I...
|
by: dba123 |
last post by:
I need a way to do this insert below asynchronously and I'm pretty much lost
at this point.
Is there some example out there using Enterprise Library 2.0? We don't care
about the return, it's just a call to run a method in my class which performs
the insert and we need to give the call back to the client or something...I
guess this is asynchronous.
I am still a bit foggy on how asynchronous works (I guess you return the
call to the...
|
by: Ryan Liu |
last post by:
Hi,
I read Microsoft SDK,
ms-help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpovrasynchronousprogramming
overview.htm
there are 4 ways to call EndInvoke:
The code in this topic demonstrates four common ways to use BeginInvoke and
EndInvoke to make asynchronous calls. After calling BeginInvoke you can:
|
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,...
|
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,...
| |
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |