ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajbir Saini <rajbsa...@yahoo.com>
Subject Re: Extract parameters from external call
Date Sat, 16 Jun 2012 05:15:02 GMT
Hello Bhargav,

Processing a request form external system is no different from 
processing a request from your browser. In fact all request coming to 
OFBiz are from an user agent such as browsers, bots or some other clients.

To collect the request parameters (either get or post), you can use 
various HttpServletRequest#getParameter* methods or OFBiz UtilHttp [1] 
utility class.

[1] 
http://ci.apache.org/projects/ofbiz/site/javadocs/org/ofbiz/base/util/UtilHttp.html

Thanks,

Raj

PS: Please do not cross post. OFBiz dev list is to discuss the OFBiz 
development related issues. It is always safe to ask your questions to 
user list and if there is a need someone from dev will ask you to move 
your question to dev list.

On Saturday 16 June 2012 07:06 AM, Bhargav.Trivedi@objectedge.com wrote:
> Hi,
> I hope I am able to explain the scenario over here.
>
> I am making a http POST call to an external gateway from one of my ftl
> file. One of the parameters in the call is say redirect_url.
>
> As an example:  Say I have specified one of the request-map in my
> controller.xml as below:
> <request-map uri="xyz">
>          <security https="true" auth="false"/>
>          <event type="java" path="<some java class>" invoke="<some event
> handler>"/>
>          <response name="success" type="request" value="<handle success
> from this event>"/>
>          <response name="error" type="view" value="<go to error page>"/>
> </request-map>
>
> Now I am specifying the value of redirect_url  from my ftl by<@ofbizUrl>
> xyz</@ofbizUrl>
>
> Once this call is processed by the external system, it redirects to a
> specified url in redirect_url and my<some event handler>is being invoked.
> But this external system is responding with some fields using GET method.
> And I am not sure how to capture this fields since I am not able to see
> them in the request variable.
>
> Can some one please help me out on what would be the correct way to make
> such a call to an external gateway?
>
> Bhargav


Mime
View raw message