How to pass data from a web page to an application?

Trying to figure out a way where I can pass some data/fields from a web page back into my application. This needs to works on Windows/Linux/Mac so I can't use a DLL or ActiveX. Any ideas?

Here's the flow: 1. Application gathers some data and then sends it to a web page using POST that is either imbedded in the app or pops up a new IE window. 2. The web page does some services and then needs to relay the results back to the application.

The only way to do this that I can think of is writing the results locally from the page in a cookie or something like that and have the application monitor for a specific file in that folder.

Alternatively, make a web service that the application hits after passing control to the page and when the page is done the web service will return the data. This sounds like it might have some performance drawbacks.

Can anyone suggest any better solutions for this?

Thanks

-------------Problems Reply------------

My suggestion:

Break the processing logic out of the Web Page into a seperate assembly. You can then create a Web Service that handles all of the processing without needing to pass control over to a page.

Your application can then call the Web Service directly and then serialize the results and work with the data quite easily.

Update

Since the page is supplied by a third party, you obviously can't break anything out. The next best thing would be to handle the entire web request internal to your application (rather than popping a new Window).

With this method, you can get the raw HTTP response (and page markup) and work with it directly. You can then parse the Response stream and gather the required data from it.

During performing an HTTP request you should be able to retrieve the text returned by the page. For instance, if your HTTP POST was to hit a Java servlet, the doPost() method would be fired and you would then perform your actions, you could then use the PrintWriter object from the Response object (PrintWriter out = response.getWriter();) and write text back to the calling application. I'm not sure this helps?

The fact that

web page is hosted by a third party and they need to be doing the processing on their servers.

is important to this question.

I like your idea of having the app call a webservice after it passes the data to the third-paty web page. You can always call the webservice asynchronously if you're worried about blocking your application while waiting for results from this webservice.

Another option is that your application implements an XML-RPC server that can be called from the web page using PHP, Python or whatever you use to build the website

A REST server will do the job also...

Perhaps the iOpus product iMacros might be what you are looking for. Their product iMacros is pretty good at collecting data and posting data. I have used it for conditional data mining and there are plenty of examples available for a variety of tasks.

I will admit that there is a bit of a learning curve but it is really quite powerful in how it interacts with URL's, forms, and other software.

You can look at some examples and see if it meets your needs here: http://www.iopus.com/imacros/support/

There is also a free firefox add-on here: http://www.iopus.com/imacros/firefox/

Category:post Views:1 Time:2010-04-23
Tags: webforms post

Related post

  • Pass data between two web pages on the same machine with no postback 2012-02-21

    I am creating a web page that offers the user the ability to "undock" a control into a new browser window. When the user selects a value in the new window, I need to have the new page pass data to the parent page and update some information on the sc

  • How to pass data from a web page to another web page in a different project (JSF 1.1 - ADF 10.1.3) 2011-11-14

    I've got two pages in two different projects (it means in different ear files that are deployed singularly) and i need to pass data from a page to another. in the action of a command link i do public String onSalva() { ADFContext.getCurrent().getAppl

  • (PHP) - How do I automate passing data to a web page that uses a post action to an asp form 2010-12-10

    (php) All I want to do is execute a script where I can pass a parameter of input data that I would normally have to manually input. Its the same input data everytime so it would be nice if I could execute a script that would take me to the page and h

  • How to pass data with '&' between web pages 2010-11-17

    The jQuery - $.ajax({ type: "GET", url: "add_showcase.php", data: "title=" + document.getElementById("title_in").value + "&desc=" + document.getElementById("desc_in").value, success: function(html).... When i pass this data as "desc" - <object

  • How to input data from a web page to Python script most efficiently 2011-11-15

    How can I most easily input data from a web page and pass it to a Python script? I've been reading here and on other forums a lot about Python in connection with php or cgi, or even Tornado, Django, etc but I am quite puzzled what is the best solutio

  • Passing Data to View Master Pages 2010-04-26

    Hi I am following the tutorial to pass data to view master page using the "good solution" from this link http://www.asp.net/learn/mvc/tutorial-13-cs.aspx but after doing the changes as instructed, when i run the application. the application run the a

  • Passing Data to View Master Pages base on login user 2011-04-14

    I've a problem with my mvc application, mvc 3 using spark view engine. I want to bind a dropdownlist that attached to application.spark (master page) base on HttpContext.User.Identity. the problem is..where I should place the ViewData that contain th

  • Saving data locally from web page without an Internet connection 2011-09-28

    I have to save data from my web page on local disk. I have tried a few solutions but with no luck. My question in general is: What is the best solution for saving data from a web page on to my local machine without an Internet connection. I have trie

  • How to get data from a web page using php? 2012-01-24

    Possible Duplicate: How to implement a web scraper in PHP? Scraping and web crawling framework, PHP Hi i have a list of links from which using the source code i want to get some data from each web page Example:http://www.baseball-reference.com/player

  • Passing data object between XAML pages 2012-04-04

    I haven't found any useful answer, or should I say "any answer" that how can I pass data objects between the pages in WP7? PAGE1 IEnumerable<dictParts> Parts = LoadParts(); How can I pass Parts to PAGE2? --------------Solutions------------- See

  • Is passed data to a php page using .load method of ajax can be used by $_REQUEST method only 2012-04-15

    Is it possible to treat passed data to a php page with $_POST OR $_GET rather than $_REQUEST --------------Solutions------------- You can use $.get() for get http get request and $.post() for http post request and on server side $_GET for handling ge

  • getting external data from a web page 2012-03-03

    Trying to get data from an external Web page and have it refresh upon opening the file. I open the web page and have to find the tables on the site. Then I right click and import data to excel. It sends the file then says that no data has been receiv

  • Problem pasting data from a web page into Word 2007 document. 2013-08-05

    I am running Windows 7, Word 2007, IE9. When I try to paste data from a web page into a Word 2007 document Word pastes an oval symbol rather than data. I can paste the data to notepad with no problem but not to Word 2007. What setting do I need to ch

  • Excel 2003 - Downloaded data from a web page is greyed out in spreadsheet. 2013-09-16

    I downloaded data from a web page and copied and pasted into Excel 2003. Part of the data is covered with a grey box and I can't get rid of it. Can't copy out of or write into cells that are covered. --------------Solutions------------- It is very di

  • Display Simple Web Page In My Application Using Blackberry BrowserField 2010-04-19

    What I am trying to do is display a simple web page in my application (no javascript,cookies or any scripting and not trying to detect any events such as mouse click etc.). I am using the code below and right now all I get is empty screen .. I know t

  • how to display web page in blackberry application? 2011-03-24

    i have to display web page in my application . but i m unable to get web page.i m using pushGlobalScreen() for getting new screen and then i have to display web page i m using this code BrowserSession site=Browser.getdefaultSession(); site.displayPag

  • How to connect my application to the web page in w8 application 2014-06-04

    How to link my application to the web page in w8 application please post the code behind the button --------------Solutions------------- Hi, Thank you for posting you query in Microsoft Community. We need more information to understand the issue and

  • Passing POST data from one web page to another with PHP 2009-03-24

    Searching did not find a similar question, so: How can POST data used by PHP to generate one page be passed from that page to another PHP generated page? I have: A form on page 1 which sends data to a PHP script via POST. Page 2 is generated by that

  • Passing form data from one web page to another with PHP 2011-08-02

    i found few similar questions here but from answers i didn't get the whole picture of how should work. I have a subscription form in a page: <form method="post" action="index.php/register"> <fieldset> <input type="text" id="first_name"

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.071 (s). 11 q(s)