external_services.patch is a proof of concept implementation. It still needs more work before being committed.
I created a basic service to retrieve external web pages and I also created a sample scraper - a form extraction service. It all seems to work well.
I implemented these as services so they can be used inside screen widget <actions> elements and in minilang.
The sendExternalRequest service takes the following arguments:
extRequestUrl - the external URL to invoke
extRequestType - get, post, or empty (for REST type URLs)
extRequestParams - request parameters Map
It returns extResponse - the web page (or XML document) as a String.
The getFormParametersFromExtResponse service takes the following arguments:
extResponse - The response String
formId - The id attribute to search for
formName - The form name to search for
extResponse - The original response String
formAction - The form's action attribute
formMethod - The form's method attribute
formFields - The form's input fields Map
The idea being you could modify the contents of the formFields Map and then use the returned values in another call to sendExternalRequest.
I picture the Mashup services working like a chain - you invoke the initial request, then take the response and pass it through various scrapers and/or XML element extractors.
Comments are welcome.