473,569 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calling a methos through webservice

57 New Member
Hi,

I have a webservice which i am calling on button click event.

this webservice is serving twi methods, my problem is that allthough this service will call both the methods but one of them sometimes does not run i cant understant why?
Expand|Select|Wrap|Line Numbers
  1.         void Page_Loaded(object sender, RoutedEventArgs e)
  2.         {
  3.             Search.Click += new RoutedEventHandler(Search_Click);
  4.  
  5.         }
  6.  
  7.         void Search_Click(object sender, RoutedEventArgs e)
  8.         {
  9.             ServiceReference1.Service1Client webService = new SQLData.ServiceReference1.Service1Client();
  10.             webService.DocStatusListCompleted += new EventHandler<SQLData.ServiceReference1.DocStatusListCompletedEventArgs>(webService_GetStatus);
  11.             webService.DocStatusListAsync();
  12.             System.Diagnostics.Debug.WriteLine("calledstatuslist");           
  13.  
  14.             webService.DocWorkFlowCompleted += new EventHandler<SQLData.ServiceReference1.DocWorkFlowCompletedEventArgs>(webService_GetUsers);
  15.             webService.DocWorkFlowAsync(User.Text);
  16.  
  17.  
  18.  
  19.         }
  20.  
  21.        void webService_GetStatus(object sender, SQLData.ServiceReference1.DocStatusListCompletedEventArgs e)
  22.         {
  23.             System.Diagnostics.Debug.WriteLine("gettingstatuslist" );
  24.  
  25.              DocStatusList = e.Result;
  26.             System.Diagnostics.Debug.WriteLine("statuslist" + DocStatusList.Count());
  27.  
  28.         }
  29.  
  30.         void webService_GetUsers(object sender, SQLData.ServiceReference1.DocWorkFlowCompletedEventArgs e)
  31.         {
  32.             DocWorkFlowList = e.Result;
  33. //other stuff use DocStatusList public variable here... and sometimes it works and sometimes it throws error showing that list is empty becouse that method above does not get called
  34. }
now in the output i can see line printed calledstatuslis t but allthough i has run the code for that method. that method never get called. and my statuslist is empty..

why is it happening..plea se help
Apr 13 '09 #1
0 1152

Sign in to post your reply or Sign up for a free account.

Similar topics

8
1720
by: Rob Kellow | last post by:
Hello, I'm working on an application for use within my company on our intranet that will be used to gather some information and store some of the info in a SQL Server database and the rest of the information will be used to initiate either a MS Word or MS Excel document. The applications (Word & Excel) reside on the users local system but the...
1
6720
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name this WebService1. (using Apache Axis 1.1) Scenario 1: -----------
3
3547
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it looks like the data is not transferred to the asp page from the web service. just after going to internet option -> security -> Custom level ->...
7
4967
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type Parameter. I can call the first Method without Problems, the Parameter can be deserialized by the WebService. But if I want to call the second Method and...
3
12877
by: Henrik | last post by:
Hi all,,, I need to get a refferece to a XML-webservice, and get some data from it.... But I can't add it like an web-refference... What options does I else have?? I've been told that i've to use SOAP, to connect to it, but how?? Are there any good documentation for that?? all the examples that i've found, is using web-refference.. ...
3
9066
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. If the web service is taking a long time to complete, the aspx page returns a ‘The operation has timed-out.’ Message to the web browser after...
1
4023
by: jens Jensen | last post by:
Hello , i'm calling a webservice generated with oracle webservice java tools. I'm not able to add a web reference to a .net client the usual way with visual studio 2005. I was therefore provided with a set of Dll that implement the proxy needed to consume this web service. I'm now wrapping these dlls in a .Net webservice that can be...
0
1741
by: =?Utf-8?B?QWRhbUM=?= | last post by:
Hi, I'm wondering if you can help. We have a classic asp application that creates and posts some XML using the SOAP format to a .NET WebService. The WebService and the asp are on the same IIS server , which is IIS6.0. On first calling the WebService the asp page either hangs or returns Active Server Pages error 'ASP 0113' Script timed out...
0
1197
by: cataztrophe | last post by:
I have an ASP.NET/VB.NET program. There is a webservice does processing in a separate project which does not return any values. The webservice is executed upon clicking the run button on a certain page, however I would like the webservice to be executed in the background while the next line of code is processed on the client in concurently. ...
0
7698
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8122
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...
1
7673
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...
1
5513
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
5219
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...
1
2113
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
0
937
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.