I have a scenario where I am working on integrating two web applications. I am not sure how do I approach it. Here is the scenario:
1) application A wants data from applicaton B by using POST parameters
2) whenever app B receives a request it should send notification to app A saying I received the request successfully.
3) After processing the request app B should send another notification saying. request performed successfully.
4) While receiving these notifications app A should insert these notifications for records. while sending these notifications app B should insert these for records.
This is it..
Now the questions:
1) which POST parameters shall I use to hit app B?
2) How do I send and receive notifications from app B to app A? I mean in which format? XML or txt? I have no idea how should I trigger these notifications from app B? how should I receive these notifications?
1) just instantiate an HTTP Post to the site and pass whatever parameters its looking for. This is pretty standard.
2) you don't. There is no open connection between the two. You would have to POST back to an endpoint on site1 from site2 (in reverse of what you did the first time) and site1 would have to store that input and check for it on the PAGE_LOAD events (or similar).
The basic thing is that you are trying to treat 2 Web applicaitons as if they are 2 Windows applications where you have a handle/endpoint that can be "listening" for this stuff, but with Web applications it's not there as they live on a Server but input/output
on a Client machine.
Have you read the book? - ASP.Net 3.5 CMS Development (now on Kindle)
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
Site1 has a service on it that Site2 calls when its completed.
Site1 has a db table to store the call from Site2.
Site1 will check for this entry everytime a page loads, you may want to have a clientside timer running to do a service call to check for the entry every minute (or whatever time you want).
Have you read the book? - ASP.Net 3.5 CMS Development (now on Kindle)
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
Is it a good idea to implement a windows service to keep an eye on that table. If the count of the table row increases then based on the identity value, i will have that row sent over http to the site 2. but how shall communicate to windows service from
my asp.net page? and whenever I send value to site 2, i need to be sure that site 2 receives it and inserts it in its db too.
Your service call to Site2 needs to do a RETURN, thats how you know it passed.
If you want to use a Window Service for monitoring, sure... the big thing is that the Monitor needs to write the response to somewhere where Site1 can read it whenever a page loads.
Have you read the book? - ASP.Net 3.5 CMS Development (now on Kindle)
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
GaurangNaik
Contributor
2081 Points
498 Posts
Integrating two Web Applications
Jan 16, 2013 06:07 PM|LINK
Hi Guys,
I have a scenario where I am working on integrating two web applications. I am not sure how do I approach it. Here is the scenario:
1) application A wants data from applicaton B by using POST parameters
2) whenever app B receives a request it should send notification to app A saying I received the request successfully.
3) After processing the request app B should send another notification saying. request performed successfully.
4) While receiving these notifications app A should insert these notifications for records. while sending these notifications app B should insert these for records.
This is it..
Now the questions:
1) which POST parameters shall I use to hit app B?
2) How do I send and receive notifications from app B to app A? I mean in which format? XML or txt? I have no idea how should I trigger these notifications from app B? how should I receive these notifications?
Would you please give me some idea?
GauranG
Curt_C
All-Star
66017 Points
7639 Posts
Moderator
Re: Integrating two Web Applications
Jan 16, 2013 06:36 PM|LINK
1) just instantiate an HTTP Post to the site and pass whatever parameters its looking for. This is pretty standard.
2) you don't. There is no open connection between the two. You would have to POST back to an endpoint on site1 from site2 (in reverse of what you did the first time) and site1 would have to store that input and check for it on the PAGE_LOAD events (or similar).
The basic thing is that you are trying to treat 2 Web applicaitons as if they are 2 Windows applications where you have a handle/endpoint that can be "listening" for this stuff, but with Web applications it's not there as they live on a Server but input/output on a Client machine.
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
GaurangNaik
Contributor
2081 Points
498 Posts
Re: Integrating two Web Applications
Jan 18, 2013 01:40 PM|LINK
Thanks for the reply Curt. But how Do I achieve notification exchange stuff? it has tto be implemented.
GauranG
Curt_C
All-Star
66017 Points
7639 Posts
Moderator
Re: Integrating two Web Applications
Jan 18, 2013 02:30 PM|LINK
Site1 has a service on it that Site2 calls when its completed.
Site1 has a db table to store the call from Site2.
Site1 will check for this entry everytime a page loads, you may want to have a clientside timer running to do a service call to check for the entry every minute (or whatever time you want).
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
GaurangNaik
Contributor
2081 Points
498 Posts
Re: Integrating two Web Applications
Jan 18, 2013 02:48 PM|LINK
Curt,
Is it a good idea to implement a windows service to keep an eye on that table. If the count of the table row increases then based on the identity value, i will have that row sent over http to the site 2. but how shall communicate to windows service from my asp.net page? and whenever I send value to site 2, i need to be sure that site 2 receives it and inserts it in its db too.
GauranG
Curt_C
All-Star
66017 Points
7639 Posts
Moderator
Re: Integrating two Web Applications
Jan 18, 2013 03:41 PM|LINK
Your service call to Site2 needs to do a RETURN, thats how you know it passed.
If you want to use a Window Service for monitoring, sure... the big thing is that the Monitor needs to write the response to somewhere where Site1 can read it whenever a page loads.
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
Ramesh Chand...
Star
12922 Points
2672 Posts
Re: Integrating two Web Applications
Jan 18, 2013 05:15 PM|LINK
Few question:
GaurangNaik
Contributor
2081 Points
498 Posts
Re: Integrating two Web Applications
Jan 24, 2013 03:16 PM|LINK
1) Internet
2) both are developed in .NET platform.
GauranG