You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Adrian Crum (JIRA)" <ji...@apache.org> on 2008/07/12 21:41:31 UTC
[jira] Issue Comment Edited: (OFBIZ-1873) Sandbox: Ideas For Mashup
Services
[ https://issues.apache.org/jira/browse/OFBIZ-1873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613123#action_12613123 ]
adrianc@hlmksw.com edited comment on OFBIZ-1873 at 7/12/08 12:39 PM:
--------------------------------------------------------------
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
It returns:
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.
was (Author: adrianc@hlmksw.com):
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 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
It returns:
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.
> Sandbox: Ideas For Mashup Services
> ----------------------------------
>
> Key: OFBIZ-1873
> URL: https://issues.apache.org/jira/browse/OFBIZ-1873
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Reporter: Adrian Crum
> Priority: Minor
> Attachments: external_services.patch
>
>
> Discuss ideas for potential mashup services and worker classes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.