[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Asynhronic response from Web Service

Posted on 2008-06-26
4
Medium Priority
?
234 Views
Last Modified: 2010-04-15
I need to generate XML from myWebService to another Web Service but only when Table.field in database is with value "0". When myWebService get information that "field" is with value "0" or field are inserted, myWebService need to generate XML and change Table.field value to "1".

How would myWebService know when the value of "field" is changed to "0" or inserted in Table with value "0" (I need some methodology which would trigger my Web service at any time when it occurs - Web Service in Web Service).
Some code example would be appropriate.

0
Comment
Question by:novabankaee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:elimesika
ID: 21877100
HI

You have several options

1) pooling - creating  a timer object and check for the value each X seconds

2) Use Cache Dependency on the table
http://msdn.microsoft.com/en-us/library/ms178604.aspx

3) create a CLR stored procedure that will be called from a trigger on the table

http://msdn.microsoft.com/en-us/library/ms131094.aspx


I highly recommend the 2nd option

0
 

Author Comment

by:novabankaee
ID: 21881718
I don't use MS Sql Server so 2nd and 3rd options are not in options.
I use Informix database. This is more database then Visual studio (C#) releated problem. Isn't it?
0
 
LVL 19

Accepted Solution

by:
elimesika earned 1000 total points
ID: 21891678
HI

OK, than you are left with the 1st option , this is the easiest solution to implement and it might meet your needs if the update rate is not extensive.

Another option, if you have any control on the service that updates the service, you may use messaging to send a message from updating service to the other service.
0
 

Author Comment

by:novabankaee
ID: 21916491
How and where to implement Timer Object in WebServis?

public class MyWebService : System.Web.Services.WebService
    {
 
        public MyWebService()
        {
        }
 
        [WebMethod]
        public string WebMethod1()
        {
            //Business Logic
        }
 
        public void PrivateMethod1()
        {
            //Business Logic
        }
   }

Open in new window

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question