I am trying to evaluate the possibility to use OpenGamma as a standalone installation and interact with it using Java Rest Client. I installed the simulated sample from the source, and all is working fine. The UI is working, as well as simple rest queries from the browser like "http://localhost:8080/jax/components"and the like.
I am trying then to query the server from the jersey client sample provided:
_server = RemoteServer.create(“http://localhost:8080”);
PortfolioMaster portfolioMaster = _server.getPortfolioMaster();
PortfolioSearchRequest portSearchRequest = new PortfolioSearchRequest();
PortfolioSearchResult portSearchResult = portfolioMaster.search(portSearchRequest);
from there the portfolioMaster is always null and I get the following trace log:
(ToolContextUtils.java:121) - Unable to populate tool context ‘positionMaster’, no appropriate component found on the server
All the other context raise the same error.
Looking with a web proxy, the request is properly sent to the server
GET /jax/components HTTP/1.1
And the response is properly sent back from the server:
HTTP/1.1 200 OK
Date: Sat, 11 Jul 2015 11:45:51 GMT
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Expires: Mon, 26 Jul 1997 05:00:00 GMT
I could paste the JSON response content if that makes any sense.
Unfortunately debugging the Jersey Client and FudgeMsg receiver is very tedious since a lot of reflection is active there.
I am convinced that the Client Api built in OpenGamma is properly working and some straightforward problem is preventing the unmarshalling of the response. Somehow I can not spot it on.
Any help in getting this simple example would be very much appreciated.