It does not sound like you want a direct action.  I think you want something 
more like java.net.HttpURLConnection or HTTPClient from the Apache commons.


Chuck


On 2012-12-21, at 2:11 PM, Mai Nguyen wrote:

> Yes, if I can call performActionNamed: to get a WOActionResults and get the 
> response.
> 
> But the problem is that I need to call a validateURLS() which calls an 
> external app to do validation. Maybe I have to use 
> WODirectActionRequestHandler directly....not sure.
> 
> thanks
> 
> On Dec 21, 2012, at 2:02 PM, John Huss wrote:
> 
>> A redirect does not have a content body, just a status code and a Location 
>> header.
>> 
>> 
>> On Fri, Dec 21, 2012 at 3:48 PM, Mai Nguyen <brightmornin...@gmail.com> 
>> wrote:
>> Hi List,
>> I have read David LeBer's very good blog about Direct Actions, but I am 
>> still unclear how to get the http response returned by a DA? Or is it 
>> possible?
>> 
>> For example, I have the following code, as the redirect is needed to call a 
>> DA to do further validation.
>> The DA inside the URL (that I do not control) will return an HTTP Response 
>> with the proper status etc.
>> 
>> 
>>                      redirectL = new WORedirect(context());
>>                      redirectL.setUrl(validateURLS()); // the validateURLS 
>> contains a DA with a set of params
>>                                                         
>>                      responseL = redirectL.generateResponse(); // How to get 
>> the HTTP response from above DA?
>> 
>>                      // DEBUG
>>                      responseL.contentString(); ==> Return NULL / Empty 
>> string
>> 
>> The above response  is returned as empty, and I get an error "Your request 
>> generates an error" ,so how do you grab an HTTP response back from a DA?
>> 
>> Thanks for any hints,
>> 
>> mai
>> 
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com
>> 
>> This email sent to johnth...@gmail.com
>> 
>> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to ch...@global-village.net

-- 
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!









 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to