Dear All
I'm facing a very simple issue with a Direct Action component I'm trying to get up-and-running. I've checked past questions and also read the blog article several times and checked my code, but am still unable to figure out what's gone wrong.
My DirectAction class is implemented within an existing application that does session management. I'm programmatically generating the URL. The link appears on the page, but when I click it, I get hit with:
AWGenericException: Unable to locate page with name "http://localhost:8080/EasyCare2.5/AribaWeb/ad/posts?awr=a"
I'm generating the URL through the following lines of code.
public String exportURL () {
AWDirectActionUrl url = AWDirectActionUrl.checkoutFullUrl(requestContext());
url.setDirectActionName(DirectAction.PostsAction);
url.setRequestContext(requestContext());
url.setSessionId(session().sessionId());
return url.finishUrl();
}
What
am I doing wrong? Where should the DirectAction class reside? Should it
only be in the app package or can it reside in the package where the
URL is being used?
My DirectAction class is very simple -- just used the code from the examples to test the concept:
package apps;
import ariba.ui.aribaweb.core.AWDirectAction;
import ariba.ui.aribaweb.core.AWResponseGenerating;
import ariba.ui.aribaweb.core.AWResponse;
import ariba.ui.aribaweb.core.AWRequest;
import ariba.ui.aribaweb.util.AWContentType;
import ariba.util.core.HTTP;
import ariba.util.core.ListUtil;
import java.util.List;
public class DirectAction extends AWDirectAction
{
public static final String PostsAction = "posts";
public AWResponseGenerating postsAction ()
{
AWRequest request = request();
AWResponse response = application().createResponse(request);
response.setContentType(AWContentType.TextPlain);
response.appendContent("Hello World!");
return response;
}
}
Thanks for the help!

Sarosh