Hi,
I am developing a simple SOI to hide some attributes. The environment is 10.8.1 and the service is shared on AGS with copy data e feature access.
The request is very simple:
.....
public byte[] handleRESTRequest(String capabilities, String resourceName, String operationName,
String operationInput, String outputFormat, String requestProperties, String[] responseProperties)
throws IOException, AutomationException {
try {
IRESTRequestHandler restRequestHandler = soiHelper.findRestRequestHandlerDelegate(so);
if (restRequestHandler != null) {
if (operationName != null && operationName.equals("query")) {
byte[] originalResponse = restRequestHandler.handleRESTRequest(capabilities, resourceName,
operationName, operationInput, outputFormat, requestProperties, responseProperties);
// parse response and hide attributes
.....
The problem is that the outputFormat is "pbf", i.e. I cannot convert the reponse to JSON. If I set "json" before the call, than the response is ok but the caller expects "pbf" so it won't work.
Here there is the solution for Javascript, but I cannot figure out how to solve it in java. Is there a way to avoid to have a request for pbf or a conversion pbf2json ?
Thanks
Gianni
UPDATE: Even if I intercept the "info" request (resourceName, operationName and operationInput are empty) and modifying the supportedQueryOutputs from "JSON, GeoJSON,PBF "to "JSON, GeoJSON" the problem is not solved.