Hello,
I starting some tests with apache pivot.
And I would like to access a server, I'm using the example from the site and
thus I'm connecting to pipes.yahoo.com.
My code
> public void startup(Display display, Map<String, String> properties)
throws Exception {
System.out.println("tuut");
WTKXSerializer wtkxSerializer = new WTKXSerializer();
GetQuery getQuery = new GetQuery("pipes.yahoo.com", "/pipes/pipe.run");
getQuery.getParameters().put("_id",
> "43115761f2da5af5341ae2e56a93d646");
getQuery.getParameters().put("_render", "json");
getQuery.execute(new TaskAdapter<Object>(new TaskListener<Object>()
> {
@Override
public void taskExecuted(Task<Object> task) {
System.out.println("task executed");
System.out.println(task.getResult());
> //listView.setListData(JSONSerializer.getList(task.getResult(),
> "value.items"));
//loadingLabel.setVisible(false);
}
@Override
public void executeFailed(Task<Object> task) {
System.out.println("execute failed");
System.out.println(task.getFault().getMessage());
}
}));
...
In the 1.6.0_19 console I get the following logging
execute failed
access denied (java.net.SocketPermission pipes.yahoo.com:80 connect,resolve)
On the net I found some information pointing me to the catalina.policy file
so I added the following with no result.
grant codeBase "file:${catalina.home}/webapps/pivot-tutorials/-" {
permission java.security.AllPermission;
permission java.util.PropertyPermission "catalina.base", "read";
permission java.net.SocketPermission "localhost:8080", "connect,
resolve";
permission java.net.SocketPermission "pipes.yahoo.com:80", "connect,
resolve";
};
grant codeBase "file:${catalina.home}/webapps/pivot-tutorials/lib/-" {
permission java.security.AllPermission;
permission java.util.PropertyPermission "catalina.base", "read";
permission java.net.SocketPermission "localhost:8080", "connect,
resolve";
permission java.net.SocketPermission "pipes.yahoo.com:80", "connect,
resolve";
};
I also read somewhere that this wil never work from inside an applet.
Any help or clue would nice.
Thanks,
KC