/** * Process the request as an internal one, without going through GML encoding/decoding * * @param ppio * @param ref * @param method * @return * @throws Exception */ Object handleAsInternalWPS(ProcessParameterIO ppio, InputReferenceType ref) throws Exception { ExecuteType request = null; if (ref.getMethod() == MethodType.POST_LITERAL) { request = (ExecuteType) ref.getBody(); } else { ExecuteKvpRequestReader reader = (ExecuteKvpRequestReader) context .getBean("executeKvpRequestReader"); request = (ExecuteType) kvpParse(ref.getHref(), reader); } Map<String, Object> results = executor.submitChained(new ExecuteRequest(request)); Object obj = results.values().iterator().next(); if (obj != null && !ppio.getType().isInstance(obj)) { throw new WPSException( "The process output is incompatible with the input target type, was expecting " + ppio.getType().getName() + " and got " + obj.getClass().getName()); } return obj; }