@Override protected void setUp() throws Exception { response = new XmlObjectEncodingResponse( GetCapabilitiesType.class, "GetCapabilities", OWSConfiguration.class); }
public ExecuteProcessResponse(Class binding, String elementName, Class xmlConfiguration) { super(ExecuteResponseType.class); this.standardResponse = new XmlObjectEncodingResponse(binding, elementName, xmlConfiguration); }
public ExecuteProcessResponse(Class binding, String elementName, Class xmlConfiguration) { super(ExecuteResponseType.class); this.standardResponse = new XmlObjectEncodingResponse(binding, elementName, xmlConfiguration); }
void writeOutResponse(ExecuteResponseBuilder responseBuilder, File output) throws IOException { FileOutputStream fos = null; File tmpOutput = new File(output.getParent(), "tmp" + output.getName()); try { ExecuteResponseType response = responseBuilder.build(); XmlObjectEncodingResponse encoder = new XmlObjectEncodingResponse( ExecuteResponseType.class, "ExecuteResponse", WPSConfiguration.class); fos = new FileOutputStream(tmpOutput); encoder.write(response, fos, null); fos.flush(); fos.close(); if (!tmpOutput.renameTo(output)) { LOGGER.log(Level.SEVERE, "Failed to rename " + tmpOutput + " to " + output); } } finally { IOUtils.closeQuietly(fos); if (tmpOutput != null) { tmpOutput.delete(); } } }
void writeOutResponse(ExecuteResponseType response, Resource output) throws IOException { try (OutputStream os = output.out()) { XmlObjectEncodingResponse encoder = new XmlObjectEncodingResponse( ExecuteResponseType.class, "ExecuteResponse", WPSConfiguration.class); encoder.write(response, os, null); LOGGER.log(Level.FINE, "Asynch process final response written to " + output.path()); } } }